-
Notifications
You must be signed in to change notification settings - Fork 208
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
Add basic esp32p4
support
#2466
base: main
Are you sure you want to change the base?
Conversation
1c8ee8b
to
85abc3a
Compare
I don't think we want to include this in this release, so converting to draft for now. |
@@ -285,21 +310,36 @@ pub struct ChannelRxImpl<C: GdmaChannel>(C); | |||
impl<C: GdmaChannel> crate::private::Sealed for ChannelRxImpl<C> {} | |||
|
|||
impl<C: GdmaChannel> ChannelRxImpl<C> { | |||
#[cfg(not(esp32p4))] |
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.
TBH I'd prefer not touching DMA for the P4.
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 there's nothing critical to have minor changes in terms of registers/fields management there, I think it can stay there
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 there's nothing critical to have minor changes in terms of registers/fields management there, I think it can stay there
The P4 doesn't even have a single unified GDMA, it has two different ones. I doubt we'll use any of these additions in this form.
esp-hal/src/system.rs
Outdated
use crate::peripherals::SYSTEM; | ||
|
||
/// Peripherals which can be enabled via `PeripheralClockControl`. | ||
/// | ||
/// This enum represents various hardware peripherals that can be enabled | ||
/// by the system's clock control. Depending on the target device, different | ||
/// peripherals will be available for enabling. | ||
// FIXME: This enum needs to be public because it's exposed via a bunch of traits, but it's not | ||
// useful to users. | ||
// NOTE: This enum needs to be public because it's exposed via a bunch of |
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.
Please undo this, FIXME
is actually highlighted if you use the Todo Tree vscode plugin.
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.
FIXME/TODO/NOTE are all pretty standard, plugin I use at least highlights all of those.
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.
Still, this change has no relevance for P4, and a FIXME better signals that something needs to be changed around these parts.
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.
will be done
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.
Thanks! I have some initial comments, mostly around the maintainability of adding more support in the future - we don't want to spend a bunch of time working on something only to realise the function that should be doing something is stubbed out to do nothing :D.
I'll dig out my P4 rev1 board and try the examples soon.
@@ -94,24 +94,41 @@ static RX_WAKERS: [AtomicWaker; CHANNEL_COUNT] = [const { AtomicWaker::new() }; | |||
impl<C: GdmaChannel> crate::private::Sealed for ChannelTxImpl<C> {} | |||
|
|||
impl<C: GdmaChannel> ChannelTxImpl<C> { | |||
#[cfg(not(esp32p4))] |
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.
Can we just cfg away DMA changes (i.e remove gdma from metadata)? We won't have a need for it for some time, and DMA on P4 is going to be complicated.
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.
if that works: #2466 (comment)
gdma
will be temporarily removed from metadata
Regarding |
Yeah let's have those errors, I'll move PeripheralMarker to a better place. Alternatively, you could define an axi_gdma and ahb_gdma symbol pair, and cfg-enable dma for those without gdma/pdma parts. |
3c836a6
to
d26fd03
Compare
d26fd03
to
f487033
Compare
Submission Checklist 📝
cargo xtask fmt-packages
command to ensure that all changed code is formatted correctly.CHANGELOG.md
in the proper section.Extra:
Pull Request Details 📖
Description
For now, there're still some
TODO
s left. They'll be incrementally removed asp4
support grows. For example, for now some of checks inCI
are off, some code sections and so on.related to #2285
Testing
advanced_serial
example, some more basic tests like: