Skip to content

Commit

Permalink
FIXUP - cleanup firmware script
Browse files Browse the repository at this point in the history
  • Loading branch information
ladislas committed Jan 12, 2022
1 parent 0dd7b75 commit 8f2f5c2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions build_firmware.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,27 @@ do
esac
done

BOOTLOADER_HEX_SOURCE="_build/LEKA_V1_2_DEV/app/bootloader/bootloader.hex"
BOOTLOADER_HEX="_tmp/bootloader.hex"

APPLICATION_HEX_SOURCE="_build/LEKA_V1_2_DEV/spikes/lk_update_process_app_base/spike_lk_update_process_app_base.hex"
APPLICATION_VERSION="1.2.3+4"
APPLICATION_SIGNED_HEX="_tmp/application-signed.hex"

FIRMWARE_HEX="_tmp/firmwware.hex"
FIRMWARE_HEX="_tmp/firmware.hex"
FIRMWARE_RELEASE="_release/firmware.bin"

# Get bootloader
if [ "$RECOMPILE_BOOTLOADER" = "true" ];
then
./build_bootloader.sh $BOOTLOADER_HEX_SOURCE $BOOTLOADER_HEX
echo "Build bootloader"
./build_bootloader.sh
fi;

# Get application
echo "Build application"
./build_os.sh $RECOMPILE_BOOTLOADER $APPLICATION_HEX_SOURCE $APPLICATION_VERSION $APPLICATION_SIGNED_HEX

# Merge bootloader and application
echo "Merge bootloader & applications"
hexmerge.py -o $FIRMWARE_HEX --no-start-addr $BOOTLOADER_HEX $APPLICATION_SIGNED_HEX
arm-none-eabi-objcopy -I ihex -O binary $FIRMWARE_HEX $FIRMWARE_RELEASE

0 comments on commit 8f2f5c2

Please sign in to comment.