@echo off
set /p VERSION=<version.txt
echo This batch file generates a bootloader hex file with keys from the following input:
echo   - secure_bootloader_%VERSION%_nokeys.hex - the bootloader code with no keys.
echo   - key_mf.txt and key_sys.txt - the manufacturer and system integrator keys to add
echo WARNING! The delivered key files are not secure and only for demo purposes!
pause
..\utilities\BootloaderPostProcessor.exe -s0 -e 7FCB -c 7FCC -k 7FD0 --manufacturerkey=key_mf.txt --systemsintkey=key_sys.txt -i secure_bootloader_%VERSION%_nokeys.hex -o  secure_bootloader_%VERSION%_withkeys.hex
echo done.
pause
