-
Notifications
You must be signed in to change notification settings - Fork 96
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
Unify examples and update hal #296
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Good idea to use I guess using |
cc: @jessebraham I'd like to get your input as to whether this is a good idea or an insane one :D |
I think this looks pretty reasonable! Interesting use of aliases, never thought of doing this before. Possibly a little insane, but when has that ever stopped us before 😁
Is there any reason not to just use Other random though, does the |
Good point, we should look at doing that.
I don't think so, esp toolchain has RISCV compiled too, so in theory, it shouldn't make a difference. |
Ahh right I always forget about this detail. Disregard 😁 |
We could add a feature to choose the timer used by esp-wifi internally - might be a useful. Probably not really something that fits into this PR though |
0f71d5f
to
fd174bc
Compare
6a02b4c
to
2431c19
Compare
ad70a57
to
e1eec8a
Compare
This is now ready for a review, the last cfg issue IMO isn't that big of a deal and something we can sort in another PR. |
Unfortunately, all BLE examples (ble, embassy_ble, coex) crash on ESP32-C3 while they work on
They do work fine on ESP32-S3 (their BLE implementations are very similar) |
Is it possible that this comes from the HAL update for some reason and not the rest of this monster? |
I'm almost sure it's the HAL update - will be fun to identify the exact commit since the range is huge |
22a4540
to
cf922a0
Compare
The esp32c6 also works, so I guess it's not RISCV-specific. |
|
I guess its https://github.com/esp-rs/esp-hal/pull/795/files#diff-13b76e7f6d000776921729c895984b5ce03e1657df0c93a36411d63fce98cd45R216, but we need to figure out which "base setting" has messed things up... fun 🙃 |
Yes, it's exactly that .... commenting that makes it work again |
dbe4b15
to
51c8abc
Compare
I think I know how to make it work ... will create a PR in esp-hal when I verified it |
Fix in esp-hal: esp-rs/esp-hal#891 |
If we can find a couple other small, compatible changes to make in |
This PR merges the chip specific examples into one folder, inside the esp-wifi project. To simplify building, alias' have been added to `esp-wifi/.cargo/config.toml` per chip to automatically select the right target and enable the chip feature. Add build script detection for invalid features Fix CI, use build instead of check to detect linker errors enable async feature of hal, this breaks because of interrupt definition for systimer upgrade hal rev upgrade hal rev c6 undo binding modifications fix esp now fix esp coex use released hals, update async examples sync example names sync example names Update examples.md Document alias update build alias
51c8abc
to
22ec789
Compare
I'm keen to get this merged, so I've gone ahead and patched the c3 hal for now. We can replace it with a new release later. |
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! This should make maintaining the examples much easier
This PR merges the chip-specific examples into one folder, inside the esp-wifi project. To simplify building, alias' have been added to
esp-wifi/.cargo/config.toml
per chip to automatically select the right target and enable the chip feature. I've also used git esp-hal to benefit from the recent unification efforts there.Before this PR:
After this PR:
cd esp-wifi cargo $CHIP --example X --features etc
For example,
cargo esp32c3 --example dhcp --features wifi
.I think this syntax is close to what it was before, and much easier to remember than each specific target name if you just want to run a quick example. It's also important to note, this change doesn't affect downstream users of esp-wifi, just folks running the examples in this repo.
TODO
Unanswered questions
compiler_error!
to error out on certain example/target combos