From 7a9ee5af20299e0abf46d6bdcd9d19d18d2bb1fe Mon Sep 17 00:00:00 2001 From: "Man, Jianting (Meco)" <920369182@qq.com> Date: Sat, 27 May 2023 18:48:08 -0400 Subject: [bsp][lpc55][gcc] fix the compiling errors when enable C++ (#7575) --- bsp/lpc55sxx/lpc55s69_nxp_evk/board/SConscript | 2 +- bsp/lpc55sxx/lpc55s69_nxp_evk/rtconfig.py | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'bsp') diff --git a/bsp/lpc55sxx/lpc55s69_nxp_evk/board/SConscript b/bsp/lpc55sxx/lpc55s69_nxp_evk/board/SConscript index a296866d9b..d07169faed 100644 --- a/bsp/lpc55sxx/lpc55s69_nxp_evk/board/SConscript +++ b/bsp/lpc55sxx/lpc55s69_nxp_evk/board/SConscript @@ -13,7 +13,7 @@ if GetDepend(['PKG_USING_RW007']): src += ['ports/rw007_port.c'] CPPPATH = [cwd, cwd + '/MCUX_Config/board'] -CPPDEFINES = ['DEBUG'] +CPPDEFINES = ['DEBUG', 'CPU_LPC55S69JBD100_cm33_core0'] group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES=CPPDEFINES) diff --git a/bsp/lpc55sxx/lpc55s69_nxp_evk/rtconfig.py b/bsp/lpc55sxx/lpc55s69_nxp_evk/rtconfig.py index 3e030fa0fc..d26e34f59b 100644 --- a/bsp/lpc55sxx/lpc55s69_nxp_evk/rtconfig.py +++ b/bsp/lpc55sxx/lpc55s69_nxp_evk/rtconfig.py @@ -44,7 +44,7 @@ if PLATFORM == 'gcc': OBJCPY = PREFIX + 'objcopy' STRIP = PREFIX + 'strip' - DEVICE = ' -mcpu=' + CPU + ' -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -DCPU_LPC55S69JBD100_cm33_core0' + DEVICE = ' -mcpu=' + CPU + ' -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections' CFLAGS = DEVICE + ' -Wall -D__FPU_PRESENT -eentry' AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb -D__START=entry' LFLAGS = DEVICE + ' -lm -lgcc -lc' + ' -nostartfiles -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T board/linker_scripts/LPC55S69_cm33_core0_flash.ld' @@ -62,7 +62,9 @@ if PLATFORM == 'gcc': POST_ACTION = OBJCPY + ' -O binary --remove-section=.boot_data --remove-section=.image_vertor_table --remove-section=.ncache $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n' # module setting - CXXFLAGS = ' -Woverloaded-virtual -fno-exceptions -fno-rtti ' + CXXFLAGS = ' -Woverloaded-virtual -fno-exceptions -fno-rtti' + CXXFLAGS += CFLAGS + M_CFLAGS = CFLAGS + ' -mlong-calls -fPIC ' M_CXXFLAGS = CXXFLAGS + ' -mlong-calls -fPIC' M_LFLAGS = DEVICE + CXXFLAGS + ' -Wl,--gc-sections,-z,max-page-size=0x4' +\ @@ -113,8 +115,8 @@ elif PLATFORM == 'armclang': TARGET_EXT = 'axf' DEVICE = ' --cpu Cortex-M33 ' - CFLAGS = ' --target=arm-arm-none-eabi -mcpu=cortex-m33 ' - CFLAGS += ' -mcpu=cortex-m33 ' + CFLAGS = ' --target=arm-arm-none-eabi' + CFLAGS += ' -mcpu=' + CPU CFLAGS += ' -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar ' CFLAGS += ' -gdwarf-3 -ffunction-sections ' AFLAGS = DEVICE + ' --apcs=interwork ' -- cgit v1.3.1