瀏覽代碼

[tools] llvm-arm reduce code size.

guo 2 年之前
父節點
當前提交
606ad9272b
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      bsp/stm32/stm32l475-atk-pandora/rtconfig.py

+ 1 - 0
bsp/stm32/stm32l475-atk-pandora/rtconfig.py

@@ -192,6 +192,7 @@ elif PLATFORM == 'llvm-arm':
     OBJDUMP = PREFIX + 'objdump'
     OBJCPY = PREFIX + 'objcopy'
     DEVICE = ' --config armv7em_hard_fpv4_sp_d16.cfg'
+    DEVICE += ' -ffunction-sections -fdata-sections'
     CFLAGS = DEVICE
     CFLAGS += ' -mfloat-abi=hard -march=armv7em -mfpu=fpv4-sp-d16'
     AFLAGS = ' -c' + DEVICE + ' -Wa,-mimplicit-it=thumb ' ## -x assembler-with-cpp