-
Notifications
You must be signed in to change notification settings - Fork 747
BBC HiFive Inventor board ported to Tock #3225
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
#![allow(dead_code)] | ||
|
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.
#![allow(dead_code)] |
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.
Because not all interrupts are treated in service_interrupt()
removing that line would result in useless warnings.
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.
Perhaps then make these pub(crate)
? I removed the allow from g002 and didn't get any warnings.
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.
When I removed the pub
in lib.rs
I got the something like: warning: constant is never used.
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 you are referring deleting pub
from pub mod interrupts;
I've built and run Tock on my HiFive1 RevB, and it appears to be working fine. UART works, I can load applications. Haven't tested it any more extensively than that, though. |
@bradjc I have now tested myself the |
That seems fine with me. |
Thanks. I just removed it. |
bors r+ |
Pull Request Overview
This pull request aims to port Tock to the BBC HiFive Inventor board.
The source is mostly copied from the SiFive HiFive1 Rev B board.
I followed an earlier attempt, made by @TeodoraMiu, who tried to:
layout.ld
However the problems noticed with the UART speed were caused by a lack of configuration of the internal frequency. This was solved by merge #3215. (The code is also commited here.)
Still there were some bugs in the original
sifive
crate. When trying to clear all pending PL-interrupts a read-only register is overwritten.The manual states another way to clear interrupts, by reading the
claim
register and writing the (or a) value back. See this commit.The new HiFive board featured a different chip which didn't use the same indexing of interrupt numbers. So implementing a different
InterruptService
for each chip was necessary. So thee310x
chip implementation was split in two,e310_g002
ande310_g003
, which handle each interrupt number differently.I also added the second UART peripheral in order to disable any unwanted interrupts from it.
Testing Strategy
This pull request was tested by checking the serial output of the
hifive_inventor
target and thehifive1
qemu simulation.Help Wanted
This pull request still needs to be physically tested on a hifive1 board.
@gemarcano could you please do this?
Documentation Updated
Formatting
make prepush
.