diff options
| author | shuobatian <[email protected]> | 2021-01-13 21:47:40 +0800 |
|---|---|---|
| committer | shuobatian <[email protected]> | 2021-01-13 21:47:40 +0800 |
| commit | 7018a5c297ec812c5e7ae2c8ba891c5733bee64a (patch) | |
| tree | b8bdda09af3e534f19ede5b4a77253b6f17c3d4c /bsp/stm32 | |
| parent | 94b5d009d1bae885d4a765b5786b4f34a823269d (diff) | |
修改armclang编译参数,debug优化等级-O1
Diffstat (limited to 'bsp/stm32')
| -rw-r--r-- | bsp/stm32/stm32l475-atk-pandora/rtconfig.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/bsp/stm32/stm32l475-atk-pandora/rtconfig.py b/bsp/stm32/stm32l475-atk-pandora/rtconfig.py index eeabd79bcf..3b9f456d47 100644 --- a/bsp/stm32/stm32l475-atk-pandora/rtconfig.py +++ b/bsp/stm32/stm32l475-atk-pandora/rtconfig.py @@ -104,23 +104,26 @@ elif PLATFORM == 'armclang': TARGET_EXT = 'axf' DEVICE = ' --cpu Cortex-M4.fp ' - CFLAGS = '-c ' + DEVICE + ' --apcs=interwork --c99' + CFLAGS = ' -xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m4 ' + CFLAGS += ' -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 ' + CFLAGS += ' -mfloat-abi=hard -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 --list rt-thread.map --strict --scatter "board\linker_scripts\link.sct"' + LFLAGS = DEVICE + ' --info sizes --info totals --info unused --info veneers ' + LFLAGS += ' --list rt-thread.map ' + LFLAGS += ' --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 -O0' + CFLAGS += ' -g -O1' # armclang recommend AFLAGS += ' -g' else: CFLAGS += ' -O2' - - - CXXFLAGS = CFLAGS - CFLAGS += ' -std=c99' + + CXXFLAGS = CFLAGS POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET' |
