rusefi-1/firmware/compile_and_program.bat

57 lines
1.3 KiB
Batchfile
Raw Normal View History

2015-07-10 06:01:56 -07:00
@echo off
rm -rf .dep/
rm -rf build\rusefi.hex
rm -rf build\rusefi.bin
2017-03-24 08:34:29 -07:00
2017-04-04 18:42:41 -07:00
git submodule update --init
2017-03-30 16:55:26 -07:00
rem PS:
rem git submodule update --recursive --remote
2017-03-24 08:34:29 -07:00
rem magic once needed
2015-07-10 06:01:56 -07:00
call update_version.bat
echo Starting compilation
rem the important piece (pass external args if needed)
make %1 %2 %3
2015-07-10 06:01:56 -07:00
rem cd build
rem if not exist rusefi.hex echo "compilation failed"
rem if not exist rusefi.hex exit -1
rem cd ..
2017-03-12 14:30:02 -07:00
if errorlevel 1 echo make compilation failed
if errorlevel 1 exit -1
2015-07-10 06:01:56 -07:00
echo Build complete success.
rem svn info > ../firmware_binary/version.txt
rem cp config/features.h ../firmware_binary
rem cp build/rusefi.hex ../firmware_binary
rem cp build/rusefi.elf ../firmware_binary
rem cp tunerstudio/rusefi.ini ../firmware_binary
rem cd ../firmware_binary
rem del firmaware_binary.zip
rem 7z a firmaware_binary.zip rusefi.hex rusefi.ini features.h flash.bat
rem cd ../firmware
cd build
rem Generate human-readable version of the .map memory usage report
2017-03-19 15:48:50 -07:00
java -jar ../../java_tools/gcc_map_reader.jar rusefi.map > ../rusefi_ram_report.txt
2015-07-10 06:01:56 -07:00
cd ..
2017-03-12 14:30:02 -07:00
echo Looking at size
2015-07-10 06:01:56 -07:00
arm-none-eabi-size --format=berkeley "build\rusefi.elf"
2017-03-12 14:30:02 -07:00
echo Compiler version
2015-07-10 06:01:56 -07:00
arm-none-eabi-gcc -v
2017-03-12 14:30:02 -07:00
echo Have the file, let's program the board right away
2017-02-16 20:08:04 -08:00
call flash_openocd
2015-07-10 06:01:56 -07:00
2017-03-12 14:30:02 -07:00
echo Done flashing
2015-07-10 06:01:56 -07:00