summaryrefslogtreecommitdiff
path: root/bsp
diff options
context:
space:
mode:
authorMan, Jianting (Meco) <[email protected]>2023-05-27 18:48:08 -0400
committerGitHub <[email protected]>2023-05-28 06:48:08 +0800
commit7a9ee5af20299e0abf46d6bdcd9d19d18d2bb1fe (patch)
treeb99b85aab142cf9f48149bacf71b60b96a89028a /bsp
parenta0a3b3cf87c230b95271a7d635b0218947e859b8 (diff)
[bsp][lpc55][gcc] fix the compiling errors when enable C++ (#7575)
Diffstat (limited to 'bsp')
-rw-r--r--bsp/lpc55sxx/lpc55s69_nxp_evk/board/SConscript2
-rw-r--r--bsp/lpc55sxx/lpc55s69_nxp_evk/rtconfig.py10
2 files changed, 7 insertions, 5 deletions
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 '