-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tcl/board: Add Spacemit MUSE Pi config #1122
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# SPDX-License-Identifier: GPL-2.0-or-later | ||
|
||
adapter driver jlink | ||
transport select jtag | ||
adapter speed 2000 | ||
|
||
bindto 0.0.0.0 | ||
|
||
if { [info exists CHIPNAME] } { | ||
set _CHIPNAME $CHIPNAME | ||
} else { | ||
set _CHIPNAME K1 | ||
} | ||
|
||
if { [info exists CORES] } { | ||
set _cores $CORES | ||
} else { | ||
set _cores 1 | ||
} | ||
|
||
if { [ info exists SECJTAG ] } { | ||
jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x10000E21 | ||
} else { | ||
jtag newtap pre unknown -irlen 1 -expected-id 0x00000000 -disable | ||
jtag configure pre.unknown -event tap-enable "" | ||
|
||
jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x10000E21 -disable | ||
jtag configure $_CHIPNAME.cpu -event tap-enable "" | ||
|
||
jtag newtap post unknown -irlen 9 -expected-id 0x08501C0D -ignore-version | ||
|
||
jtag configure post.unknown -event setup { | ||
global _CHIPNAME | ||
|
||
irscan post.unknown 0x98 | ||
drscan post.unknown 16 0xa | ||
|
||
jtag tapenable pre.unknown | ||
jtag tapenable $_CHIPNAME.cpu | ||
} | ||
} | ||
|
||
set _TARGETNAME $_CHIPNAME.cpu | ||
set DBGBASE {0x0 0x400} | ||
set _smp_command "target smp" | ||
|
||
for { set _core 0 } { $_core < $_cores } { incr _core } { | ||
set _command "target create $_TARGETNAME.$_core riscv -chain-position $_TARGETNAME \ | ||
-coreid [expr {$_core % 4}] -dbgbase [lindex $DBGBASE [expr {$_core / 4}]]" | ||
|
||
if { [expr {$_core % 4}] == 0 } { | ||
set _command "$_command -rtos hwthread" | ||
} | ||
|
||
eval $_command | ||
|
||
set _smp_command "$_smp_command $_TARGETNAME.$_core" | ||
} | ||
|
||
eval $_smp_command | ||
|
||
set _SPEED 8000 | ||
$_TARGETNAME.0 configure -event examine-start { | ||
adapter speed $_SPEED | ||
puts [ adapter speed ] | ||
} | ||
|
||
foreach t [target names] { | ||
# $t riscv set_mem_access sysbus progbuf | ||
$t riscv set_mem_access progbuf | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to be fair , this does not belong to board/target configuration.
These are parameters of debug adapter and should be specified separately.
Is also a user preference.