Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
openocd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
card10
openocd
Commits
53c0fb6e
Commit
53c0fb6e
authored
14 years ago
by
Michel Jaouen
Committed by
Øyvind Harboe
14 years ago
Browse files
Options
Downloads
Patches
Plain Diff
cortex a : smp doc update
parent
289ceceb
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/openocd.texi
+107
-0
107 additions, 0 deletions
doc/openocd.texi
with
107 additions
and
0 deletions
doc/openocd.texi
+
107
−
0
View file @
53c0fb6e
...
...
@@ -1679,6 +1679,64 @@ Again using the at91sam7 as an example, this can look like:
$_
TARGETNAME configure -work-area-phys 0x00200000
\
-work-area-size 0x4000 -work-area-backup 0
@end example
@pxref
{
Define CPU targets working in SMP
}
@anchor
{
Define CPU targets working in SMP
}
@subsection Define CPU targets working in SMP
@cindex SMP
After setting targets, you can define a list of targets working in SMP.
@example
set
_
TARGETNAME
_
1
$_
CHIPNAME.cpu
1
set
_
TARGETNAME
_
2
$_
CHIPNAME.cpu2
target create
$_
TARGETNAME
_
1
cortex
_
a
8
-
chain
-
position
$_
CHIPNAME.dap
\
-coreid 0 -dbgbase
$_
DAP
_
DBG
1
target create
$_
TARGETNAME
_
2 cortex
_
a8 -chain-position
$_
CHIPNAME.dap
\
-
coreid
1
-
dbgbase
$_
DAP
_
DBG2
#define 2 targets working in smp.
target smp
$_
CHIPNAME.cpu
2
$_
CHIPNAME.cpu1
@end example
In the above example on cortex
_
a8, 2 cpus are working in SMP.
In SMP only one GDB instance is created and :
@itemize @bullet
@item a set of hardware breakpoint sets the same breakpoint on all targets in the list.
@item halt command triggers the halt of all targets in the list.
@item resume command triggers the write context and the restart of all targets in the list.
@item following a breakpoint: the target stopped by the breakpoint is displayed to the GDB session.
@item dedicated GDB serial protocol packets are implemented for switching/retrieving the target
displayed by the GDB session @pxref
{
Using openocd SMP with GDB
}
.
@end itemize
The SMP behaviour can be disabled/enabled dynamically. On cortex
_
a8 following
command have been implemented.
@itemize @bullet
@item cortex
_
a8 smp
_
on : enable SMP mode, behaviour is as described above.
@item cortex
_
a8 smp
_
off : disable SMP mode, the current target is the one
displayed in the GDB session, only this target is now controlled by GDB
session. This behaviour is useful during system boot up.
@item cortex
_
a8 smp
_
gdb : display/fix the core id displayed in GDB session see
following example.
@end itemize
@example
>cortex
_
a8 smp
_
gdb
gdb coreid 0 -> -1
#0 : coreid 0 is displayed to GDB ,
#-> -1 : next resume triggers a real resume
> cortex
_
a8 smp
_
gdb 1
gdb coreid 0 -> 1
#0 :coreid 0 is displayed to GDB ,
#->1 : next resume displays coreid 1 to GDB
> resume
> cortex
_
a8 smp
_
gdb
gdb coreid 1 -> 1
#1 :coreid 1 is displayed to GDB ,
#->1 : next resume displays coreid 1 to GDB
> cortex
_
a8 smp
_
gdb -1
gdb coreid 1 -> -1
#1 :coreid 1 is displayed to GDB,
#->-1 : next resume triggers a real resume
@end example
@subsection Chip Reset Setup
...
...
@@ -7275,6 +7333,55 @@ $_TARGETNAME configure -event EVENTNAME BODY
To verify any flash programming the GDB command @option
{
compare
-
sections
}
can be used.
@anchor
{
Using openocd SMP with GDB
}
@section Using openocd SMP with GDB
@cindex SMP
For SMP support following GDB serial protocol packet have been defined :
@itemize @bullet
@item j
-
smp status request
@item J
-
smp set request
@end itemize
OpenOCD implements :
@itemize @bullet
@item @option
{
jc
}
packet for reading core id displayed by
GDB connection. Reply is @option
{
XXXXXXXX
}
(
8
hex digits giving core id
)
or
@option
{
E
01
}
for target not smp.
@item @option
{
JcXXXXXXXX
}
(
8
hex digits
)
packet for setting core id displayed at next GDB continue
(
core id
-
1
is reserved for returning to normal resume mode
)
. Reply @option
{
E
01
}
for target not smp or @option
{
OK
}
on success.
@end itemize
Handling of this packet within GDB can be done :
@itemize @bullet
@item by the creation of an internal variable
(
i.e @option
{_
core
}
)
by mean
of function allocate
_
computed
_
value allowing following GDB command.
@example
set
$_
core 1
#Jc01 packet is sent
print
$_
core
#jc packet is sent and result is affected in
$
@end example
@item by the usage of GDB maintenance command as described in following example (2
cpus in SMP with core id 0 and 1 @pxref
{
Define CPU targets working in SMP
}
).
@example
# toggle0 : force display of coreid 0
define toggle0
maint packet Jc0
continue
main packet Jc-1
end
# toggle1 : force display of coreid 1
define toggle1
maint packet Jc1
continue
main packet Jc-1
end
@end example
@end itemize
@node Tcl Scripting API
@chapter Tcl Scripting API
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment