fail to generate F7 DFU files #696
This commit is contained in:
parent
9001a78296
commit
6f57a7f330
|
@ -0,0 +1,9 @@
|
|||
set script_name=common_make.bat
|
||||
echo Entering %script_name%
|
||||
|
||||
rem todo: start using env variable for number of threads or for '-r'
|
||||
maje -j4 -r
|
||||
if not exist build/rusefi.hex echo FAILED to compile by %script_name%
|
||||
if not exist build/rusefi.hex exit -1
|
||||
|
||||
../misc/encedo_hex2dfu/hex2dfu.exe -i build/rusefi.hex -o build/rusefi.dfu
|
|
@ -14,7 +14,6 @@ set EXTRA_PARAMS=-DDUMMY -DSTM32F746xx ^
|
|||
-DEFI_FATAL_ERROR_PIN=GPIOB_14 ^
|
||||
-DRAM_UNUSED_SIZE=10 -DCCM_UNUSED_SIZE=10
|
||||
set DEBUG_LEVEL_OPT="-O2"
|
||||
make -j4
|
||||
..\misc\hex2dfu\HEX2DFU.exe build/rusefi.hex -out build/rusefi.dfu
|
||||
call config/boards/common_make.bat
|
||||
|
||||
call config/boards/clean_env_variables.bat
|
|
@ -15,10 +15,7 @@ set EXTRA_PARAMS=-DDUMMY -DSTM32F767xx ^
|
|||
-DEFI_ENABLE_ASSERTS=FALSE ^
|
||||
-DCH_DBG_ENABLE_CHECKS=FALSE -DCH_DBG_ENABLE_TRACE=FALSE -DCH_DBG_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_STACK_CHECK=FALSE -DCH_DBG_FILL_THREADS=FALSE -DCH_DBG_THREADS_PROFILING=FALSE
|
||||
set DEBUG_LEVEL_OPT="-O2"
|
||||
make -j4
|
||||
if not exist build/rusefi.hex echo FAILED to compile nucleo_f767
|
||||
if not exist build/rusefi.hex exit -1
|
||||
|
||||
..\misc\hex2dfu\HEX2DFU.exe build/rusefi.hex -out build/rusefi.dfu
|
||||
call config/boards/common_make.bat
|
||||
|
||||
call config/boards/clean_env_variables.bat
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Krzysztof Rutecki
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -0,0 +1,76 @@
|
|||
(this tool would not compile as is so my changes are at https://github.com/rusefi/hex2dfu)
|
||||
(this comes from https://github.com/encedo/hex2dfu)
|
||||
|
||||
|
||||
hex2dfu
|
||||
=======
|
||||
|
||||
Simple command line tool to convert file format from Intel HEX to STM32 DFU.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Compile
|
||||
=======
|
||||
|
||||
hex2dfu is a single C file application and can be easly compile by any ANSI C compiler. No makefile required. Just type:
|
||||
|
||||
gcc hex2dfu.c -o hex2dfu.exe
|
||||
|
||||
I`m using mingw32 under Windows, change parameters regards your enviroment.
|
||||
|
||||
|
||||
|
||||
To enable ED25519 code signing feature, download ED25519 code from https://github.com/encedo/ed25519 or https://github.com/orlp/ed25519 to folder ED25519
|
||||
and type:
|
||||
|
||||
gcc hex2dfu.c ED25519/*.c -o hex2dfu.exe
|
||||
|
||||
|
||||
Using
|
||||
=====
|
||||
|
||||
1. Simple convertion
|
||||
|
||||
hex2dfu.exe -i infile.hex -o outfile.dfu
|
||||
|
||||
|
||||
2. Convertion with changing VID/PID
|
||||
|
||||
hex2dfu.exe -i infile.hex -o outfile.dfu -p 0x0483 -v 0xdf11
|
||||
|
||||
|
||||
3. As before with extra device version included (otherwise 0xFFFF will be placed)
|
||||
|
||||
hex2dfu.exe -i infile.hex -o outfile.dfu -p 0x0483 -v 0xdf11 -d 0x1234
|
||||
|
||||
|
||||
3. EXTRA: Calculated CRC32 of the file and embed meta data at given address
|
||||
|
||||
hex2dfu.exe -i infile.hex -o outfile.dfu -c 0x08011000
|
||||
|
||||
|
||||
4. Code siging: To sign the code ED25519 'secret' need to be provided
|
||||
|
||||
hex2dfu.exe -i infile.hex -o outfile.dfu -c 0x08011000 -S d4411fa9d5cb6f91b7bd18e4ab41e7d03bf37e1d738c12b923ef0f09de90e6cf
|
||||
|
||||
|
||||
5. Like above but extra data (-P) are added:
|
||||
|
||||
hex2dfu.exe -i infile.hex -o outfile.dfu -c 0x08011000 -S d4411fa9d5cb6f91b7bd18e4ab41e7d03bf37e1d738c12b923ef0f09de90e6cf -e -P DEADBEEF
|
||||
|
||||
|
||||
6. Like above but additional data are public key based on signing secret:
|
||||
|
||||
hex2dfu.exe -i infile.hex -o outfile.dfu -c 0x08011000 -S d4411fa9d5cb6f91b7bd18e4ab41e7d03bf37e1d738c12b923ef0f09de90e6cf -e
|
||||
|
||||
|
||||
Automated CRC32 generation in very usefull when custom bootloader is in use. We can check firmware at every MCU boot and execute only when file ingerrity is authenticated. Otherwise performe failover (e.g. start USB bootloader).
|
||||
|
||||
Custom USB Bootloader supporting CRC32 checking during boot will be open sourced soon. Stay tuned :)
|
||||
|
||||
|
||||
|
||||
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue