From 00451ef05b7b793c7cd098cc3834c6874c51e56e Mon Sep 17 00:00:00 2001 From: JF Date: Sun, 24 May 2020 17:47:07 +0200 Subject: Add example scripts to generate mcuboot image, dfu file and program them with openocd. --- bootloader/booloader_app_jlink.ocd | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 bootloader/booloader_app_jlink.ocd (limited to 'bootloader/booloader_app_jlink.ocd') diff --git a/bootloader/booloader_app_jlink.ocd b/bootloader/booloader_app_jlink.ocd new file mode 100644 index 00000000..66243831 --- /dev/null +++ b/bootloader/booloader_app_jlink.ocd @@ -0,0 +1,34 @@ +# This script programs the bootloader and the firmware application using J-Link debugger. + +gdb_flash_program enable +gdb_breakpoint_override hard + +$_TARGETNAME configure -event reset-init { + # Arm Semihosting is used to show debug console output and may only be enabled after init event. We wait for the event and enable Arm Semihosting. + echo "Enabled ARM Semihosting to show debug output" + arm semihosting enable +} + +# Connect to the device. +init + +echo "Stopping..." +reset +halt +echo "" + +# Flashing Bootloader +echo "Flashing bootloader..." +program ./mynewt_nosemi_4.1.7.elf verify 0x00000000 + +# Flashing Application +echo "Flashing application..." +program ./image.bin verify 0x00008000 +echo "" + +# Restart the device and start the bootloader. +echo "Restarting..." +reset +echo "" + +echo "**** Done! Press Ctrl-C to exit..." -- cgit v1.2.3-70-g09d2