Comments (5)
Perhaps a somewhat odd but simple strategy, what about setting the flash size to the addressable per chip and then letting the flashing step detect the failures?
E.g for the esp32 the max external flash supported is 16MB, we'd set that in the linker script. If someone tried to flash a 12MB program on a physical module with only 4MB the flashing step will fail.
from esp-hal.
Maybe flash size was not the best example. What about things like guaranteed allocated stack-size (which are not manageable in a sane way with cargo features)
from esp-hal.
I think this is a duplicate of #1111, so lets continue the discussion there.
from esp-hal.
I tried https://crates.io/crates/toml-cfg and it seems to work great for this use-case. It works in the library code and in build.rs
I guess we could just use it as is, however there are a few things I don't like that much (for our use-case)
- the sections in the
cfg.toml
need to match the pkg-name of the library, so users would need to have sections likeesp-hal-common
andesp32c3-hal
etc. - would be better to have something likeesp-hal
or maybe don't needing a namespace at all - would be better to have some other name than
cfg.toml
for the configuration file (e.g.esp-hal.cfg
oresp-hal-cfg.toml
)
Maybe we could just pick-up the idea of toml-cfg and have our own macro (in esp-hal-procmacros
)
from esp-hal.
Another option might be to use cargo's built-in [env] section
. This might get a bit long if we have a lot of tunables though.
from esp-hal.
Related Issues (20)
- The `main` procmacro is not re-exported in the current published releases of `esp-hal` and `esp-hal-embassy`
- TWAI is not working for ESP32-S3 HOT 3
- Latest release (v0.2.2) of `xtensa-lx-rt-proc-macros` not used by published `xtensa-lx-rt`
- Unable to Configure Prescaler for MCPWM Timer in esp-hal
- Implement touch support for `esp32s2` and `esp32s3`.
- Add listen only and self-test mode support for TWAI
- I2C slave driver HOT 2
- TWAI HIL test HOT 1
- xtensa-lx feature not found in esp-hal HOT 1
- esp32s3: i2c async broken in #1900 HOT 5
- Make AnyPin accessible from `::gpio::AnyPin`? HOT 3
- Implement embassy_embedded_hal::SetConfig HOT 1
- Feature Request: Sleep and wake support for ESP32C2 HOT 3
- SD/MMC driver HOT 1
- esp_wifi does not compile with esp_ieee802154 imported at the same time HOT 1
- Support using `trouble` as a BLE stack
- Remove all remaining `#![allow(missing_docs)]` attributes and finish documenting all public types HOT 2
- Update `embassy-executor` dependency in esp-hal-embassy crate.
- GPIO regression on esp32 after touch peripheral was merged HOT 2
- Provide a more robust solution for getting the current time HOT 2
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.