make tup build quieter and work on windows

This commit is contained in:
Samuel Sadok
2018-02-25 20:45:24 -08:00
parent 0fcb80fcb1
commit 19c3967a0e
3 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
View File
@@ -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