summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYilin Sun <[email protected]>2024-09-03 14:03:35 +0800
committerRbb666 <[email protected]>2024-09-03 15:22:05 +0800
commitad256db2c0dc06bbae0535c6600e3a40671ba665 (patch)
tree79d3f091fe8b208a6ca3007d016e2c132301cdc3
parent5d4f8193aa2b6e05ec8e7a9d1a70205455c59157 (diff)
bsp: nxp/mcx/mcxc: FRDM-MCXC444: Fix GCC build suport.
This patch fixes GCC build support for FRDM-MCXC444. * Updated compiler flags to Cortex-M0 without FPU. * Updated linker script to add RT-Thread const tables.
-rw-r--r--bsp/nxp/mcx/mcxc/frdm-mcxc444/board/linker_scripts/MCXC444_flash.ld21
-rw-r--r--bsp/nxp/mcx/mcxc/frdm-mcxc444/rtconfig.py6
2 files changed, 24 insertions, 3 deletions
diff --git a/bsp/nxp/mcx/mcxc/frdm-mcxc444/board/linker_scripts/MCXC444_flash.ld b/bsp/nxp/mcx/mcxc/frdm-mcxc444/board/linker_scripts/MCXC444_flash.ld
index 8abb7faed5..6490b5ea38 100644
--- a/bsp/nxp/mcx/mcxc/frdm-mcxc444/board/linker_scripts/MCXC444_flash.ld
+++ b/bsp/nxp/mcx/mcxc/frdm-mcxc444/board/linker_scripts/MCXC444_flash.ld
@@ -70,6 +70,27 @@ SECTIONS
. = ALIGN(4);
} > m_text
+ .rtt_const_tables :
+ {
+ /* section information for finsh shell */
+ . = ALIGN(4);
+ __fsymtab_start = .;
+ KEEP(*(FSymTab))
+ __fsymtab_end = .;
+
+ . = ALIGN(4);
+ __vsymtab_start = .;
+ KEEP(*(VSymTab))
+ __vsymtab_end = .;
+
+ /* section information for initial. */
+ . = ALIGN(4);
+ __rt_init_start = .;
+ KEEP(*(SORT(.rti_fn*)))
+ __rt_init_end = .;
+
+ } > m_text
+
.ARM.extab :
{
*(.ARM.extab* .gnu.linkonce.armextab.*)
diff --git a/bsp/nxp/mcx/mcxc/frdm-mcxc444/rtconfig.py b/bsp/nxp/mcx/mcxc/frdm-mcxc444/rtconfig.py
index b86bc760dd..f719ab0477 100644
--- a/bsp/nxp/mcx/mcxc/frdm-mcxc444/rtconfig.py
+++ b/bsp/nxp/mcx/mcxc/frdm-mcxc444/rtconfig.py
@@ -44,10 +44,10 @@ if PLATFORM == 'gcc':
OBJCPY = PREFIX + 'objcopy'
STRIP = PREFIX + 'strip'
- DEVICE = ' -mcpu=' + CPU + ' -mthumb -mfpu=fpv5-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
- CFLAGS = DEVICE + ' -Wall -D__FPU_PRESENT'
+ DEVICE = ' -mcpu=' + CPU + ' -mthumb -ffunction-sections -fdata-sections'
+ CFLAGS = DEVICE + ' -Wall'
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -D__START=entry -D__STARTUP_CLEAR_BSS'
- LFLAGS = DEVICE + ' -specs=nano.specs -specs=nosys.specs -Wl,--defsym=__heap_size__=0x10000,--gc-sections,-Map=rtthread.map,--print-memory-usage -Tboard/linker_scripts/MCXC444_flash.ld'
+ LFLAGS = DEVICE + ' -specs=nano.specs -specs=nosys.specs -Wl,--defsym=__heap_size__=0x4000,--gc-sections,-Map=rtthread.map,--print-memory-usage -Tboard/linker_scripts/MCXC444_flash.ld'
CPATH = ''
LPATH = ''