diff options
| author | JF <jf@codingfield.com> | 2020-06-07 12:17:45 (GMT) |
|---|---|---|
| committer | Gitea <gitea@fake.local> | 2020-06-07 12:17:45 (GMT) |
| commit | a0e73f5c1a1e652aa6270b7e42a73aee3d12ded6 (patch) | |
| tree | 6205dfb543bb22245d39a2f6e44d2c26cb381c10 /bootloader/booloader_app_jlink.ocd | |
| parent | 8a94750e30399bfb204cbec59a769d9d1b6b5baa (diff) | |
| parent | dbdb26ae1fa45cec88f1b9ea0353b3d0a3c39f56 (diff) | |
Merge branch 'develop' of JF/PineTime into master
Diffstat (limited to 'bootloader/booloader_app_jlink.ocd')
| -rw-r--r-- | bootloader/booloader_app_jlink.ocd | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/bootloader/booloader_app_jlink.ocd b/bootloader/booloader_app_jlink.ocd new file mode 100644 index 0000000..6624383 --- /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..." |
