mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-21 23:44:48 +08:00
make tup build quieter and work on windows
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@ BUILD_DIR = build
|
||||
FIRMWARE = $(BUILD_DIR)/ODriveFirmware.elf
|
||||
|
||||
all:
|
||||
tup
|
||||
@tup --quiet
|
||||
|
||||
flash: all
|
||||
openocd -f interface/stlink-v2.cfg -f target/stm32f4x.cfg -c init -c reset\ halt -c flash\ write_image\ erase\ $(FIRMWARE) -c reset\ run -c exit
|
||||
|
||||
@@ -62,7 +62,7 @@ build{
|
||||
toolchains={toolchain},
|
||||
--toolchains={LLVMToolchain('x86_64', {'-Ofast'}, {'-flto'})},
|
||||
packages={'stm_platform'},
|
||||
sources={
|
||||
sources={
|
||||
'MotorControl/utils.c',
|
||||
'MotorControl/legacy_commands.c',
|
||||
'MotorControl/low_level.c',
|
||||
|
||||
+4
-2
@@ -88,10 +88,12 @@ function GCCToolchain(prefix, builddir, compiler_flags, linker_flags)
|
||||
command=prefix..'g++ %f '..
|
||||
tostring(linker_flags)..' '..
|
||||
'-Wl,-Map=%O.map'..
|
||||
' -o %o; '..
|
||||
prefix..'size %o',
|
||||
' -o %o',
|
||||
outputs={output_name..'.elf', extra_outputs={output_name..'.map'}}
|
||||
}
|
||||
-- display the size
|
||||
tup.frule{inputs=output_name..'.elf', command=prefix..'size %f'}
|
||||
-- create *.hex and *.bin output formats
|
||||
tup.frule{inputs={output_name..'.elf'}, command=prefix..'objcopy -O ihex %f %o', outputs={output_name..'.hex'}}
|
||||
tup.frule{inputs={output_name..'.elf'}, command=prefix..'objcopy -O binary -S %f %o', outputs={output_name..'.bin'}}
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user