summaryrefslogtreecommitdiff
path: root/examples/imx7d_sdb_m4/demo_apps/sensor_demo/armgcc/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/imx7d_sdb_m4/demo_apps/sensor_demo/armgcc/CMakeLists.txt')
-rw-r--r--examples/imx7d_sdb_m4/demo_apps/sensor_demo/armgcc/CMakeLists.txt32
1 files changed, 21 insertions, 11 deletions
diff --git a/examples/imx7d_sdb_m4/demo_apps/sensor_demo/armgcc/CMakeLists.txt b/examples/imx7d_sdb_m4/demo_apps/sensor_demo/armgcc/CMakeLists.txt
index c2ab91e..e0e8ebf 100644
--- a/examples/imx7d_sdb_m4/demo_apps/sensor_demo/armgcc/CMakeLists.txt
+++ b/examples/imx7d_sdb_m4/demo_apps/sensor_demo/armgcc/CMakeLists.txt
@@ -28,39 +28,38 @@ set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -T${ProjDirPat
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -T${ProjDirPath}/../../../../../platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_tcm.ld -static")
# DEBUG ASM FLAGS
-SET(CMAKE_ASM_FLAGS_DEBUG "${CMAKE_ASM_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99")
+SET(CMAKE_ASM_FLAGS_DEBUG "${CMAKE_ASM_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -mapcs -std=gnu99")
# DEBUG C FLAGS
-SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -MMD -MP -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99")
+SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -O0 -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -MMD -MP -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -mapcs -std=gnu99")
# DEBUG LD FLAGS
-SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 --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__=0x400 -Xlinker --defsym=__heap_size__=0x200")
+SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 --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")
# RELEASE ASM FLAGS
-SET(CMAKE_ASM_FLAGS_RELEASE "${CMAKE_ASM_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99")
+SET(CMAKE_ASM_FLAGS_RELEASE "${CMAKE_ASM_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -mapcs -std=gnu99")
# RELEASE C FLAGS
-SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -MMD -MP -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99")
+SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Os -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -MMD -MP -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -mapcs -std=gnu99")
# RELEASE LD FLAGS
-SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 --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__=0x400 -Xlinker --defsym=__heap_size__=0x200")
+SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 --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")
# ASM MACRO
SET(CMAKE_ASM_FLAGS_DEBUG "${CMAKE_ASM_FLAGS_DEBUG} -D__DEBUG")
# C MACRO
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D__DEBUG")
-SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DCPU_IMX7D_M4")
-SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DPRINTF_FLOAT_ENABLE")
+SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DCPU_MCIMX7D_M4")
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -D__NDEBUG")
-SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DCPU_IMX7D_M4")
-SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DPRINTF_FLOAT_ENABLE")
+SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DCPU_MCIMX7D_M4")
# CXX MACRO
# INCLUDE_DIRECTORIES
IF(CMAKE_BUILD_TYPE MATCHES Debug)
INCLUDE_DIRECTORIES(${ProjDirPath}/../../..)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/..)
INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F)
INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/CMSIS/Include)
INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/devices)
@@ -71,8 +70,10 @@ IF(CMAKE_BUILD_TYPE MATCHES Debug)
INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/utilities/inc)
INCLUDE_DIRECTORIES(${ProjDirPath}/../../..)
INCLUDE_DIRECTORIES(${ProjDirPath}/../common)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/..)
ELSEIF(CMAKE_BUILD_TYPE MATCHES Release)
INCLUDE_DIRECTORIES(${ProjDirPath}/../../..)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/..)
INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F)
INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/CMSIS/Include)
INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/devices)
@@ -83,6 +84,7 @@ ELSEIF(CMAKE_BUILD_TYPE MATCHES Release)
INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/utilities/inc)
INCLUDE_DIRECTORIES(${ProjDirPath}/../../..)
INCLUDE_DIRECTORIES(${ProjDirPath}/../common)
+ INCLUDE_DIRECTORIES(${ProjDirPath}/..)
ENDIF()
# ADD_EXECUTABLE
@@ -91,7 +93,7 @@ ADD_EXECUTABLE(sensor_demo
"${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h"
"${ProjDirPath}/../../../../../platform/devices/MCIMX7D/startup/gcc/startup_MCIMX7D_M4.S"
"${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/portable/MemMang/heap_2.c"
- "${ProjDirPath}/../../../FreeRTOSConfig.h"
+ "${ProjDirPath}/../FreeRTOSConfig.h"
"${ProjDirPath}/../sensor_demo_imx7d/main.c"
"${ProjDirPath}/../common/i2c_xfer.c"
"${ProjDirPath}/../common/i2c_xfer.h"
@@ -101,8 +103,12 @@ ADD_EXECUTABLE(sensor_demo
"${ProjDirPath}/../common/fxos8700.h"
"${ProjDirPath}/../common/fxas21002.c"
"${ProjDirPath}/../common/fxas21002.h"
+ "${ProjDirPath}/../../../../../platform/drivers/src/gpio_imx.c"
+ "${ProjDirPath}/../../../../../platform/drivers/inc/gpio_imx.h"
"${ProjDirPath}/../../../../../platform/drivers/src/i2c_imx.c"
"${ProjDirPath}/../../../../../platform/drivers/inc/i2c_imx.h"
+ "${ProjDirPath}/../../../../../platform/drivers/src/rdc_semaphore.c"
+ "${ProjDirPath}/../../../../../platform/drivers/inc/rdc_semaphore.h"
"${ProjDirPath}/../../../../../platform/drivers/src/uart_imx.c"
"${ProjDirPath}/../../../../../platform/drivers/inc/uart_imx.h"
"${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/croutine.h"
@@ -119,6 +125,7 @@ ADD_EXECUTABLE(sensor_demo
"${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/timers.h"
"${ProjDirPath}/../../../../../platform/drivers/inc/ccm_analog_imx7d.h"
"${ProjDirPath}/../../../../../platform/drivers/inc/ccm_imx7d.h"
+ "${ProjDirPath}/../../../../../platform/drivers/inc/lmem.h"
"${ProjDirPath}/../../../../../platform/drivers/inc/rdc.h"
"${ProjDirPath}/../../../../../platform/drivers/inc/rdc_defs_imx7d.h"
"${ProjDirPath}/../../../../../platform/drivers/inc/wdog_imx.h"
@@ -130,6 +137,7 @@ ADD_EXECUTABLE(sensor_demo
"${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/timers.c"
"${ProjDirPath}/../../../../../platform/drivers/src/ccm_analog_imx7d.c"
"${ProjDirPath}/../../../../../platform/drivers/src/ccm_imx7d.c"
+ "${ProjDirPath}/../../../../../platform/drivers/src/lmem.c"
"${ProjDirPath}/../../../../../platform/drivers/src/rdc.c"
"${ProjDirPath}/../../../../../platform/drivers/src/wdog_imx.c"
"${ProjDirPath}/../../../../../platform/utilities/src/debug_console_imx.c"
@@ -145,6 +153,8 @@ ADD_EXECUTABLE(sensor_demo
"${ProjDirPath}/../../../clock_freq.c"
"${ProjDirPath}/../../../clock_freq.h"
"${ProjDirPath}/../hardware_init.c"
+ "${ProjDirPath}/../../../gpio_pins.c"
+ "${ProjDirPath}/../../../gpio_pins.h"
)
SET_TARGET_PROPERTIES(sensor_demo PROPERTIES OUTPUT_NAME "sensor_demo.elf")