373 lines
7.5 KiB
CMake
373 lines
7.5 KiB
CMake
IF(NOT DEFINED FPU)
|
|
SET(FPU "-mfloat-abi=hard -mfpu=fpv5-d16")
|
|
ENDIF()
|
|
|
|
IF(NOT DEFINED SPECS)
|
|
SET(SPECS "--specs=nano.specs --specs=nosys.specs")
|
|
ENDIF()
|
|
|
|
IF(NOT DEFINED DEBUG_CONSOLE_CONFIG)
|
|
SET(DEBUG_CONSOLE_CONFIG "-DSDK_DEBUGCONSOLE_UART")
|
|
ENDIF()
|
|
|
|
SET(CMAKE_ASM_FLAGS_RELEASE " \
|
|
${CMAKE_ASM_FLAGS_RELEASE} \
|
|
-DNDEBUG \
|
|
-D__STARTUP_CLEAR_BSS \
|
|
-D__STARTUP_INITIALIZE_NONCACHEDATA \
|
|
-mcpu=cortex-m7 \
|
|
-mthumb \
|
|
${FPU} \
|
|
")
|
|
SET(CMAKE_ASM_FLAGS_SDRAM_RELEASE " \
|
|
${CMAKE_ASM_FLAGS_SDRAM_RELEASE} \
|
|
-D__STARTUP_CLEAR_BSS \
|
|
-DNDEBUG \
|
|
-D__STARTUP_INITIALIZE_NONCACHEDATA \
|
|
-mcpu=cortex-m7 \
|
|
-mthumb \
|
|
${FPU} \
|
|
")
|
|
SET(CMAKE_ASM_FLAGS_DEBUG " \
|
|
${CMAKE_ASM_FLAGS_DEBUG} \
|
|
-DDEBUG \
|
|
-D__STARTUP_CLEAR_BSS \
|
|
-D__STARTUP_INITIALIZE_NONCACHEDATA \
|
|
-mcpu=cortex-m7 \
|
|
-mthumb \
|
|
${FPU} \
|
|
")
|
|
SET(CMAKE_ASM_FLAGS_SDRAM_DEBUG " \
|
|
${CMAKE_ASM_FLAGS_SDRAM_DEBUG} \
|
|
-D__STARTUP_CLEAR_BSS \
|
|
-DDEBUG \
|
|
-D__STARTUP_INITIALIZE_NONCACHEDATA \
|
|
-mcpu=cortex-m7 \
|
|
-mthumb \
|
|
${FPU} \
|
|
")
|
|
SET(CMAKE_C_FLAGS_RELEASE " \
|
|
${CMAKE_C_FLAGS_RELEASE} \
|
|
-DLFS_NO_ASSERT \
|
|
-DNDEBUG \
|
|
-DCPU_MIMXRT1052DVL6B \
|
|
-DLFS_NO_INTRINSICS=1 \
|
|
-DMCUXPRESSO_SDK \
|
|
-DMFLASH_FILE_BASEADDR=64487424 \
|
|
-DDEBUG_CONSOLE_RX_ENABLE=0 \
|
|
-DSERIAL_PORT_TYPE_UART=1 \
|
|
-Os \
|
|
-mcpu=cortex-m7 \
|
|
-Wall \
|
|
-mthumb \
|
|
-MMD \
|
|
-MP \
|
|
-fno-common \
|
|
-ffunction-sections \
|
|
-fdata-sections \
|
|
-ffreestanding \
|
|
-fno-builtin \
|
|
-mapcs \
|
|
-std=gnu99 \
|
|
${FPU} \
|
|
${DEBUG_CONSOLE_CONFIG} \
|
|
")
|
|
SET(CMAKE_C_FLAGS_SDRAM_RELEASE " \
|
|
${CMAKE_C_FLAGS_SDRAM_RELEASE} \
|
|
-DLFS_NO_ASSERT \
|
|
-DSKIP_SYSCLK_INIT \
|
|
-DDATA_SECTION_IS_CACHEABLE=1 \
|
|
-DNDEBUG \
|
|
-DCPU_MIMXRT1052DVL6B \
|
|
-DLFS_NO_INTRINSICS=1 \
|
|
-DMCUXPRESSO_SDK \
|
|
-DMFLASH_FILE_BASEADDR=64487424 \
|
|
-DDEBUG_CONSOLE_RX_ENABLE=0 \
|
|
-DSERIAL_PORT_TYPE_UART=1 \
|
|
-Os \
|
|
-mcpu=cortex-m7 \
|
|
-Wall \
|
|
-mthumb \
|
|
-MMD \
|
|
-MP \
|
|
-fno-common \
|
|
-ffunction-sections \
|
|
-fdata-sections \
|
|
-ffreestanding \
|
|
-fno-builtin \
|
|
-mapcs \
|
|
-std=gnu99 \
|
|
${FPU} \
|
|
${DEBUG_CONSOLE_CONFIG} \
|
|
")
|
|
SET(CMAKE_C_FLAGS_DEBUG " \
|
|
${CMAKE_C_FLAGS_DEBUG} \
|
|
-DDEBUG \
|
|
-DCPU_MIMXRT1052DVL6B \
|
|
-DLFS_NO_INTRINSICS=1 \
|
|
-DMCUXPRESSO_SDK \
|
|
-DMFLASH_FILE_BASEADDR=64487424 \
|
|
-DDEBUG_CONSOLE_RX_ENABLE=0 \
|
|
-DSERIAL_PORT_TYPE_UART=1 \
|
|
-g \
|
|
-O0 \
|
|
-mcpu=cortex-m7 \
|
|
-Wall \
|
|
-mthumb \
|
|
-MMD \
|
|
-MP \
|
|
-fno-common \
|
|
-ffunction-sections \
|
|
-fdata-sections \
|
|
-ffreestanding \
|
|
-fno-builtin \
|
|
-mapcs \
|
|
-std=gnu99 \
|
|
${FPU} \
|
|
${DEBUG_CONSOLE_CONFIG} \
|
|
")
|
|
SET(CMAKE_C_FLAGS_SDRAM_DEBUG " \
|
|
${CMAKE_C_FLAGS_SDRAM_DEBUG} \
|
|
-DSKIP_SYSCLK_INIT \
|
|
-DDATA_SECTION_IS_CACHEABLE=1 \
|
|
-DDEBUG \
|
|
-DCPU_MIMXRT1052DVL6B \
|
|
-DLFS_NO_INTRINSICS=1 \
|
|
-DMCUXPRESSO_SDK \
|
|
-DMFLASH_FILE_BASEADDR=64487424 \
|
|
-DDEBUG_CONSOLE_RX_ENABLE=0 \
|
|
-DSERIAL_PORT_TYPE_UART=1 \
|
|
-g \
|
|
-O0 \
|
|
-mcpu=cortex-m7 \
|
|
-Wall \
|
|
-mthumb \
|
|
-MMD \
|
|
-MP \
|
|
-fno-common \
|
|
-ffunction-sections \
|
|
-fdata-sections \
|
|
-ffreestanding \
|
|
-fno-builtin \
|
|
-mapcs \
|
|
-std=gnu99 \
|
|
${FPU} \
|
|
${DEBUG_CONSOLE_CONFIG} \
|
|
")
|
|
SET(CMAKE_CXX_FLAGS_RELEASE " \
|
|
${CMAKE_CXX_FLAGS_RELEASE} \
|
|
-DNDEBUG \
|
|
-DCPU_MIMXRT1052DVL6B \
|
|
-DMCUXPRESSO_SDK \
|
|
-DSERIAL_PORT_TYPE_UART=1 \
|
|
-Os \
|
|
-mcpu=cortex-m7 \
|
|
-Wall \
|
|
-mthumb \
|
|
-MMD \
|
|
-MP \
|
|
-fno-common \
|
|
-ffunction-sections \
|
|
-fdata-sections \
|
|
-ffreestanding \
|
|
-fno-builtin \
|
|
-mapcs \
|
|
-fno-rtti \
|
|
-fno-exceptions \
|
|
${FPU} \
|
|
${DEBUG_CONSOLE_CONFIG} \
|
|
")
|
|
SET(CMAKE_CXX_FLAGS_SDRAM_RELEASE " \
|
|
${CMAKE_CXX_FLAGS_SDRAM_RELEASE} \
|
|
-DNDEBUG \
|
|
-DCPU_MIMXRT1052DVL6B \
|
|
-DMCUXPRESSO_SDK \
|
|
-DSERIAL_PORT_TYPE_UART=1 \
|
|
-Os \
|
|
-mcpu=cortex-m7 \
|
|
-Wall \
|
|
-mthumb \
|
|
-MMD \
|
|
-MP \
|
|
-fno-common \
|
|
-ffunction-sections \
|
|
-fdata-sections \
|
|
-ffreestanding \
|
|
-fno-builtin \
|
|
-mapcs \
|
|
-fno-rtti \
|
|
-fno-exceptions \
|
|
${FPU} \
|
|
${DEBUG_CONSOLE_CONFIG} \
|
|
")
|
|
SET(CMAKE_CXX_FLAGS_DEBUG " \
|
|
${CMAKE_CXX_FLAGS_DEBUG} \
|
|
-DDEBUG \
|
|
-DCPU_MIMXRT1052DVL6B \
|
|
-DMCUXPRESSO_SDK \
|
|
-DSERIAL_PORT_TYPE_UART=1 \
|
|
-g \
|
|
-O0 \
|
|
-mcpu=cortex-m7 \
|
|
-Wall \
|
|
-mthumb \
|
|
-MMD \
|
|
-MP \
|
|
-fno-common \
|
|
-ffunction-sections \
|
|
-fdata-sections \
|
|
-ffreestanding \
|
|
-fno-builtin \
|
|
-mapcs \
|
|
-fno-rtti \
|
|
-fno-exceptions \
|
|
${FPU} \
|
|
${DEBUG_CONSOLE_CONFIG} \
|
|
")
|
|
SET(CMAKE_CXX_FLAGS_SDRAM_DEBUG " \
|
|
${CMAKE_CXX_FLAGS_SDRAM_DEBUG} \
|
|
-DDEBUG \
|
|
-DCPU_MIMXRT1052DVL6B \
|
|
-DMCUXPRESSO_SDK \
|
|
-DSERIAL_PORT_TYPE_UART=1 \
|
|
-g \
|
|
-O0 \
|
|
-mcpu=cortex-m7 \
|
|
-Wall \
|
|
-mthumb \
|
|
-MMD \
|
|
-MP \
|
|
-fno-common \
|
|
-ffunction-sections \
|
|
-fdata-sections \
|
|
-ffreestanding \
|
|
-fno-builtin \
|
|
-mapcs \
|
|
-fno-rtti \
|
|
-fno-exceptions \
|
|
${FPU} \
|
|
${DEBUG_CONSOLE_CONFIG} \
|
|
")
|
|
SET(CMAKE_EXE_LINKER_FLAGS_RELEASE " \
|
|
${CMAKE_EXE_LINKER_FLAGS_RELEASE} \
|
|
-mcpu=cortex-m7 \
|
|
-Wall \
|
|
-fno-common \
|
|
-ffunction-sections \
|
|
-fdata-sections \
|
|
-ffreestanding \
|
|
-fno-builtin \
|
|
-mthumb \
|
|
-mapcs \
|
|
-Xlinker \
|
|
--gc-sections \
|
|
-Xlinker \
|
|
-static \
|
|
-Xlinker \
|
|
-z \
|
|
-Xlinker \
|
|
muldefs \
|
|
-Xlinker \
|
|
-Map=output.map \
|
|
-Wl,--print-memory-usage \
|
|
-Xlinker \
|
|
--defsym=__stack_size__=0x1000 \
|
|
-Xlinker \
|
|
--defsym=__heap_size__=0x1000 \
|
|
${FPU} \
|
|
${SPECS} \
|
|
-T\"${ProjDirPath}/MIMXRT1052xxxxx_ram.ld\" -static \
|
|
")
|
|
SET(CMAKE_EXE_LINKER_FLAGS_SDRAM_RELEASE " \
|
|
${CMAKE_EXE_LINKER_FLAGS_SDRAM_RELEASE} \
|
|
-mcpu=cortex-m7 \
|
|
-Wall \
|
|
-fno-common \
|
|
-ffunction-sections \
|
|
-fdata-sections \
|
|
-ffreestanding \
|
|
-fno-builtin \
|
|
-mthumb \
|
|
-mapcs \
|
|
-Xlinker \
|
|
--gc-sections \
|
|
-Xlinker \
|
|
-static \
|
|
-Xlinker \
|
|
-z \
|
|
-Xlinker \
|
|
muldefs \
|
|
-Xlinker \
|
|
-Map=output.map \
|
|
-Wl,--print-memory-usage \
|
|
-Xlinker \
|
|
--defsym=__stack_size__=0x1000 \
|
|
-Xlinker \
|
|
--defsym=__heap_size__=0x1000 \
|
|
${FPU} \
|
|
${SPECS} \
|
|
-T\"${ProjDirPath}/MIMXRT1052xxxxx_sdram.ld\" -static \
|
|
")
|
|
SET(CMAKE_EXE_LINKER_FLAGS_DEBUG " \
|
|
${CMAKE_EXE_LINKER_FLAGS_DEBUG} \
|
|
-g \
|
|
-mcpu=cortex-m7 \
|
|
-Wall \
|
|
-fno-common \
|
|
-ffunction-sections \
|
|
-fdata-sections \
|
|
-ffreestanding \
|
|
-fno-builtin \
|
|
-mthumb \
|
|
-mapcs \
|
|
-Xlinker \
|
|
--gc-sections \
|
|
-Xlinker \
|
|
-static \
|
|
-Xlinker \
|
|
-z \
|
|
-Xlinker \
|
|
muldefs \
|
|
-Xlinker \
|
|
-Map=output.map \
|
|
-Wl,--print-memory-usage \
|
|
-Xlinker \
|
|
--defsym=__stack_size__=0x1000 \
|
|
-Xlinker \
|
|
--defsym=__heap_size__=0x1000 \
|
|
${FPU} \
|
|
${SPECS} \
|
|
-T\"${ProjDirPath}/MIMXRT1052xxxxx_ram.ld\" -static \
|
|
")
|
|
SET(CMAKE_EXE_LINKER_FLAGS_SDRAM_DEBUG " \
|
|
${CMAKE_EXE_LINKER_FLAGS_SDRAM_DEBUG} \
|
|
-g \
|
|
-mcpu=cortex-m7 \
|
|
-Wall \
|
|
-fno-common \
|
|
-ffunction-sections \
|
|
-fdata-sections \
|
|
-ffreestanding \
|
|
-fno-builtin \
|
|
-mthumb \
|
|
-mapcs \
|
|
-Xlinker \
|
|
--gc-sections \
|
|
-Xlinker \
|
|
-static \
|
|
-Xlinker \
|
|
-z \
|
|
-Xlinker \
|
|
muldefs \
|
|
-Xlinker \
|
|
-Map=output.map \
|
|
-Wl,--print-memory-usage \
|
|
-Xlinker \
|
|
--defsym=__stack_size__=0x1000 \
|
|
-Xlinker \
|
|
--defsym=__heap_size__=0x1000 \
|
|
${FPU} \
|
|
${SPECS} \
|
|
-T\"${ProjDirPath}/MIMXRT1052xxxxx_sdram.ld\" -static \
|
|
")
|