Adds openocd with nrf support build to the server update function. Adds 2bad8ad2cd889d8c8d255b8e0dc0e7a187b98c9a hci_uart_beacon commit build hex file to project. (#26)
Co-authored-by: Pbopbo <p.obernesser@freenet.de> Reviewed-on: #26
This commit was merged in pull request #26.
This commit is contained in:
40
src/openocd/flash.sh
Normal file
40
src/openocd/flash.sh
Normal file
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
INTERFACE="swd0"
|
||||
HEX_FILE=""
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 -f <hex_file> [-i swd0|swd1]"
|
||||
exit 1
|
||||
}
|
||||
|
||||
while getopts "f:i:h" opt; do
|
||||
case "$opt" in
|
||||
f) HEX_FILE="$OPTARG" ;;
|
||||
i)
|
||||
if [[ "$OPTARG" == "swd0" || "$OPTARG" == "swd1" ]]; then
|
||||
INTERFACE="$OPTARG"
|
||||
else
|
||||
usage
|
||||
fi
|
||||
;;
|
||||
h) usage ;;
|
||||
*) usage ;;
|
||||
esac
|
||||
done
|
||||
|
||||
[[ -n "$HEX_FILE" ]] || usage
|
||||
[[ -f "$HEX_FILE" ]] || { echo "HEX file not found: $HEX_FILE"; exit 1; }
|
||||
|
||||
sudo openocd \
|
||||
-f ./raspberrypi-${INTERFACE}.cfg \
|
||||
-c "init" \
|
||||
-c "reset init" \
|
||||
-c "flash banks" \
|
||||
-c "flash write_image $HEX_FILE" \
|
||||
-c "verify_image $HEX_FILE" \
|
||||
-c "reset run" \
|
||||
-c "shutdown"
|
||||
|
||||
echo "Flashing complete."
|
||||
13111
src/openocd/merged.hex
Normal file
13111
src/openocd/merged.hex
Normal file
File diff suppressed because it is too large
Load Diff
@@ -5,4 +5,9 @@ adapter gpio swdio 26
|
||||
#adapter gpio trst 26
|
||||
#reset_config trst_only
|
||||
|
||||
|
||||
source [find target/nordic/nrf54l.cfg]
|
||||
|
||||
flash bank $_CHIPNAME.flash nrf54 0x00000000 0 0 0 $_TARGETNAME
|
||||
|
||||
adapter speed 1000
|
||||
|
||||
@@ -5,4 +5,9 @@ adapter gpio swdio 24
|
||||
#adapter gpio trst 27
|
||||
#reset_config trst_only
|
||||
|
||||
|
||||
source [find target/nordic/nrf54l.cfg]
|
||||
|
||||
flash bank $_CHIPNAME.flash nrf54 0x00000000 0 0 0 $_TARGETNAME
|
||||
|
||||
adapter speed 1000
|
||||
|
||||
Reference in New Issue
Block a user