Skip to content

Commit

Permalink
bsp: nxp/mcx/mcxc: FRDM-MCXC444: Fix GCC build suport.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
imi415 authored and Rbb666 committed Sep 3, 2024
1 parent 5d4f819 commit ad256db
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.*)
Expand Down
6 changes: 3 additions & 3 deletions bsp/nxp/mcx/mcxc/frdm-mcxc444/rtconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
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 = ''
Expand Down

0 comments on commit ad256db

Please sign in to comment.