Implement starting a task on second core of ESP32 and ESP32-S3#96
Merged
Conversation
Closed
jessebraham
approved these changes
Jul 5, 2022
jessebraham
left a comment
Member
There was a problem hiding this comment.
Overall looks good, thanks for implementing this! Just left one comment, feel free to ignore it if you wish!
Comment on lines
+76
to
+80
| #[cfg_attr(feature = "esp32", path = "cpu_control/esp32.rs")] | ||
| #[cfg_attr(feature = "esp32c3", path = "cpu_control/none.rs")] | ||
| #[cfg_attr(feature = "esp32s2", path = "cpu_control/none.rs")] | ||
| #[cfg_attr(feature = "esp32s3", path = "cpu_control/esp32s3.rs")] | ||
| pub mod cpu_control; |
Member
There was a problem hiding this comment.
Suggested change
| #[cfg_attr(feature = "esp32", path = "cpu_control/esp32.rs")] | |
| #[cfg_attr(feature = "esp32c3", path = "cpu_control/none.rs")] | |
| #[cfg_attr(feature = "esp32s2", path = "cpu_control/none.rs")] | |
| #[cfg_attr(feature = "esp32s3", path = "cpu_control/esp32s3.rs")] | |
| pub mod cpu_control; | |
| #[cfg_attr(feature = "esp32", path = "cpu_control/esp32.rs")] | |
| #[cfg_attr(feature = "esp32s3", path = "cpu_control/esp32s3.rs")] | |
| pub mod cpu_control; | |
| #[cfg(any(feature = "esp32c3", feature = "esp32s2"))] | |
| pub mod cpu_control {} |
Probably nitpicking as usual (😁) but maybe something like this would be better? Seems kind of strange to require an empty source file to me, but also whatever works is fine at the end of the day.
Contributor
Author
There was a problem hiding this comment.
Yeah - unfortunately the compiler hates it this way 😆 so I think we need to keep the none.rs
Member
There was a problem hiding this comment.
Ahh fair enough, just a thought 😁
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This implements a way to start a task on the app CPU of ESP32 and ESP32-S3.
On ESP32-S3 this currently needs to use a ROM function since the register for the CORE1 boot address can't be found in TRM or SVD. Not a big deal but would be nice to get rid of the ROM function one day.
In this PR I tried to use closures for the APP CPU task - let us see how good that works ... if it doesn't for some reason we can revert to having a free-standing function that gets started and needs to get it's resources via statics.
Fixes #46