-
-
Notifications
You must be signed in to change notification settings - Fork 781
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
Feature: WCH RISC-V support #1399
Draft
perigoso
wants to merge
24
commits into
blackmagic-debug:main
Choose a base branch
from
perigoso:feature/wch-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
7a2134c
hosted: barebones wch-link implementation
perigoso b5dfd7d
hosted/wchlink: implement DMI transfer
perigoso 3556898
riscv_debug: expose DMI operation and status defines
perigoso 4fb98cf
jep106: add BMD internal flag
perigoso 272ef44
jep106: add internal WCH non-jep106 code
perigoso 41bf986
riscv_jtag_dtm: move RV_DMI_TOO_SOON handling one level up
perigoso a8feda2
hosted/wchlink: implement RISC-V DTM handler
perigoso 63a22bd
command: add rvswd scan routine command
perigoso 85d9f8e
hosted/wchlink: implement RVSWD scan
perigoso ec2d85a
riscv32: add ch32v3 target probe
perigoso 49e9466
ch32vx: implement electronic signature (ESIG) register handling
perigoso 094201b
riscv32: add ch32v003 target probe
perigoso 145de4c
buffer_utils: add write_char util
perigoso 3e5c646
riscv_debug: formally parse the ISA subset
perigoso 40206d0
riscv_debug: use the ISA subset as the target core name
perigoso b71af18
riscv_debug: fix typo
perigoso 628ffc5
riscv64: fix typo
perigoso 8124471
riscv_debug: update RV_CSR macros
perigoso 7679460
!experimental! riscv32: add hacky fallback memory access using the pr…
perigoso c643d81
rvswd: gate rvswd functionality behind platform define
perigoso 223a1ad
experimental: start working towards a native implementation
perigoso 1f2d949
gdb_packet: add note on gdb remote protocol debugging
perigoso d1b2b5a
riscv32: fix RV32E register count and respective size
perigoso 80725c5
rvswd: experimental native implementation (does not work yet!)
perigoso 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
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
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
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,44 @@ | ||
/* | ||
* This file is part of the Black Magic Debug project. | ||
* | ||
* Copyright (C) 2011 Black Sphere Technologies Ltd. | ||
* Written by Gareth McMullin <[email protected]> | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#ifndef INCLUDE_RVSWD_H | ||
#define INCLUDE_RVSWD_H | ||
|
||
#include <stdint.h> | ||
#include <stddef.h> | ||
#include <stdbool.h> | ||
|
||
/* Functions interface talking RVSWD */ | ||
typedef struct rvswd_proc { | ||
/* Perform a start condition */ | ||
void (*start)(void); | ||
/* Perform a start condition */ | ||
void (*stop)(void); | ||
/* Perform a clock_cycles read */ | ||
uint32_t (*seq_in)(size_t clock_cycles); | ||
/* Perform a clock_cycles write with the provided data */ | ||
void (*seq_out)(uint32_t dio_states, size_t clock_cycles); | ||
} rvswd_proc_s; | ||
|
||
extern rvswd_proc_s rvswd_proc; | ||
|
||
void rvswd_init(void); | ||
|
||
#endif /* INCLUDE_RVSWD_H */ |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
This should probably be defined contingent on
ENABLE_RISCV
and we'd suggest that, at least for now, this be limited to BMDA. Iff we can figure out how to implement the protocol in the firmware we can then de-restrict it by removing the suggested check forPC_HOSTED
.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.
That makes sense, I will consider how to gate this when it's more complete, there will still be a native implementation