mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-02-06 15:11:52 +08:00
Add CONFIG_ARM_COMPILER_PATH
This commit is contained in:
committed by
Paul Guenette
parent
9a754031b3
commit
5c039a9761
@@ -328,9 +328,16 @@ boards = {
|
||||
|
||||
-- Toolchain setup -------------------------------------------------------------
|
||||
|
||||
CC='arm-none-eabi-gcc -std=c99'
|
||||
CXX='arm-none-eabi-g++ -std=c++17 -Wno-register'
|
||||
LINKER='arm-none-eabi-g++'
|
||||
CCPATH = tup.getconfig('ARM_COMPILER_PATH')
|
||||
if CCPATH == "" then
|
||||
CCPATH=''
|
||||
else
|
||||
CCPATH = CCPATH..'/'
|
||||
end
|
||||
|
||||
CC=CCPATH..'arm-none-eabi-gcc -std=c99'
|
||||
CXX=CCPATH..'arm-none-eabi-g++ -std=c++17 -Wno-register'
|
||||
LINKER=CCPATH..'arm-none-eabi-g++'
|
||||
|
||||
-- C-specific flags
|
||||
CFLAGS += '-D__weak="__attribute__((weak))"'
|
||||
@@ -440,13 +447,13 @@ tup.frule{
|
||||
outputs={'build/ODriveFirmware.elf', extra_outputs={'build/ODriveFirmware.map'}}
|
||||
}
|
||||
-- display the size
|
||||
tup.frule{inputs={'build/ODriveFirmware.elf'}, command='arm-none-eabi-size %f'}
|
||||
tup.frule{inputs={'build/ODriveFirmware.elf'}, command=CCPATH..'arm-none-eabi-size %f'}
|
||||
-- create *.hex and *.bin output formats
|
||||
tup.frule{inputs={'build/ODriveFirmware.elf'}, command='arm-none-eabi-objcopy -O ihex %f %o', outputs={'build/ODriveFirmware.hex'}}
|
||||
tup.frule{inputs={'build/ODriveFirmware.elf'}, command='arm-none-eabi-objcopy -O binary -S %f %o', outputs={'build/ODriveFirmware.bin'}}
|
||||
tup.frule{inputs={'build/ODriveFirmware.elf'}, command=CCPATH..'arm-none-eabi-objcopy -O ihex %f %o', outputs={'build/ODriveFirmware.hex'}}
|
||||
tup.frule{inputs={'build/ODriveFirmware.elf'}, command=CCPATH..'arm-none-eabi-objcopy -O binary -S %f %o', outputs={'build/ODriveFirmware.bin'}}
|
||||
|
||||
if tup.getconfig('ENABLE_DISASM') == 'true' then
|
||||
tup.frule{inputs={'build/ODriveFirmware.elf'}, command='arm-none-eabi-objdump %f -dSC > %o', outputs={'build/ODriveFirmware.asm'}}
|
||||
tup.frule{inputs={'build/ODriveFirmware.elf'}, command=CCPATH..'arm-none-eabi-objdump %f -dSC > %o', outputs={'build/ODriveFirmware.asm'}}
|
||||
end
|
||||
|
||||
if tup.getconfig('DOCTEST') == 'true' then
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
# Copy this file to tup.config and adapt it to your needs
|
||||
# make sure this fits your board
|
||||
#CONFIG_BOARD_VERSION=v3.5-24V
|
||||
#CONFIG_BOARD_VERSION=v3.6-56V
|
||||
CONFIG_DEBUG=false
|
||||
CONFIG_DOCTEST=false
|
||||
CONFIG_USE_LTO=false
|
||||
|
||||
# Path to the ARM compiler /bin folder (optional)
|
||||
#CONFIG_ARM_COMPILER_PATH=C:/Tools/ARM/9-2019-q4-major/bin
|
||||
|
||||
# Uncomment this to error on compilation warnings
|
||||
#CONFIG_STRICT=true
|
||||
|
||||
Reference in New Issue
Block a user