summaryrefslogtreecommitdiff
path: root/bsp
diff options
context:
space:
mode:
Diffstat (limited to 'bsp')
-rw-r--r--bsp/stm32/stm32f412-st-nucleo/rtconfig.py34
-rw-r--r--bsp/stm32/stm32h750-artpi-h750/rtconfig.py34
2 files changed, 68 insertions, 0 deletions
diff --git a/bsp/stm32/stm32f412-st-nucleo/rtconfig.py b/bsp/stm32/stm32f412-st-nucleo/rtconfig.py
index 573c1f7492..9193d4a1d5 100644
--- a/bsp/stm32/stm32f412-st-nucleo/rtconfig.py
+++ b/bsp/stm32/stm32f412-st-nucleo/rtconfig.py
@@ -94,6 +94,40 @@ elif PLATFORM == 'armcc':
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-M4.fp '
+ CFLAGS = ' --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 '
+ 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 == 'iar':
# toolchains
CC = 'iccarm'
diff --git a/bsp/stm32/stm32h750-artpi-h750/rtconfig.py b/bsp/stm32/stm32h750-artpi-h750/rtconfig.py
index 2c9cbdd792..13a0ebbdb9 100644
--- a/bsp/stm32/stm32h750-artpi-h750/rtconfig.py
+++ b/bsp/stm32/stm32h750-artpi-h750/rtconfig.py
@@ -94,6 +94,40 @@ elif PLATFORM == 'armcc':
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-M7.fp.sp '
+ CFLAGS = ' --target=arm-arm-none-eabi -mcpu=cortex-M7 '
+ CFLAGS += ' -mcpu=cortex-M7 -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 '
+ 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 == 'iar':
# toolchains
CC = 'iccarm'