-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Multi SoC embedded runner #114
Closed
Closed
Conversation
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
* The envisioned structure of the new firmware is: [app-nrf, app-lpc] -> SoC-specific RTIC App crates [librunner] -> generic library (initialization, glue towards Trussed etc.) [librunner::soc_*] -> SoC-specific types and defines for generic components * Start pulling in fragments of existing NRF runner code. * Use #[cfg_attr] instead of #[cfg].
* Reshuffle definitions. * Rewrite generic<->SoC interface into a trait.
Our NRF flash implementation suffers from a subtle Trait API difference between littlefs2::driver::Storage and nrf52840_hal::nvmc::Nvmc - one has read() with a mutable self, the other expects a non-mutable self. I would side with the NRF view here (&mut self), as the object may want to modify internal state even though the actual flash contents won't. So fix this incompatibility by patching littlefs2 instead. This commit brings in littlefs2 0.3.2 as a monorepo component, applies the necessary fixes to its Storage trait, and adds a [patch] section to the embedded runner so it picks up the local version.
This commit brings in the scaffolding for building LPC55 alongside NRF52. The following list is a rough summary of the changes: * The conflicting-trait fix for the NRF external flash was actually not enough - lpc55_hal provides littlefs2_*_filesystem!() macros which also implement the (now modified) Storage trait. Added and fixed lpc55-hal as well. - new monorepo component (-> components/lpc55_hal) - added to Cargo.toml [patch] section * Fixed the provisioner-app to only depend on one HAL/PAC depending on the chosen SoC. * Removed build.target from the embedded runner .cargo/config. We are building a single crate for different triplets - which is not supported by cargo. - Add "--target" parameters to cargo invocations in the Makefile. - Guard against invalid SoC/--target combinations in build.rs. * Added the LPC55 runner target and its dependencies to Cargo.toml. * Remove the hardcoded filesystem boundary from build.rs. With the new resolver, cargo now supports different feature flags on build dependencies and target dependencies. Unrelated (could be factored out): * Actually implemented NRF extflash.rs (uses spi_memory::series25). Bonus: For laughs, check out the block comment in src/soc_lpc55/mod.rs.
* restructured Fido crate etc. * sort out linker script business
* renamed nk3mini to nk3am / NK3AM * removed obsolete lpc nk3am references * include UICR programming (REGOUT, NFCPINS) into Makefile for nrf52 * fork cfg.toml into nrf52_cfg.toml and lpc55_cfg.toml * use soc specific *_cfg.toml inside build.rs * include and adapt board_nk3am.rs
* unify identifiers: codebase, _cfg.toml * no more usb-serial * update memory.x related constants * cleanup/improve flash size calc
* adapt build.rs * re-write Makefile * apply newly acquired flexibility
* nrf52: pass delay_timer down into TrustedUI * touch (button) press is now a 2-step timer-supported approach * some safeguarding against other unwanted button-presses * design bootloader interactictions (reboot-styles)
* remove unused imports * remove unused (led)-members * fix unused variables * fix various minor warnings
Is this dead? I mean Solokeys as a whole. What's going on exactly? |
You may be interested in this work. |
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.
hey hey,
we wanted to share our current state of what we call the
embedded
runner, which introduces nRF52 support with an infrastructure capable of even more SoC implementations. LPC55 is also included (although not every detail was ported yet).src/bin/app-nrf.rs
andsrc/bin/app-lpc.rs
representing the "entry-point"profiles/
to create essentialbuild-constants.rs
andmemory.x
during compile-timeembedded/src/
(excludingsoc_*
andbin/
) all sources are generic for all SoCs (still some things might be pulled out from the specific SoC dirs)nrf-bootloader
, this builds the nRF52 bootloader my feeling is this should not be there, although I also don't see where it should fit better, the bottom part of theMakefile
is also therefore WIPdeployment
is essentially for dev/testing, so also please ignorelooking forward for your feedback how you think about this approach and if this might be something you would like to upstream at some point