Updated SDK to v2.12.0, build script fixes.

master
imi415 3 months ago
parent c830029602
commit 1d441f5dc6
Signed by: imi415
GPG Key ID: 17F01E106F9F5E0A

@ -65,6 +65,7 @@ set(TARGET_SOURCES
set(TARGET_C_DEFINES
"CPU_LPC55S69JBD100_cm33_core0"
"FFR_INCLUDE=\"fsl_iap_ffr.h\""
"MCUXPRESSO_SDK"
"SERIAL_PORT_TYPE_UART=1"
"__STARTUP_CLEAR_BSS"
@ -84,7 +85,9 @@ set(TARGET_C_INCLUDES
# Shared libraries linked with application
set(TARGET_LIBS
"c"
"m"
"nosys"
)
# Shared library and linker script search paths
@ -97,9 +100,9 @@ set(TARGET_CFLAGS_HARDWARE "-mcpu=cortex-m33 -mthumb -mfloat-abi=hard -mfpu=fpv5
# Conditional flags
# DEBUG
set(CMAKE_C_FLAGS_DEBUG "-DDEBUG -Og -g")
set(CMAKE_CXX_FLAGS_DEBUG "-DDEBUG -Og -g")
set(CMAKE_ASM_FLAGS_DEBUG "-DDEBUG -Og -g")
set(CMAKE_C_FLAGS_DEBUG "-DDEBUG -O -g")
set(CMAKE_CXX_FLAGS_DEBUG "-DDEBUG -O -g")
set(CMAKE_ASM_FLAGS_DEBUG "-DDEBUG -O -g")
# RELEASE
set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG -O2 -flto")
@ -111,7 +114,7 @@ set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-flto")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TARGET_CFLAGS_HARDWARE} -Wall -fno-common -fno-builtin -ffreestanding -fdata-sections -ffunction-sections")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TARGET_CFLAGS_HARDWARE} -Wall -fno-common -fno-builtin -ffreestanding -fdata-sections -ffunction-sections")
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} ${CMAKE_C_FLAGS} -x assembler-with-cpp")
set(CMAKE_EXE_LINKER_FLAGS "-specs=nano.specs -specs=nosys.specs -Wl,--gc-sections -Wl,--print-memory-usage -lc -lm -lnosys ")
set(CMAKE_EXE_LINKER_FLAGS "-specs=nano.specs -specs=nosys.specs -Wl,--gc-sections -Wl,--print-memory-usage -Wl,--no-warn-rwx-segments")
# Shared sources, includes and definitions
@ -126,6 +129,10 @@ link_libraries(${TARGET_LIBS})
add_executable("${CMAKE_PROJECT_NAME}_FLASH.elf" ${TARGET_SOURCES})
target_link_options("${CMAKE_PROJECT_NAME}_FLASH.elf"
PRIVATE "-T${TARGET_LDSCRIPT_FLASH}"
PRIVATE "-Wl,--Map=${CMAKE_PROJECT_NAME}_FLASH.map"
)
set_property(TARGET "${CMAKE_PROJECT_NAME}_FLASH.elf" APPEND
PROPERTY ADDITIONAL_CLEAN_FILES "${CMAKE_PROJECT_NAME}_FLASH.map"
)
add_custom_command(OUTPUT "${CMAKE_PROJECT_NAME}_FLASH.hex"
COMMAND ${CMAKE_OBJCOPY} "-O" "ihex" "${CMAKE_PROJECT_NAME}_FLASH.elf" "${CMAKE_PROJECT_NAME}_FLASH.hex"
@ -137,6 +144,10 @@ add_custom_target("${CMAKE_PROJECT_NAME}_FLASH_HEX" DEPENDS "${CMAKE_PROJECT_NAM
add_executable("${CMAKE_PROJECT_NAME}_RAM.elf" ${TARGET_SOURCES})
target_link_options("${CMAKE_PROJECT_NAME}_RAM.elf"
PRIVATE "-T${TARGET_LDSCRIPT_RAM}"
PRIVATE "-Wl,--Map=${CMAKE_PROJECT_NAME}_RAM.map"
)
set_property(TARGET "${CMAKE_PROJECT_NAME}_FLASH.elf" APPEND
PROPERTY ADDITIONAL_CLEAN_FILES "${CMAKE_PROJECT_NAME}_RAM.map"
)
add_custom_command(OUTPUT "${CMAKE_PROJECT_NAME}_RAM.hex"
COMMAND ${CMAKE_OBJCOPY} "-O" "ihex" "${CMAKE_PROJECT_NAME}_RAM.elf" "${CMAKE_PROJECT_NAME}_RAM.hex"

2
SDK

@ -1 +1 @@
Subproject commit 864dc66c9e6ccee330f2b78fdcd5af930b37b06c
Subproject commit 442622515005ffb9fd32e59d3fbd470f0f67550b
Loading…
Cancel
Save