Convert scripts firmware (#1522)
* convert clean * convert clean * convert clean_compile_two_versions * convert update_version
This commit is contained in:
parent
b31879df52
commit
6c70b7c5e5
|
@ -1,3 +1,8 @@
|
|||
echo Entering firmware\clean.bat
|
||||
rd /s /q .dep
|
||||
rd /s /q build
|
||||
@echo off
|
||||
sh.exe clean.sh || (
|
||||
if exist C:\cygwin64 (
|
||||
C:\cygwin64\bin\sh.exe clean.sh
|
||||
) else (
|
||||
if exist C:\cygwin ( C:\cygwin\bin\sh.exe clean.sh )
|
||||
)
|
||||
)
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
echo "Entering firmware/clean.bat"
|
||||
rm -rf .dep
|
||||
rm -rf build
|
|
@ -1,41 +1,8 @@
|
|||
|
||||
echo Compiler gcc version
|
||||
arm-none-eabi-gcc -v
|
||||
|
||||
rd /s /q deliver
|
||||
mkdir deliver
|
||||
|
||||
call clean.bat
|
||||
echo "TIMESTAMP %date% %time%"
|
||||
set EXTRA_PARAMS=-DDUMMY -DFIRMWARE_ID=\"default_no_assert\" -DEFI_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_STACK_CHECK=FALSE -DCH_DBG_FILL_THREADS=FALSE -DCH_DBG_THREADS_PROFILING=FALSE
|
||||
make -j4 DEBUG_LEVEL_OPT='-O2'
|
||||
set EXTRA_PARAMS=
|
||||
|
||||
rem mv build\rusefi.elf deliver\rusefi_no_asserts.elf
|
||||
mv build\rusefi.bin deliver\rusefi_no_asserts.bin
|
||||
rem this file is needed for DFU generation
|
||||
mv build\rusefi.hex deliver\rusefi_no_asserts.hex
|
||||
echo Release compilation results 1/2
|
||||
echo "TIMESTAMP %date% %time%"
|
||||
ls -l build
|
||||
if not exist deliver/rusefi_no_asserts.hex echo FAILED to compile NO ASSERTS version
|
||||
if not exist deliver/rusefi_no_asserts.hex exit -1
|
||||
|
||||
call clean.bat
|
||||
echo "TIMESTAMP %date% %time%"
|
||||
set EXTRA_PARAMS=-DDUMMY -DFIRMWARE_ID=\"default\"
|
||||
make -j4
|
||||
set EXTRA_PARAMS=
|
||||
|
||||
mv build\rusefi.elf deliver\rusefi.elf
|
||||
rem this file is needed for DFU generation
|
||||
mv build\rusefi.hex deliver\rusefi.hex
|
||||
rem Keeping file in place since hw_test.bat would take it from current location
|
||||
cp build\rusefi.bin deliver\rusefi.bin
|
||||
echo Debug compilation results 2/2
|
||||
echo "TIMESTAMP %date% %time%"
|
||||
ls -l build
|
||||
if not exist deliver/rusefi.hex echo FAILED to compile DEFAULT with DEBUG
|
||||
if not exist deliver/rusefi.hex exit -1
|
||||
|
||||
echo clean_compile_two_versions: Looks good!
|
||||
@echo off
|
||||
sh.exe clean_compile_two_versions.sh || (
|
||||
if exist C:\cygwin64 (
|
||||
C:\cygwin64\bin\sh.exe clean_compile_two_versions.sh
|
||||
) else (
|
||||
if exist C:\cygwin ( C:\cygwin\bin\sh.exe clean_compile_two_versions.sh )
|
||||
)
|
||||
)
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "Compiler gcc version"
|
||||
arm-none-eabi-gcc -v
|
||||
|
||||
rm -rf deliver
|
||||
mkdir deliver
|
||||
|
||||
sh clean.sh
|
||||
echo "TIMESTAMP $(date "+%D %T.%2N")"
|
||||
EXTRA_PARAMS="-DDUMMY -DFIRMWARE_ID=\"default_no_assert\" -DEFI_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_STACK_CHECK=FALSE -DCH_DBG_FILL_THREADS=FALSE -DCH_DBG_THREADS_PROFILING=FALSE"
|
||||
make -j4 DEBUG_LEVEL_OPT='-O2'
|
||||
EXTRA_PARAMS=""
|
||||
|
||||
# mv build\rusefi.elf deliver\rusefi_no_asserts.elf
|
||||
mv build\rusefi.bin deliver\rusefi_no_asserts.bin
|
||||
# this file is needed for DFU generation
|
||||
mv build\rusefi.hex deliver\rusefi_no_asserts.hex
|
||||
echo "Release compilation results 1/2"
|
||||
echo "TIMESTAMP $(date "+%D %T.%2N")"
|
||||
ls -l build
|
||||
[ -e deliver/rusefi_no_asserts.hex ] || (echo "FAILED to compile NO ASSERTS version"; exit 1)
|
||||
|
||||
sh clean.sh
|
||||
echo "TIMESTAMP $(date "+%D %T.%2N")"
|
||||
EXTRA_PARAMS="-DDUMMY -DFIRMWARE_ID=\"default\""
|
||||
make -j4
|
||||
EXTRA_PARAMS=""
|
||||
|
||||
mv build\rusefi.elf deliver\rusefi.elf
|
||||
# this file is needed for DFU generation
|
||||
mv build\rusefi.hex deliver\rusefi.hex
|
||||
# Keeping file in place since hw_test.bat would take it from current location
|
||||
cp build\rusefi.bin deliver\rusefi.bin
|
||||
echo Debug compilation results 2/2
|
||||
echo "TIMESTAMP $(date "+%D %T.%2N")"
|
||||
ls -l build
|
||||
[ -e deliver/rusefi.hex ] || (echo "FAILED to compile DEFAULT with DEBUG"; exit 1)
|
||||
|
||||
echo "clean_compile_two_versions: Looks good!"
|
|
@ -1,6 +1,8 @@
|
|||
rem Let's regemerate 'svnversion.h'
|
||||
rem TODO: handle std err - for example, in case svn needs upgrade
|
||||
|
||||
for /f %%i in ('git rev-parse HEAD') do set git_hash=%%i
|
||||
echo Git hash=%git_hash%
|
||||
java -jar ../java_tools/version2header.jar 10000 https://github.com/rusefi/rusefi %git_hash%
|
||||
@echo off
|
||||
sh.exe update_version.sh || (
|
||||
if exist C:\cygwin64 (
|
||||
C:\cygwin64\bin\sh.exe update_version.sh
|
||||
) else (
|
||||
if exist C:\cygwin ( C:\cygwin\bin\sh.exe update_version.sh )
|
||||
)
|
||||
)
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
# Let's regemerate 'svnversion.h'
|
||||
# TODO: handle std err - for example, in case svn needs upgrade
|
||||
|
||||
GIT_HASH=$('git rev-parse HEAD')
|
||||
echo "Git hash=$GIT_HASH"
|
||||
java -jar ../java_tools/version2header.jar 10000 https://github.com/rusefi/rusefi $GIT_HASH
|
Loading…
Reference in New Issue