1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-01 12:24:14 +01:00

[SAM] Updating debug scripts

This commit is contained in:
Thibault RICHARD 2012-04-28 19:56:36 +02:00
parent e034de5ea9
commit 373c0096c3
4 changed files with 69 additions and 39 deletions

View File

@ -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
# Connect to the J-Link gdb server
target remote localhost:2331
# Reset the chip to get to a known state
monitor reset
# Select flash device
monitor flash device = AT91SAM3U4E
monitor flash device = AT91SAM3X8E
# Enable flash download and flash breakpoints
monitor flash download = 1
# Load the program
load
# Reset peripheral (RSTC_CR)
set *0x400e1200 = 0xA5000004
set *0x400e1a00 = 0xA5000004
# Initializing PC and stack pointer
# Initialize PC and stack pointer
mon reg sp=(0x80000)
set *0x80004 = *0x80004 & 0xFFFFFFFE
#set *0x80004 = *0x80004 & 0xFFFFFFFE
mon reg pc=(0x80004)
info reg
break main
# end of 'reset' command
# End of 'reset' command
end

View File

@ -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
#target remote localhost:2331
#mon reset
# Define 'reset' command
define reset
# Step2: Load file(eg. getting-started project)
#load bin/basic-dhrystone-project-at91sam3u-ek-at91sam3u4-sram.elf
#symbol-file bin/basic-dhrystone-project-at91sam3u-ek-at91sam3u4-sram.elf
# Connect to the J-Link gdb server
target remote localhost:2331
# Step3: Initializing PC and stack pointer
# Perpheral reset RSTC_CR
set *0x400e1200 = 0xA5000004
# Modify pc value to even before writing pc register
# Reset the chip to get to a known state
monitor reset
# 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)
set *0x20000004 = *0x20000004 & 0xFFFFFFFE
#set *0x20000004 = *0x20000004 & 0xFFFFFFFE
mon reg pc=(0x20000004)
info reg
break main
# End of 'reset' command
end

View File

@ -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
# Connect to the J-Link gdb server
target remote localhost:2331
# Reset the chip to get to a known state
monitor reset
# Select flash device
monitor flash device = AT91SAM3U4E
monitor flash device = AT91SAM3X8H
# Enable flash download and flash breakpoints
monitor flash download = 1
# Load the program
load
# Reset peripheral (RSTC_CR)
set *0x400e1200 = 0xA5000004
set *0x400e1a00 = 0xA5000004
# Initializing PC and stack pointer
# Initialize PC and stack pointer
mon reg sp=(0x80000)
set *0x80004 = *0x80004 & 0xFFFFFFFE
#set *0x80004 = *0x80004 & 0xFFFFFFFE
mon reg pc=(0x80004)
info reg
break main
# end of 'reset' command
# End of 'reset' command
end

View File

@ -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
# Connect to the J-Link gdb server
target remote localhost:2331
# Reset the chip to get to a known state
monitor reset
# Select flash device
monitor flash device = AT91SAM3X8H
# Enable flash download and flash breakpoints
monitor flash download = 1
# Load the program
load
# Reset peripheral (RSTC_CR)
set *0x400e1200 = 0xA5000004
set *0x400e1a00 = 0xA5000004
# Initializing PC and stack pointer
# Initialize PC and stack pointer
mon reg sp=(0x20000000)
set *0x20000004 = *0x20000004 & 0xFFFFFFFE
#set *0x20000004 = *0x20000004 & 0xFFFFFFFE
mon reg pc=(0x20000004)
info reg
break main
# end of 'reset' command
# End of 'reset' command
end