Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

incorrect definition of esp_app_desc_t.reserv3 fails to compile with ESP IDF v5.4 #369

Closed
mike1703 opened this issue Feb 12, 2025 · 1 comment · Fixed by #372
Closed
Labels
bug Something isn't working

Comments

@mike1703
Copy link
Contributor

Bug description

the definition of esp_app_desc_t seems to be incorrect when used with ESP-IDF 5.4 according to the definition in https://docs.espressif.com/projects/esp-idf/en/v5.4/esp32/api-reference/system/misc_system_api.html#_CPPv4N14esp_app_desc_t7reserv3E

When using the esp_idf_svc::sys::esp_app_desc!() macro I get the following error :

error[E0308]: mismatched types
   --> /home/esp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp-idf-sys-0.36.1/src/app_desc.rs:102:26
    |
2   | macro_rules! esp_app_desc {
    | -------------------------
    | |
    | in this expansion of `esp_idf_svc::sys::esp_app_desc!` (#1)
    | in this expansion of `$crate::esp_app_desc!` (#2)
...
5   |         $crate::esp_app_desc!(false);
    |         ---------------------------- in this macro invocation (#2)
...
102 |                 reserv3: [0; 4],
    |                          ^^^^^^ expected an array with a fixed size of 3 elements, found one with 4 elements
    |
   ::: src/main.rs:42:5
    |
42  |     esp_idf_svc::sys::esp_app_desc!();
    |     --------------------------------- in this macro invocation (#1)

Note:

reserv3: [0; 4],

While the official definition is

uint8_t reserv3[3]
    reserv3
  • Would you like to work on a fix? [y]

To Reproduce

use ESP IDF v5.4 and include esp_idf_svc::sys::esp_app_desc!(); in your main()

Expected behavior

This could be a fix
mike1703@e06e6ef

Environment

  • via esp-idf-svc = "0.51.0"
    • => esp-idf-sys = "0.36.1"
      ESP_IDF_VERSION = { value = "tag:v5.4" }
@mike1703 mike1703 added the bug Something isn't working label Feb 12, 2025
@ivmarkov
Copy link
Collaborator

@mike1703 Yes, you are correct. Please open a PR and I'll merge ASAP.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants