Skip to content

Upgrade esp_idf_svc to 0.48.1 #243

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

Closed

Conversation

juliankrieger
Copy link
Contributor

No description provided.

Copy link
Contributor

@Vollbrecht Vollbrecht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add the cfg.toml.example files again so user have a template

@Vollbrecht
Copy link
Contributor

Also since you seam to affected by the current bug where you need to set the CC env variable( you used it in your PR), it would be super helpful if you can try out the current https://github.com/rust-lang/cc-rs git master version. Today they merged a potential fix and it would be nice if that is working, or if we do need to change anything.

Its not directly related but we need the feedback ;D

You can test the current cc branch by adding

[patch.crates-io]
cc = { git = "https://github.com/rust-lang/cc-rs" }

and running cargo update afterwards

@juliankrieger
Copy link
Contributor Author

@Vollbrecht I will try it. Strangely enough, I am still getting this error when compiling non-rust PIO projects??

@juliankrieger
Copy link
Contributor Author

@Vollbrecht I am afraid the new cc version fails unspectacularly with

 Run Build Command(s):/Users/wintermute/.espressif/tools/ninja/1.10.2/ninja cmTC_7a3f1 && [1/2] Building C object CMakeFiles/cmTC_7a3f1.dir/testCCompiler.c.obj
      FAILED: CMakeFiles/cmTC_7a3f1.dir/testCCompiler.c.obj 
      /Users/wintermute/.espressif/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin/riscv32-esp-elf-gcc   -march=rv32imc_zicsr_zifencei  -ffunction-sections -fdata-sections --target=riscv32imc_zicsr_zifencei-esp-espidf -o CMakeFiles/cmTC_7a3f1.dir/testCCompiler.c.obj -c /Users/wintermute/Dev/Work/std-training/intro/http-server/target/riscv32imc-esp-espidf/debug/build/esp-idf-sys-476fda9ea20abe34/out/build/CMakeFiles/CMakeTmp/testCCompiler.c
      riscv32-esp-elf-gcc: error: unrecognized command-line option '--target=riscv32imc_zicsr_zifencei-esp-espidf'
      ninja: build stopped: subcommand failed.
    ```

@juliankrieger
Copy link
Contributor Author

juliankrieger commented Mar 25, 2024

For the time being I've added back the examples. PR should be in a mergeable state now.

@@ -18,7 +18,7 @@ opt-level = "z"
[dependencies]
anyhow = "=1.0.75"
embedded-svc = "=0.26.4"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

embedded-svc also needs updating in every place, thats why the CI fails to run this.

Copy link
Contributor

@Vollbrecht Vollbrecht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you have a look at the 3 failed CI builds. It boils down to a) also updating embedded-svc b) For the http client you missed a remove example file c) some minor clippy stuff

@juliankrieger
Copy link
Contributor Author

juliankrieger commented Mar 25, 2024

@Vollbrecht Ah. Sorry. It's late. I'll fix it.

@juliankrieger
Copy link
Contributor Author

@Vollbrecht would you have preferred the dead code in http-server to be left included? I could've toggled the clippy flag instead of removing it.

@juliankrieger
Copy link
Contributor Author

@Vollbrecht Seems like mqtt has had breaking changes in embedded svc 0.27.0... I will have to look at this again tomorrow.

@juliankrieger
Copy link
Contributor Author

@Vollbrecht I've changed the mqtt examples to fit into the new embedded_svc mqtt API at https://github.com/esp-rs/embedded-svc/blob/master/CHANGELOG.md

@juliankrieger
Copy link
Contributor Author

@Vollbrecht ready to merge.

@prismv
Copy link

prismv commented Jun 7, 2024

I tried to check my new ESP32-C3-Rust-Kit with hardware-check sub-project - just to find out that it does not work without fixing common/wifi/lib.rs as shown in this merge request (and some crate versions fixing).

> rustup toolchain list
stable-x86_64-unknown-linux-gnu (default)
nightly-2023-11-14-x86_64-unknown-linux-gnu (override)

As a beginner I have no clue how to force older versions of crates (despite fixing Cargo.toml based on information given by recommended vscode extensions.

Or is #253 the show stopper (indeed no blinking Led ...)?

@Vollbrecht
Copy link
Contributor

Vollbrecht commented Jun 7, 2024

@prismv we are close to a new release of esp-idf-svc. If you want to use the latest fixes and working on a standalone project as described in the book mentioning the template, you can simply do the following.

Add this to your Cargo.toml

[patch.crates-io]
embuild = { git = "https://github.com/esp-rs/embuild" }
esp-idf-svc = { git = "https://github.com/esp-rs/esp-idf-svc" }
esp-idf-hal = { git = "https://github.com/esp-rs/esp-idf-hal" }
esp-idf-sys = { git = "https://github.com/esp-rs/esp-idf-sys" }
embedded-svc = { git = "https://github.com/esp-rs/embedded-svc" }

than running cargo clean + cargo update+ cargo build.

This way you are using the latest git master version. And you can remove them in the couple next days when we have a new release up.

The book needs updating after we pushed the new release but one thing at a time, and in general most things should be pretty much the same.

@SergioGasquez
Copy link
Member

esp-idf-svc 0.49.0 was released, the training would need to be updated to use it. We can do it in this PR or I could reopen a new PR for it.

@SergioGasquez
Copy link
Member

Closed in favor of #257

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants