Skip to content

Commit ad256db

Browse files
imi415Rbb666
authored andcommitted
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.
1 parent 5d4f819 commit ad256db

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

bsp/nxp/mcx/mcxc/frdm-mcxc444/board/linker_scripts/MCXC444_flash.ld

+21
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,27 @@ SECTIONS
7070
. = ALIGN(4);
7171
} > m_text
7272

73+
.rtt_const_tables :
74+
{
75+
/* section information for finsh shell */
76+
. = ALIGN(4);
77+
__fsymtab_start = .;
78+
KEEP(*(FSymTab))
79+
__fsymtab_end = .;
80+
81+
. = ALIGN(4);
82+
__vsymtab_start = .;
83+
KEEP(*(VSymTab))
84+
__vsymtab_end = .;
85+
86+
/* section information for initial. */
87+
. = ALIGN(4);
88+
__rt_init_start = .;
89+
KEEP(*(SORT(.rti_fn*)))
90+
__rt_init_end = .;
91+
92+
} > m_text
93+
7394
.ARM.extab :
7495
{
7596
*(.ARM.extab* .gnu.linkonce.armextab.*)

bsp/nxp/mcx/mcxc/frdm-mcxc444/rtconfig.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@
4444
OBJCPY = PREFIX + 'objcopy'
4545
STRIP = PREFIX + 'strip'
4646

47-
DEVICE = ' -mcpu=' + CPU + ' -mthumb -mfpu=fpv5-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
48-
CFLAGS = DEVICE + ' -Wall -D__FPU_PRESENT'
47+
DEVICE = ' -mcpu=' + CPU + ' -mthumb -ffunction-sections -fdata-sections'
48+
CFLAGS = DEVICE + ' -Wall'
4949
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -D__START=entry -D__STARTUP_CLEAR_BSS'
50-
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'
50+
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'
5151

5252
CPATH = ''
5353
LPATH = ''

0 commit comments

Comments
 (0)