-
Notifications
You must be signed in to change notification settings - Fork 997
riscv: add new kendryte k210 chip #1149
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
Conversation
|
The CMSIS-SVD repository has temporarly been changed and will be reset to the original upstream once cmsis-svd/cmsis-svd#104 is merged. |
aykevl
left a comment
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.
Overall this looks good. I have left a number of comments inline, however.
Regarding cmsis-svd, while I would prefer to use upstream, I think practically it would be better to fork it into tinygo-org (as we did previously) and keeping it there, even as cmsis-svd upstream merges PRs. Switching between submodule remotes has resulted in trouble before so let's do it once for good.
Looking at this PR, there are really three somewhat distinct changes (two necessary as precondition to K210 support):
- Adding support for non-default code models.
- Adding support for 64-bit RISC-V.
- Adding support for the K210 chip.
You could cleanly separate these in different commits (with a rebase and force-push) or actually make separate PRs, what you prefer. Separate PRs may be faster to merge individually.
|
@aykevl I made two PRs in the tinygo-org/cmsis-svd repo to update it and to incorporate the unmerged fix (tinygo-org/cmsis-svd#3 and tinygo-org/cmsis-svd#4). I will update the submodule repository as soon as these are merged. I will also separate this pull request into 3 distinct ones as suggested. |
|
All of the PRs to the tinygo fork of cmsis-svd are done. Please continue with the rest of the steps so we can get this merged! Thank you. |
|
I should be receiving a Sipeed MAix BiT board next week, so I can also help test. |
|
So this PR is the precursor to adding the board and machine files for the MAiX BiT, correct? @yannishuber are you planning on doing this? I just got my boards today. 😸 |
|
@deadprogram yes exactly, i also have this board and I am currently working on it. It should be done soon. |
|
So should this PR still be considered draft, or should we look at merging it? |
|
@yannishuber is this still a draft PR, or should it be able to be merged into |
|
@deadprogram Sorry I didn't see your first reply. No I was thinking of adding the code related to the maix-bit in this PR but I can also make a separate PR if you want. I will work on this today. |
|
It can be in the same PR, since that lets us test the full implementation that way. Thank you! |
aykevl
left a comment
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 chip seems to be pretty similar to the SiFive fe310, so much that I wonder whether some code can be reused between them. That would require putting the SiFive and Kendryte vendor code in the same package (perhaps device/riscv?).
1e193f5 to
06b4ed1
Compare
88694a9 to
82c9676
Compare
Also keep common start.S file for 64 and 32 bit architectures.
This linker script does not offer stack overflow protection because the stack cannot be placed at the bottom of the RAM.
@aykevl is that also the case with the coroutines scheduler?
Well in that case I think this PR is finally ready. |
|
You may want to rebase on the dev branch to make sure this PR still works after #1142 has been merged. |
aykevl
left a comment
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.
I think this is ready to merge. I'm a bit unsure about the nonstandard API for pin modes, but I guess it's fine for now as it's still usable this way (but with fixed pins).
|
OK, the time has come. Now rebasing into Incredble work @yannishuber and fantastic effort all around. Thank you! |
This PR adds support for the Kendryte K210 chip and the Sipeed MAix Bit board.
TODO: