aboutsummaryrefslogtreecommitdiff
path: root/laser-tag software/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'laser-tag software/CMakeLists.txt')
-rw-r--r--laser-tag software/CMakeLists.txt44
1 files changed, 42 insertions, 2 deletions
diff --git a/laser-tag software/CMakeLists.txt b/laser-tag software/CMakeLists.txt
index fa8937d..6fac7c7 100644
--- a/laser-tag software/CMakeLists.txt
+++ b/laser-tag software/CMakeLists.txt
@@ -34,7 +34,7 @@ SET(CMAKE_ASM_FLAGS_DEBUG "${CMAKE_ASM_FLAGS_DEBUG} -g -mcpu=cortex-m0plus -mt
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -mcpu=cortex-m0plus -mthumb -MMD -MP -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99")
# DEBUG LD FLAGS
-SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -g --specs=nano.specs -lm -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs -Xlinker --defsym=__stack_size__=0x300 -Xlinker --defsym=__heap_size__=0x200")
+SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -g --specs=nano.specs -lm -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs -Xlinker --defsym=__stack_size__=0x300 -Xlinker --defsym=__heap_size__=0x200 -Xlinker --defsym=__ram_vector_table__=1")
# RELEASE ASM FLAGS
SET(CMAKE_ASM_FLAGS_RELEASE "${CMAKE_ASM_FLAGS_RELEASE} -mcpu=cortex-m0plus -mthumb -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99")
@@ -43,7 +43,7 @@ SET(CMAKE_ASM_FLAGS_RELEASE "${CMAKE_ASM_FLAGS_RELEASE} -mcpu=cortex-m0plus -mt
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -mcpu=cortex-m0plus -mthumb -MMD -MP -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99")
# RELEASE LD FLAGS
-SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} --specs=nano.specs -lm -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs -Xlinker --defsym=__stack_size__=0x300 -Xlinker --defsym=__heap_size__=0x200")
+SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} --specs=nano.specs -lm -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs -Xlinker --defsym=__stack_size__=0x300 -Xlinker --defsym=__heap_size__=0x200 -Xlinker --defsym=__ram_vector_table__=1")
# ASM MACRO
SET(CMAKE_ASM_FLAGS_DEBUG "${CMAKE_ASM_FLAGS_DEBUG} -DDEBUG")
@@ -68,6 +68,18 @@ IF(CMAKE_BUILD_TYPE MATCHES Debug)
INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/platform/devices)
INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/platform/devices/MKL27Z4/include)
INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/platform/devices/MKL27Z4/startup)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/usb/adapter/sources)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/usb/adapter/sources/sdk)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/usb/usb_core/device/include/frdmkl27z)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/usb/usb_core/device/include)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/usb/usb_core/device/sources/classes/common)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/usb/usb_core/device/sources/classes/include)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/usb/usb_core/device/sources/classes/include/config)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/usb/usb_core/device/sources/classes/msd)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/usb/usb_core/device/sources/controller/khci)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/usb/usb_core/device/sources/controller)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/usb/usb_core/hal)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/usb/usb_core/include)
INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/platform/hal/inc)
INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/platform/drivers/inc)
INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/platform/system/inc)
@@ -80,6 +92,18 @@ ELSEIF(CMAKE_BUILD_TYPE MATCHES Release)
INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/platform/devices)
INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/platform/devices/MKL27Z4/include)
INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/platform/devices/MKL27Z4/startup)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/usb/adapter/sources)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/usb/adapter/sources/sdk)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/usb/usb_core/device/include/frdmkl27z)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/usb/usb_core/device/include)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/usb/usb_core/device/sources/classes/common)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/usb/usb_core/device/sources/classes/include)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/usb/usb_core/device/sources/classes/include/config)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/usb/usb_core/device/sources/classes/msd)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/usb/usb_core/device/sources/controller/khci)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/usb/usb_core/device/sources/controller)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/usb/usb_core/hal)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/usb/usb_core/include)
INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/platform/hal/inc)
INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/platform/drivers/inc)
INCLUDE_DIRECTORIES(${ProjDirPath}/../KSDK_1.2.0/platform/system/inc)
@@ -89,6 +113,10 @@ ENDIF()
# ADD_EXECUTABLE
ADD_EXECUTABLE(hello_world
+ "${ProjDirPath}/../KSDK_1.2.0/platform/utilities/src/fsl_debug_console.c"
+ "${ProjDirPath}/../KSDK_1.2.0/platform/utilities/inc/fsl_debug_console.h"
+ "${ProjDirPath}/../KSDK_1.2.0/platform/utilities/src/print_scan.c"
+ "${ProjDirPath}/../KSDK_1.2.0/platform/utilities/src/print_scan.h"
"${ProjDirPath}/../KSDK_1.2.0/platform/devices/MKL27Z4/startup/gcc/startup_MKL27Z4.S"
"${ProjDirPath}/../KSDK_1.2.0/platform/devices/MKL27Z4/startup/system_MKL27Z4.c"
"${ProjDirPath}/../KSDK_1.2.0/platform/devices/startup.c"
@@ -100,16 +128,26 @@ ADD_EXECUTABLE(hello_world
"${ProjDirPath}/../KSDK_1.2.0/platform/drivers/src/spi/fsl_spi_irq.c"
"${ProjDirPath}/main.c"
"${ProjDirPath}/epaper.c"
+ "${ProjDirPath}/epaper.h"
"${ProjDirPath}/text.c"
+ "${ProjDirPath}/text.h"
"${ProjDirPath}/radio.c"
+ "${ProjDirPath}/radio.h"
+ "${ProjDirPath}/RFM69registers.h"
+ "${ProjDirPath}/disk.c"
+ "${ProjDirPath}/disk.h"
+ "${ProjDirPath}/usb_descriptor.c"
+ "${ProjDirPath}/usb_descriptor.h"
)
SET_TARGET_PROPERTIES(hello_world PROPERTIES OUTPUT_NAME "hello_world.elf")
TARGET_LINK_LIBRARIES(hello_world -Wl,--start-group)
# LIBRARIES
IF(CMAKE_BUILD_TYPE MATCHES Debug)
+ TARGET_LINK_LIBRARIES(hello_world ${ProjDirPath}/../KSDK_1.2.0/usb/usb_core/device/build/armgcc/usbd_sdk_frdmkl27z_bm/debug/libusbd_bm.a)
TARGET_LINK_LIBRARIES(hello_world ${ProjDirPath}/../KSDK_1.2.0/lib/ksdk_platform_lib/armgcc/KL27Z4/debug/libksdk_platform.a)
ELSEIF(CMAKE_BUILD_TYPE MATCHES Release)
+ TARGET_LINK_LIBRARIES(hello_world ${ProjDirPath}/../KSDK_1.2.0/usb/usb_core/device/build/armgcc/usbd_sdk_frdmkl27z_bm/release/libusbd_bm.a)
TARGET_LINK_LIBRARIES(hello_world ${ProjDirPath}/../KSDK_1.2.0/lib/ksdk_platform_lib/armgcc/KL27Z4/release/libksdk_platform.a)
ENDIF()
@@ -127,3 +165,5 @@ SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -Xlinker
# BIN AND HEX
ADD_CUSTOM_COMMAND(TARGET hello_world POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Oihex ${EXECUTABLE_OUTPUT_PATH}/hello_world.elf ${EXECUTABLE_OUTPUT_PATH}/hello_world.hex)
ADD_CUSTOM_COMMAND(TARGET hello_world POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Obinary ${EXECUTABLE_OUTPUT_PATH}/hello_world.elf ${EXECUTABLE_OUTPUT_PATH}/hello_world.bin)
+
+# vim: set expandtab ts=4 sw=4: