Comments (5)
Since the issue of bootloaders is likely rather complex, I'm thinking for the time being we should just default to the standard boot mode supported by all chips and put direct boot behind a feature instead. This keeps the default configuration consistent across devices. We can always change this again in the future if needed, but for right now unless anybody has any objections I think this is probably the correct choice.
from esp-hal.
Controversial take, maybe we should ignore direct boot all together.
Ideally, we'd like to run all our chips without a second stage boot loader, and currently we are basically using the boot loader for two things:
- Setting up the flash mappings and cache
- Reading the partition table and booting the main app
Given that for our no_std use case we only have one "partition", the app partition, that then leaves us with the boot loader only setting up the flash and instruction cache. Maybe we should look at doing that for all our chips?
Maybe this isn't such an easy task, but it seems like MMU is documented in the reference manual (and there are some registers in DPORT to do with the MMU too). At the very least we could cheat for a while and use the ROM functions, until we have a pure Rust solution.
Thoughts?
from esp-hal.
I probably don't know enough about the first stage boot loader - I thought it can only load code into RAM and executes that?
Long term my concern would be how to handle OTA updates and encryption. Haven't looked into encrypted firmware image handling yet
from esp-hal.
Maybe this isn't such an easy task, but it seems like MMU is documented in the reference manual (and there are some registers in DPORT to do with the MMU too). At the very least we could cheat for a while and use the ROM functions, until we have a pure Rust solution.
I remember trying to figure out setting up the cache for the C3 variant and struggling with it:
For the ESP32-C3 there appears to be a dedicated peripheral that is responsible for the cache and the peripheral was not yet documented in the TRM. I just checked again and with ESP32-C3 TRM v0.6 that still seems to be the case: While the dedicated peripheral is mentioned in the peripheral mapping table (address 0x600C_4000
), there's no corresponding description. AFAIK, the only way to access the external memory is through the cache, so we also can't just bypass it for the time being.
The official SVD already has the registers and even field descriptions, but their register description reads
<description>This description will be updated in the near future.</description>
.
In general (assuming that the peripheral gets eventually documented or with just using the ROM functions), I like the idea to switch to normalboot
for the ESP32-C3 by default. That'll probably allow for doing more things in the future (secure boot, flash encryption etc.) and would establish consistency among the variants.
from esp-hal.
+1 for defaulting to the standard boot for C3, also naming the feature is much easier: "direct-boot" even matches what is used by espflash
from esp-hal.
Related Issues (20)
- embassy tick options like `tick-hz-16_000_000` seems to have been removed
- Update the checklist in the PR template
- ESP32C3 USB pullup interferes with GPIO configuration HOT 1
- Remove `'static` bound requirement on DMA buffers? HOT 1
- RFC: What to do about `async` vs `direct-vectoring` features? HOT 1
- Find a way to use ROM memset/memcpy - if it can't work, we should ensure memcpy and memset are in RAM somehow HOT 5
- TRNG #1200 breaks esp-wifi for ESP32-S2 HOT 1
- esp-hal 0.16.0 : Can't compile esp-wifi with the new esp-hal 0.16.0 HOT 3
- TWAI Overrun error when compiling in debug mode HOT 3
- Be explicit about the need to build using the `release` profile HOT 2
- Donβt forget to upgrade the defmt version in esp-backtrace and esp-println. HOT 1
- Automatically update the links and version numbers in the documentation index HOT 1
- Try to reduce duplicated code between `I2C`/`LP_I2C` drivers HOT 2
- Add ETM tasks and events for timers HOT 2
- The `resources/index.html` file should be converted to a template, and the packages and their versions should be populated dynamically.
- `UsbSerialJtag`s `core::fmt::Write` impl is blocking HOT 1
- Reading from ADC1 is broken once esp-wifi initialize() function has been called HOT 10
- RFC: Investigate the need for a lower-level layer of abstraction HOT 2
- Unclear behaviour of `GpioPin<Output<OpenDrain>, _>::is_high()` for ESP32 HOT 5
- Rng Initialization breaks ADC1 (at least on ESP32) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp-hal.