Hi @jingpan !
The paths for the projects related too each other are
CommonFolder/Application/ (contains Application project)
CommonFolder/Application/Debug/ (contains files generated when building in debug)
CommonFolder/Application/Release/ (contains files generated when building in debug)
CommonFolder/Application/Sources/ (contains application source files)
CommonFolder/McuxpressoSdkLibrary/ (contains MCUXpresso SDK project)
CommonFolder/McuxpressoSdkLibrary/Debug/ (contains files generated when building in debug)
CommonFolder/McuxpressoSdkLibrary/Release/ (contains files generated when building in release)
CommonFolder/McuxpressoSdkLibrary/*/ (folders generated from SDK - e.g. board, CMSIS, CMSIS_driver, component, etc.)
The executable is executed at default addresses (no configuration were changed related to that).
The only difference between debug and release should be the defines and should be the same for all projects.
Comparing all options, I see this difference:
Debug Release
-DDEBUG -DNDEBUG
-O0 -Os
-g3 -g
-fmerge-constants
All options for Application project.
Debug (I replaced spaces by line-change to ease reading:
-std=c17
-DCPU_MIMXRT1024CAG4A
-DCPU_MIMXRT1024CAG4A_cm7
-DSDK_OS_BAREMETAL
-DSERIAL_PORT_TYPE_UART=1
-DSDK_DEBUGCONSOLE=1
-DSDK_DEBUGCONSOLE_UART
-DXIP_EXTERNAL_FLASH=1
-DXIP_BOOT_HEADER_ENABLE=1
-D__MCUXPRESSO
-D__USE_CMSIS
-DDEBUG
-D__NEWLIB__
-I"<abolutePath>\Bootloader\Bootloader\Sources"
-I"<abolutePath>\Bootloader\McuxpressoSdkLibrary\board"
-I"<abolutePath>\Bootloader\McuxpressoSdkLibrary\CMSIS"
-I"<abolutePath>\Bootloader\McuxpressoSdkLibrary\CMSIS_driver"
-I"<abolutePath>\Bootloader\McuxpressoSdkLibrary\component\lists"
-I"<abolutePath>\Bootloader\McuxpressoSdkLibrary\component\serial_manager"
-I"<abolutePath>\Bootloader\McuxpressoSdkLibrary\component\uart"
-I"<abolutePath>\Bootloader\McuxpressoSdkLibrary\device"
-I"<abolutePath>\Bootloader\McuxpressoSdkLibrary\drivers"
-I"<abolutePath>\Bootloader\McuxpressoSdkLibrary\utilities"
-I"<abolutePath>\Bootloader\McuxpressoSdkLibrary\xip"
-O0
-fno-common
-g3
-Wall
-c
-ffunction-sections
-fdata-sections
-ffreestanding
-fno-builtin
-fmerge-constants
-fmacro-prefix-map="$(<D)/"=
-mcpu=cortex-m7
-mfpu=fpv5-d16
-mfloat-abi=hard
-mthumb
-D__NEWLIB__
-fstack-usage
-specs=nano.specs
Release:
-std=c17
-DCPU_MIMXRT1024CAG4A
-DCPU_MIMXRT1024CAG4A_cm7
-DSDK_OS_BAREMETAL
-DSERIAL_PORT_TYPE_UART=1
-DSDK_DEBUGCONSOLE=1
-DSDK_DEBUGCONSOLE_UART
-DXIP_EXTERNAL_FLASH=1
-DXIP_BOOT_HEADER_ENABLE=1
-D__MCUXPRESSO
-D__USE_CMSIS
-DNDEBUG
-D__NEWLIB__
-I"<abolutePath>\Bootloader\Bootloader\Sources"
-I"<abolutePath>\Bootloader\McuxpressoSdkLibrary\board"
-I"<abolutePath>\Bootloader\McuxpressoSdkLibrary\CMSIS"
-I"<abolutePath>\Bootloader\McuxpressoSdkLibrary\CMSIS_driver"
-I"<abolutePath>\Bootloader\McuxpressoSdkLibrary\component\lists"
-I"<abolutePath>\Bootloader\McuxpressoSdkLibrary\component\serial_manager"
-I"<abolutePath>\Bootloader\McuxpressoSdkLibrary\component\uart"
-I"<abolutePath>\Bootloader\McuxpressoSdkLibrary\device"
-I"<abolutePath>\Bootloader\McuxpressoSdkLibrary\drivers"
-I"<abolutePath>\Bootloader\McuxpressoSdkLibrary\utilities"
-I"<abolutePath>\Bootloader\McuxpressoSdkLibrary\xip"
-Os
-fno-common
-g
-Wall
-c
-ffunction-sections
-fdata-sections
-ffreestanding
-fno-builtin
-fmacro-prefix-map="$(<D)/"=
-mcpu=cortex-m7
-mfpu=fpv5-d16
-mfloat-abi=hard
-mthumb
-D__NEWLIB__
-fstack-usage
-specs=nano.specs
I hope this helps,
Thanks!