diff options
| author | Shicheng Chu <[email protected]> | 2023-05-12 12:01:44 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-05-12 00:01:44 -0400 |
| commit | a650e3e69ccb04cd8ef8021509d7937197d779cd (patch) | |
| tree | 933905fb7a464d25ad5ba6fd6096c8b0e90885c3 | |
| parent | 97b9af70df059ba2384d8c585d849cb192394b84 (diff) | |
[bsp][lpc55sxx]update rtconfig.py to support armclang configurations
| -rw-r--r-- | bsp/lpc55sxx/lpc55s69_nxp_evk/rtconfig.py | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/bsp/lpc55sxx/lpc55s69_nxp_evk/rtconfig.py b/bsp/lpc55sxx/lpc55s69_nxp_evk/rtconfig.py index 647b22a2a6..3e030fa0fc 100644 --- a/bsp/lpc55sxx/lpc55s69_nxp_evk/rtconfig.py +++ b/bsp/lpc55sxx/lpc55s69_nxp_evk/rtconfig.py @@ -103,6 +103,40 @@ elif PLATFORM == 'armcc': POST_ACTION = 'fromelf -z $TARGET' # POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET' +elif PLATFORM == 'armclang': + # toolchains + CC = 'armclang' + CXX = 'armclang' + AS = 'armasm' + AR = 'armar' + LINK = 'armlink' + TARGET_EXT = 'axf' + + DEVICE = ' --cpu Cortex-M33 ' + CFLAGS = ' --target=arm-arm-none-eabi -mcpu=cortex-m33 ' + CFLAGS += ' -mcpu=cortex-m33 ' + CFLAGS += ' -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar ' + CFLAGS += ' -gdwarf-3 -ffunction-sections ' + AFLAGS = DEVICE + ' --apcs=interwork ' + LFLAGS = DEVICE + ' --info sizes --info totals --info unused --info veneers ' + LFLAGS += ' --list rt-thread.map ' + LFLAGS += r' --strict --scatter "board\linker_scripts\link.sct" ' + CFLAGS += ' -I' + EXEC_PATH + '/ARM/ARMCLANG/include' + LFLAGS += ' --libpath=' + EXEC_PATH + '/ARM/ARMCLANG/lib' + + EXEC_PATH += '/ARM/ARMCLANG/bin/' + + if BUILD == 'debug': + CFLAGS += ' -g -O1' # armclang recommend + AFLAGS += ' -g' + else: + CFLAGS += ' -O2' + + CXXFLAGS = CFLAGS + CFLAGS += ' -std=c99' + + POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET' + elif PLATFORM == 'iccarm': CC = 'iccarm' CXX = 'iccarm' |
