origen_debuggers 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/config/version.rb +1 -1
- data/lib/origen_debuggers/base.rb +2 -1
- data/lib/origen_debuggers/j_link.rb +186 -184
- data/templates/web/index.md.erb +29 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c69434410a715da3818e4cabc0246700dd0e7a52
|
4
|
+
data.tar.gz: 55f7bb58c4aa7addbf790e5552356f30bf9abcb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddfb4384f7a2901c05543c4277b784ae2d9e864c4caa3a8fb3db5720aed9173913fea668b3e772f085ea6d5c96c5faf460b95ff060ffb41f0b1cd3f94f61cf7b
|
7
|
+
data.tar.gz: 55edbaaab07ab7fe8efd089a3464bcf187edd91387162846f8cbb086423ace9d5f48c07a35fbda7edd94ba8d75aacfc306e1f6f5ff7976bd2e74a55e0ada876d
|
data/config/version.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
+
require 'origen_testers'
|
1
2
|
module OrigenDebuggers
|
2
3
|
# This is base class of all debuggers, any methods/attributes
|
3
4
|
# defined here will be available to all
|
4
|
-
class Base <
|
5
|
+
class Base < OrigenTesters::CommandBasedTester
|
5
6
|
# Returns true if the debugger supports JTAG
|
6
7
|
def jtag?
|
7
8
|
respond_to?(:write_dr)
|
@@ -10,190 +10,192 @@ module OrigenDebuggers
|
|
10
10
|
#
|
11
11
|
# Available commands are:
|
12
12
|
# ----------------------
|
13
|
-
#
|
14
|
-
#
|
15
|
-
#
|
16
|
-
#
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
#
|
23
|
-
#
|
24
|
-
#
|
25
|
-
#
|
26
|
-
#
|
27
|
-
#
|
28
|
-
#
|
29
|
-
#
|
30
|
-
#
|
31
|
-
#
|
32
|
-
#
|
33
|
-
#
|
34
|
-
#
|
35
|
-
#
|
36
|
-
#
|
37
|
-
#
|
38
|
-
#
|
39
|
-
#
|
40
|
-
#
|
41
|
-
#
|
42
|
-
#
|
43
|
-
#
|
44
|
-
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
52
|
-
#
|
53
|
-
#
|
54
|
-
#
|
55
|
-
#
|
56
|
-
#
|
57
|
-
#
|
58
|
-
#
|
59
|
-
#
|
60
|
-
#
|
61
|
-
#
|
62
|
-
#
|
63
|
-
#
|
64
|
-
#
|
65
|
-
#
|
66
|
-
#
|
67
|
-
#
|
68
|
-
#
|
69
|
-
#
|
70
|
-
#
|
71
|
-
#
|
72
|
-
#
|
73
|
-
#
|
74
|
-
#
|
75
|
-
#
|
76
|
-
#
|
77
|
-
#
|
78
|
-
#
|
79
|
-
#
|
80
|
-
#
|
81
|
-
#
|
82
|
-
#
|
83
|
-
#
|
84
|
-
#
|
85
|
-
#
|
86
|
-
#
|
87
|
-
#
|
88
|
-
#
|
89
|
-
#
|
90
|
-
#
|
91
|
-
#
|
92
|
-
#
|
93
|
-
# <LogFile
|
94
|
-
#
|
95
|
-
#
|
96
|
-
#
|
97
|
-
#
|
98
|
-
#
|
99
|
-
#
|
100
|
-
#
|
101
|
-
#
|
102
|
-
#
|
103
|
-
#
|
104
|
-
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
#
|
108
|
-
#
|
109
|
-
#
|
110
|
-
#
|
111
|
-
#
|
112
|
-
#
|
113
|
-
#
|
114
|
-
#
|
115
|
-
#
|
116
|
-
#
|
117
|
-
#
|
118
|
-
#
|
119
|
-
#
|
120
|
-
#
|
121
|
-
#
|
122
|
-
#
|
123
|
-
#
|
124
|
-
#
|
125
|
-
#
|
126
|
-
#
|
127
|
-
#
|
128
|
-
#
|
129
|
-
#
|
130
|
-
#
|
131
|
-
#
|
132
|
-
#
|
133
|
-
#
|
134
|
-
#
|
135
|
-
#
|
136
|
-
#
|
137
|
-
#
|
138
|
-
#
|
139
|
-
#
|
140
|
-
#
|
141
|
-
#
|
142
|
-
#
|
143
|
-
#
|
144
|
-
#
|
145
|
-
#
|
146
|
-
#
|
147
|
-
#
|
148
|
-
#
|
149
|
-
#
|
150
|
-
#
|
151
|
-
#
|
152
|
-
#
|
153
|
-
# speed
|
154
|
-
#
|
155
|
-
#
|
156
|
-
#
|
157
|
-
#
|
158
|
-
#
|
159
|
-
#
|
160
|
-
#
|
161
|
-
#
|
162
|
-
#
|
163
|
-
#
|
164
|
-
#
|
165
|
-
#
|
166
|
-
#
|
167
|
-
#
|
168
|
-
#
|
169
|
-
#
|
170
|
-
#
|
171
|
-
#
|
172
|
-
#
|
173
|
-
#
|
174
|
-
#
|
175
|
-
#
|
176
|
-
#
|
177
|
-
#
|
178
|
-
#
|
179
|
-
#
|
180
|
-
#
|
181
|
-
#
|
182
|
-
#
|
183
|
-
#
|
184
|
-
#
|
185
|
-
#
|
186
|
-
#
|
187
|
-
#
|
188
|
-
#
|
189
|
-
#
|
190
|
-
#
|
191
|
-
#
|
192
|
-
#
|
193
|
-
#
|
194
|
-
#
|
195
|
-
#
|
196
|
-
#
|
13
|
+
#
|
14
|
+
# f Firmware info
|
15
|
+
# h halt
|
16
|
+
# g go
|
17
|
+
# Sleep Waits the given time (in milliseconds). Syntax: Sleep <delay>
|
18
|
+
# s Single step the target chip
|
19
|
+
# st Show hardware status
|
20
|
+
# hwinfo Show hardware info
|
21
|
+
# mem Read memory. Syntax: mem <Addr>, <NumBytes> (hex)
|
22
|
+
# mem8 Read 8-bit items. Syntax: mem8 <Addr>, <NumBytes> (hex)
|
23
|
+
# mem16 Read 16-bit items. Syntax: mem16 <Addr>, <NumItems> (hex)
|
24
|
+
# mem32 Read 32-bit items. Syntax: mem32 <Addr>, <NumItems> (hex)
|
25
|
+
# w1 Write 8-bit items. Syntax: w1 <Addr>, <Data> (hex)
|
26
|
+
# w2 Write 16-bit items. Syntax: w2 <Addr>, <Data> (hex)
|
27
|
+
# w4 Write 32-bit items. Syntax: w4 <Addr>, <Data> (hex)
|
28
|
+
# erase Erase internal flash of selected device. Syntax: Erase
|
29
|
+
# wm Write test words. Syntax: wm <NumWords>
|
30
|
+
# is Identify length of scan chain select register
|
31
|
+
# ms Measure length of scan chain. Syntax: ms <Scan chain>
|
32
|
+
# mr Measure RTCK react time. Syntax: mr
|
33
|
+
# q Quit
|
34
|
+
# qc Close JLink connection and quit
|
35
|
+
# r Reset target (RESET)
|
36
|
+
# rx Reset target (RESET). Syntax: rx <DelayAfterReset>
|
37
|
+
# RSetType Set the current reset type. Syntax: RSetType <type>
|
38
|
+
# Regs Display contents of registers
|
39
|
+
# wreg Write register. Syntax: wreg <RegName>, <Value>
|
40
|
+
# moe Shows mode-of-entry, meaning: Reason why CPU is halted
|
41
|
+
# SetBP Set breakpoint. Syntax: SetBP <addr> [A/T] [S/H]
|
42
|
+
# SetWP Set Watchpoint. Syntax: <Addr> [R/W] [<Data> [<D-Mask>] [A-Mask]]
|
43
|
+
# ClrBP Clear breakpoint. Syntax: ClrBP <BP_Handle>
|
44
|
+
# ClrWP Clear watchpoint. Syntax: ClrWP <WP_Handle>
|
45
|
+
# VCatch Write vector catch. Syntax: VCatch <Value>
|
46
|
+
# loadbin Load binary file into target memory.
|
47
|
+
# Syntax: loadbin <filename>, <addr>
|
48
|
+
# savebin Saves target memory into binary file.
|
49
|
+
# Syntax: savebin <filename>, <addr>, <NumBytes>
|
50
|
+
# verifybin Verfies if the specified binary is already in the target memory at th
|
51
|
+
# e specified address.
|
52
|
+
# Syntax: verifybin <filename>, <addr>
|
53
|
+
# SetPC Set the PC to specified value. Syntax: SetPC <Addr>
|
54
|
+
# le Change to little endian mode
|
55
|
+
# be Change to big endian mode
|
56
|
+
# log Enables log to file. Syntax: log <filename>
|
57
|
+
# unlock Unlocks a device. Syntax: unlock <DeviceName>
|
58
|
+
# Type unlock without <DeviceName> to get a list
|
59
|
+
# of supported device names.
|
60
|
+
# nRESET has to be connected
|
61
|
+
# term Test command to visualize printf output from the target device,
|
62
|
+
# using DCC (SEGGER DCC handler running on target)
|
63
|
+
# ReadAP Reads a CoreSight AP register.
|
64
|
+
# Note: First read returns the data of the previous read.
|
65
|
+
# An additional read of DP reg 3 is necessary to get the data.
|
66
|
+
# ReadDP Reads a CoreSight DP register.
|
67
|
+
# Note: For SWD data is returned immediately.
|
68
|
+
# For JTAG the data of the previous read is returned.
|
69
|
+
# An additional read of DP reg 3 is necessary to get the data.
|
70
|
+
# WriteAP Writes a CoreSight AP register.
|
71
|
+
# WriteDP Writes a CoreSight DP register.
|
72
|
+
# SWDSelect Selects SWD as interface and outputs
|
73
|
+
# the JTAG -> SWD swichting sequence.
|
74
|
+
# SWDReadAP Reads a CoreSight AP register via SWD.
|
75
|
+
# Note: First read returns the data of the previous read.
|
76
|
+
# An additional read of DP reg 3 is necessary to get the data.
|
77
|
+
# SWDReadDP Reads a CoreSight DP register via SWD.
|
78
|
+
# Note: Correct data is returned immediately.
|
79
|
+
# SWDWriteAP Writes a CoreSight AP register via SWD.
|
80
|
+
# SWDWriteDP Writes a CoreSight DP register via SWD.
|
81
|
+
# Device Selects a specific device J-Link shall connect to
|
82
|
+
# and performs a reconnect.
|
83
|
+
# In most cases explicit selection of the device is not necessary.
|
84
|
+
# Selecting a device enables the user to make use of the J-Link
|
85
|
+
# flash programming functionality as well as using unlimited
|
86
|
+
# breakpoints in flash memory.
|
87
|
+
# For some devices explicit device selection is mandatory in order
|
88
|
+
# to allow the DLL to perform special handling needed by the device.
|
89
|
+
# ExpDevList Exports the device names from the DLL internal
|
90
|
+
# device list to a text file
|
91
|
+
# Syntax: ExpDevList <Filename>
|
92
|
+
# PowerTrace Perform power trace (not supported by all models)
|
93
|
+
# Syntax: PowerTrace <LogFile> [<ChannelMask> <RefCountSel>]
|
94
|
+
# <LogFile>: File to store power trace data to
|
95
|
+
# <ChannelMask>: 32-bit mask to specify what channels shall be enabled
|
96
|
+
# <SampleFreq>: Sampling frequency in Hz (0 == max)
|
97
|
+
# <RefCountSel>: 0: No reference count
|
98
|
+
# 1: Number of bytes transmitted on SWO
|
99
|
+
# ---- CP15 ------------
|
100
|
+
# rce Read CP15. Syntax: rce <Op1>, <CRn>, <CRm>, <Op2>
|
101
|
+
# wce Write CP15. Syntax: wce <Op1>, <CRn>, <CRm>, <Op2>, <Data>
|
102
|
+
# ---- ICE -------------
|
103
|
+
# Ice Show state of the embedded ice macrocell (ICE breaker)
|
104
|
+
# ri Read Ice reg. Syntax: ri <RegIndex>(hex)
|
105
|
+
# wi Write Ice reg. Syntax: wi <RegIndex>, <Data>(hex)
|
106
|
+
# ---- TRACE -----------
|
107
|
+
# TAddBranch TRACE - Add branch instruction to trace buffer. Paras:<Addr>,<BAddr>
|
108
|
+
# TAddInst TRACE - Add (non-branch) instruction to trace buffer. Syntax: <Addr>
|
109
|
+
# TClear TRACE - Clear buffer
|
110
|
+
# TSetSize TRACE - Set Size of trace buffer
|
111
|
+
# TSetFormat TRACE - SetFormat
|
112
|
+
# TSR TRACE - Show Regions (and analyze trace buffer)
|
113
|
+
# TStart TRACE - Start
|
114
|
+
# TStop TRACE - Stop
|
115
|
+
# ---- SWO -------------
|
116
|
+
# SWOSpeed SWO - Show supported speeds
|
117
|
+
# SWOStart SWO - Start
|
118
|
+
# SWOStop SWO - Stop
|
119
|
+
# SWOStat SWO - Display SWO status
|
120
|
+
# SWORead SWO - Read and display SWO data
|
121
|
+
# SWOShow SWO - Read and analyze SWO data
|
122
|
+
# SWOFlush SWO - Flush data
|
123
|
+
# SWOView SWO - View terminal data
|
124
|
+
# ---- PERIODIC --------
|
125
|
+
# PERConf PERIODIC - Configure
|
126
|
+
# PERStart PERIODIC - Start
|
127
|
+
# PERStop PERIODIC - Stop
|
128
|
+
# PERStat PERIODIC - Display status
|
129
|
+
# PERRead PERIODIC - Read and display data
|
130
|
+
# PERShow PERIODIC - Read and analyze data
|
131
|
+
# ---- File I/O --------
|
132
|
+
# fwrite Write file to emulator
|
133
|
+
# fread Read file from emulator
|
134
|
+
# fshow Read and display file from emulator
|
135
|
+
# fdelete Delete file on emulator
|
136
|
+
# fsize Display size of file on emulator
|
137
|
+
# ---- Test ------------
|
138
|
+
# TestHaltGo Run go/halt 1000 times
|
139
|
+
# TestStep Run step 1000 times
|
140
|
+
# TestCSpeed Measure CPU speed.
|
141
|
+
# Parameters: [<RAMAddr>]
|
142
|
+
# TestWSpeed Measure download speed into target memory.
|
143
|
+
# Parameters: [<Addr> [<Size>]]
|
144
|
+
# TestRSpeed Measure upload speed from target memory.
|
145
|
+
# Parameters: [<Addr> [<Size>] [<NumBlocks>]]
|
146
|
+
# TestNWSpeed Measure network download speed.
|
147
|
+
# Parameters: [<NumBytes> [<NumReps>]]
|
148
|
+
# TestNRSpeed Measure network upload speed.
|
149
|
+
# Parameters: [<NumBytes> [<NumReps>]]
|
150
|
+
# ---- JTAG ------------
|
151
|
+
# Config Set number of IR/DR bits before ARM device.
|
152
|
+
# Syntax: Config <IRpre>, <DRpre>
|
153
|
+
# speed Set JTAG speed. Syntax: speed <freq>|auto|adaptive, e.g. speed 2000,
|
154
|
+
# speed a
|
155
|
+
# i Read JTAG Id (Host CPU)
|
156
|
+
# wjc Write JTAG command (IR). Syntax: wjc <Data>(hex)
|
157
|
+
# wjd Write JTAG data (DR). Syntax: wjd <Data64>(hex), <NumBits>(dec)
|
158
|
+
# RTAP Reset TAP Controller using state machine (111110)
|
159
|
+
# wjraw Write Raw JTAG data. Syntax: wjraw <NumBits(dec)>, <tms>, <tdi>
|
160
|
+
# rt Reset TAP Controller (nTRST)
|
161
|
+
# ---- JTAG-Hardware ---
|
162
|
+
# c00 Create clock with TDI = TMS = 0
|
163
|
+
# c Clock
|
164
|
+
# tck0 Clear TCK
|
165
|
+
# tck1 Set TCK
|
166
|
+
# 0 Clear TDI
|
167
|
+
# 1 Set TDI
|
168
|
+
# t0 Clear TMS
|
169
|
+
# t1 Set TMS
|
170
|
+
# trst0 Clear TRST
|
171
|
+
# trst1 Set TRST
|
172
|
+
# r0 Clear RESET
|
173
|
+
# r1 Set RESET
|
174
|
+
# ---- Connection ------
|
175
|
+
# usb Connect to J-Link via USB. Syntax: usb <port>, where port is 0..3
|
176
|
+
# ip Connect to J-Link ARM Pro or J-Link TCP/IP Server via TCP/IP.
|
177
|
+
# Syntax: ip <ip_addr>
|
178
|
+
# ---- Configuration ---
|
179
|
+
# si Select target interface. Syntax: si <Interface>,
|
180
|
+
# where 0=JTAG and 1=SWD.
|
181
|
+
# power Switch power supply for target. Syntax: power <State> [perm],
|
182
|
+
# where State is either On or Off. Example: power on perm
|
183
|
+
# wconf Write configuration byte. Syntax: wconf <offset>, <data>
|
184
|
+
# rconf Read configuration bytes. Syntax: rconf
|
185
|
+
# ipaddr Show/Assign IP address and subnetmask of/to the connected J-Link.
|
186
|
+
# gwaddr Show/Assign network gateway address of/to the connected J-Link.
|
187
|
+
# dnsaddr Show/Assign network DNS server address of/to the connected J-Link.
|
188
|
+
# conf Show configuration of the connected J-Link.
|
189
|
+
# ecp Enable the J-Link control panel.
|
190
|
+
# calibrate Calibrate the target current measurement.
|
191
|
+
# selemu Select a emulator to communicate with,
|
192
|
+
# from a list of all emulators which are connected to the host
|
193
|
+
# The interfaces to search on, can be specified
|
194
|
+
# Syntax: selemu [<Interface0> <Interface1> ...]
|
195
|
+
# ShowEmuList Shows a list of all emulators which are connected to the host.
|
196
|
+
# The interfaces to search on, can be specified.
|
197
|
+
# Syntax: ShowEmuList [<Interface0> <Interface1> ...]
|
198
|
+
#
|
197
199
|
# ----------------------
|
198
200
|
# NOTE: Specifying a filename in command line
|
199
201
|
# will start J-Link Commander in script mode.
|
data/templates/web/index.md.erb
CHANGED
@@ -46,6 +46,35 @@ $tester = OrigenDebuggers::JLink.new
|
|
46
46
|
Patterns should now generate a debugger command file without any additional application
|
47
47
|
modifications.
|
48
48
|
|
49
|
+
For non-JTAG-based protocols, all debuggers support a common API for the protocol to
|
50
|
+
interface with, for example:
|
51
|
+
|
52
|
+
~~~ruby
|
53
|
+
# Sleep for 40ms
|
54
|
+
$tester.wait(:time_in_ms => 40)
|
55
|
+
|
56
|
+
# Sleep for 20 cycles
|
57
|
+
$tester.wait(:cycles => 20)
|
58
|
+
|
59
|
+
$tester.write_byte(0x55, address: 0x12)
|
60
|
+
|
61
|
+
$tester.write_word(0xAA55, address: 0x34)
|
62
|
+
|
63
|
+
$tester.write_longword(0x1122_AA55, address: 0x5678)
|
64
|
+
|
65
|
+
$tester.read(10, address: 0x0001234, size: 8)
|
66
|
+
~~~
|
67
|
+
|
68
|
+
See the API for details on all available methods: [Common_API](<%= path "api/OrigenDebuggers/JLink/Common_API.html" %>)
|
69
|
+
|
70
|
+
Finally all debuggers support a direct write method that should be used as a last resort
|
71
|
+
to drive debugger-specific functionality that is not otherwise exposed via an official API:
|
72
|
+
|
73
|
+
~~~ruby
|
74
|
+
$tester.dw "hwinfo"
|
75
|
+
$tester.dw "mem 0x1234, 10"
|
76
|
+
~~~
|
77
|
+
|
49
78
|
### How To Setup a Development Environment
|
50
79
|
|
51
80
|
[Clone the repository from Github](https://github.com/Origen-SDK/origen_debuggers).
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: origen_debuggers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen McGinty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: origen
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.2.6
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: origen_testers
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.5.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.5.0
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: origen_doc_helpers
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|