2016-09-23 04:21:45 +00:00
|
|
|
#
|
|
|
|
# J-LINK GDB SERVER initialization
|
|
|
|
#
|
|
|
|
target remote localhost:2331
|
2016-09-23 09:57:10 +00:00
|
|
|
set remotetimeout 10000
|
2016-09-23 04:21:45 +00:00
|
|
|
monitor device Cortex-M3
|
|
|
|
monitor endian little
|
|
|
|
monitor reset
|
2016-09-23 09:57:10 +00:00
|
|
|
# Set max speed
|
|
|
|
monitor speed 4000
|
2016-09-26 01:41:22 +00:00
|
|
|
#set mem inaccessible-by-default on
|
2016-09-23 04:21:45 +00:00
|
|
|
# Setup GDB FOR FASTER DOWNLOADS
|
2016-09-23 09:57:10 +00:00
|
|
|
set remote memory-write-packet-size 8192
|
2016-09-26 01:41:22 +00:00
|
|
|
set remote memory-write-packet-size fixed
|
2016-09-23 09:57:10 +00:00
|
|
|
# Boot Flash
|
|
|
|
#monitor long 0x40000210 = 0x211157
|
2016-09-26 01:41:22 +00:00
|
|
|
# Boot RAM start_addr0() Run if ( v400001F4 & 0x8000000 ) && ( v40000210 & 0x80000000 )
|
|
|
|
#monitor long 0x40000210 = 0x80011117
|
|
|
|
# Boot RAM start_addr1() Run if ( v40000210 & 0x20000000 )
|
|
|
|
#monitor long 0x40000210 = 0x20011117
|
|
|
|
# Boot RAM start_addr2() Run if ( v40000210 & 0x10000000 )
|
|
|
|
monitor long 0x40000210 = 0x10011117
|
|
|
|
# Boot RAM start_addr3() Run if ( v400001F4 & 0x8000000 ) && ( v40000210 & 0x8000000 )
|
|
|
|
#monitor long 0x40000210 = 0x8011117
|
|
|
|
# Boot RAM start_addr4() Init console, Run if ( v40000210 & 0x4000000 )
|
|
|
|
monitor long 0x40000210 = 0x4011117
|
2016-09-23 09:57:10 +00:00
|
|
|
# CPU CLK 166 MHz?
|
2016-09-26 01:41:22 +00:00
|
|
|
#monitor long 0x40000014 = 0x00000011
|
2016-09-23 09:57:10 +00:00
|
|
|
# CPU CLK 83 MHz?
|
|
|
|
#monitor long 0x40000014 = 0x00000021
|
2016-09-23 04:21:45 +00:00
|
|
|
# Load the program executable called "image.elf"
|
|
|
|
load build/obj/build.axf
|
2016-09-25 07:46:13 +00:00
|
|
|
monitor reset
|
2016-09-26 01:41:22 +00:00
|
|
|
#continue
|
2016-09-23 04:21:45 +00:00
|
|
|
monitor go
|
|
|
|
quit
|
|
|
|
|