align FirmwareInfo with esp_app_desc_t field size.#40
align FirmwareInfo with esp_app_desc_t field size.#40taunusflieger wants to merge 1 commit intoesp-rs:masterfrom
Conversation
|
embedded-svc is meant to be completely unaware of esp-idf, so I don't think we should be changing this struct to fit esp-idf's alignment needs unless there is another valid reason to do so. Instead, I think that esp-idf-svc should be handling the conversion from the esp-idf type, to the svc type. If it turns out the embedded-svc struct is unfit for its purpose, we can change it. Thoughts @ivmarkov @zRedShift? |
I agree. If there is some field in the |
|
The current implementation where the version field is 24 bytes long, leads to a bug in This can happen for example when using git tags with fairly long names (because I'm not sure if this should be solved here, by increasing field sizes, or in |
|
This just caught me, esp-docs say the version string accepts 32 bits (including null terminator), but
I think given that this is ONLY currently supported by the esp, it would make sense to at least align to their implementation. Alternatively, |
This PR addresses the differences (some fields are too small, one field is too large) in field sizes described in issue esp-rs/esp-idf-svc#204. It ensures, that the fields in
FirmwareInfoare large enough to hold the fields defined inesp_app_desc_t. For details see the issue above.