mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-10 21:24:12 +01:00
[SAM] Updating debug scripts
This commit is contained in:
parent
e034de5ea9
commit
373c0096c3
@ -1,33 +1,37 @@
|
|||||||
#*******************************************************
|
#*******************************************************
|
||||||
#
|
#
|
||||||
# Connect to J-Link and debug application in flash.
|
# Connect to J-Link and debug application in flash on SAM3X.
|
||||||
#
|
#
|
||||||
|
|
||||||
# define 'reset' command
|
# Define 'reset' command
|
||||||
define reset
|
define reset
|
||||||
|
|
||||||
# Connect to the J-Link gdb server
|
# Connect to the J-Link gdb server
|
||||||
target remote localhost:2331
|
target remote localhost:2331
|
||||||
|
|
||||||
# Reset the chip to get to a known state
|
# Reset the chip to get to a known state
|
||||||
monitor reset
|
monitor reset
|
||||||
|
|
||||||
# Select flash device
|
# Select flash device
|
||||||
monitor flash device = AT91SAM3U4E
|
monitor flash device = AT91SAM3X8E
|
||||||
|
|
||||||
# Enable flash download and flash breakpoints
|
# Enable flash download and flash breakpoints
|
||||||
monitor flash download = 1
|
monitor flash download = 1
|
||||||
|
|
||||||
# Load the program
|
# Load the program
|
||||||
load
|
load
|
||||||
|
|
||||||
# Reset peripheral (RSTC_CR)
|
# Reset peripheral (RSTC_CR)
|
||||||
set *0x400e1200 = 0xA5000004
|
set *0x400e1a00 = 0xA5000004
|
||||||
|
|
||||||
# Initializing PC and stack pointer
|
# Initialize PC and stack pointer
|
||||||
mon reg sp=(0x80000)
|
mon reg sp=(0x80000)
|
||||||
set *0x80004 = *0x80004 & 0xFFFFFFFE
|
#set *0x80004 = *0x80004 & 0xFFFFFFFE
|
||||||
mon reg pc=(0x80004)
|
mon reg pc=(0x80004)
|
||||||
|
|
||||||
info reg
|
info reg
|
||||||
|
|
||||||
break main
|
break main
|
||||||
|
|
||||||
# end of 'reset' command
|
# End of 'reset' command
|
||||||
end
|
end
|
||||||
|
@ -1,23 +1,37 @@
|
|||||||
#*************************************************
|
#*******************************************************
|
||||||
#
|
#
|
||||||
# Connect to J-Link and debug application in sram on SAM3U
|
# Connect to J-Link and debug application in sram on SAM3X.
|
||||||
#
|
#
|
||||||
# Note:
|
|
||||||
# First,users should do Step1 and Step2 according to your project,
|
|
||||||
# then do Step3.
|
|
||||||
|
|
||||||
# Step1: Connect to the J-Link gdb server
|
# Define 'reset' command
|
||||||
#target remote localhost:2331
|
define reset
|
||||||
#mon reset
|
|
||||||
|
|
||||||
# Step2: Load file(eg. getting-started project)
|
# Connect to the J-Link gdb server
|
||||||
#load bin/basic-dhrystone-project-at91sam3u-ek-at91sam3u4-sram.elf
|
target remote localhost:2331
|
||||||
#symbol-file bin/basic-dhrystone-project-at91sam3u-ek-at91sam3u4-sram.elf
|
|
||||||
|
|
||||||
# Step3: Initializing PC and stack pointer
|
# Reset the chip to get to a known state
|
||||||
# Perpheral reset RSTC_CR
|
monitor reset
|
||||||
set *0x400e1200 = 0xA5000004
|
|
||||||
# Modify pc value to even before writing pc register
|
# Select flash device
|
||||||
|
monitor flash device = AT91SAM3X8E
|
||||||
|
|
||||||
|
# Enable flash download and flash breakpoints
|
||||||
|
monitor flash download = 1
|
||||||
|
|
||||||
|
# Load the program
|
||||||
|
load
|
||||||
|
|
||||||
|
# Reset peripheral (RSTC_CR)
|
||||||
|
set *0x400e1a00 = 0xA5000004
|
||||||
|
|
||||||
|
# Initialize PC and stack pointer
|
||||||
mon reg sp=(0x20000000)
|
mon reg sp=(0x20000000)
|
||||||
set *0x20000004 = *0x20000004 & 0xFFFFFFFE
|
#set *0x20000004 = *0x20000004 & 0xFFFFFFFE
|
||||||
mon reg pc=(0x20000004)
|
mon reg pc=(0x20000004)
|
||||||
|
|
||||||
|
info reg
|
||||||
|
|
||||||
|
break main
|
||||||
|
|
||||||
|
# End of 'reset' command
|
||||||
|
end
|
||||||
|
@ -1,33 +1,37 @@
|
|||||||
#*******************************************************
|
#*******************************************************
|
||||||
#
|
#
|
||||||
# Connect to J-Link and debug application in flash.
|
# Connect to J-Link and debug application in flash on SAM3X.
|
||||||
#
|
#
|
||||||
|
|
||||||
# define 'reset' command
|
# Define 'reset' command
|
||||||
define reset
|
define reset
|
||||||
|
|
||||||
# Connect to the J-Link gdb server
|
# Connect to the J-Link gdb server
|
||||||
target remote localhost:2331
|
target remote localhost:2331
|
||||||
|
|
||||||
# Reset the chip to get to a known state
|
# Reset the chip to get to a known state
|
||||||
monitor reset
|
monitor reset
|
||||||
|
|
||||||
# Select flash device
|
# Select flash device
|
||||||
monitor flash device = AT91SAM3U4E
|
monitor flash device = AT91SAM3X8H
|
||||||
|
|
||||||
# Enable flash download and flash breakpoints
|
# Enable flash download and flash breakpoints
|
||||||
monitor flash download = 1
|
monitor flash download = 1
|
||||||
|
|
||||||
# Load the program
|
# Load the program
|
||||||
load
|
load
|
||||||
|
|
||||||
# Reset peripheral (RSTC_CR)
|
# Reset peripheral (RSTC_CR)
|
||||||
set *0x400e1200 = 0xA5000004
|
set *0x400e1a00 = 0xA5000004
|
||||||
|
|
||||||
# Initializing PC and stack pointer
|
# Initialize PC and stack pointer
|
||||||
mon reg sp=(0x80000)
|
mon reg sp=(0x80000)
|
||||||
set *0x80004 = *0x80004 & 0xFFFFFFFE
|
#set *0x80004 = *0x80004 & 0xFFFFFFFE
|
||||||
mon reg pc=(0x80004)
|
mon reg pc=(0x80004)
|
||||||
|
|
||||||
info reg
|
info reg
|
||||||
|
|
||||||
break main
|
break main
|
||||||
|
|
||||||
# end of 'reset' command
|
# End of 'reset' command
|
||||||
end
|
end
|
||||||
|
@ -1,29 +1,37 @@
|
|||||||
#*******************************************************
|
#*******************************************************
|
||||||
#
|
#
|
||||||
# Connect to J-Link and debug application in flash.
|
# Connect to J-Link and debug application in sram on SAM3X.
|
||||||
#
|
#
|
||||||
|
|
||||||
# define 'reset' command
|
# Define 'reset' command
|
||||||
define reset
|
define reset
|
||||||
|
|
||||||
# Connect to the J-Link gdb server
|
# Connect to the J-Link gdb server
|
||||||
target remote localhost:2331
|
target remote localhost:2331
|
||||||
|
|
||||||
# Reset the chip to get to a known state
|
# Reset the chip to get to a known state
|
||||||
monitor reset
|
monitor reset
|
||||||
|
|
||||||
|
# Select flash device
|
||||||
|
monitor flash device = AT91SAM3X8H
|
||||||
|
|
||||||
|
# Enable flash download and flash breakpoints
|
||||||
|
monitor flash download = 1
|
||||||
|
|
||||||
# Load the program
|
# Load the program
|
||||||
load
|
load
|
||||||
|
|
||||||
# Reset peripheral (RSTC_CR)
|
# Reset peripheral (RSTC_CR)
|
||||||
set *0x400e1200 = 0xA5000004
|
set *0x400e1a00 = 0xA5000004
|
||||||
|
|
||||||
# Initializing PC and stack pointer
|
# Initialize PC and stack pointer
|
||||||
mon reg sp=(0x20000000)
|
mon reg sp=(0x20000000)
|
||||||
set *0x20000004 = *0x20000004 & 0xFFFFFFFE
|
#set *0x20000004 = *0x20000004 & 0xFFFFFFFE
|
||||||
mon reg pc=(0x20000004)
|
mon reg pc=(0x20000004)
|
||||||
|
|
||||||
info reg
|
info reg
|
||||||
|
|
||||||
break main
|
break main
|
||||||
|
|
||||||
# end of 'reset' command
|
# End of 'reset' command
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user