Skip to content
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

Implement application description for ESP-IDF image format #3058

Open
SergioGasquez opened this issue Jan 29, 2025 · 6 comments
Open

Implement application description for ESP-IDF image format #3058

SergioGasquez opened this issue Jan 29, 2025 · 6 comments
Labels
1.0-blocker linker scripts Linker script issues

Comments

@SergioGasquez
Copy link
Member

New versions of ESP-IDF bootloader expect to have application description, see https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/app_image_format.html#application-description.

Here's the macro in esp-idf-sys: https://github.com/esp-rs/esp-idf-sys/blob/master/src/app_desc.rs#L2

@bugadani suggested having a similar macro on esp_hal::init that could be configured with esp-config

@SergioGasquez SergioGasquez added the status:needs-attention This should be prioritized label Jan 29, 2025
@MabezDev
Copy link
Member

One thing we need to be careful about using esp-config is that we namespace those options properly so they're specific to esp-idf's bootloader and won't overlap with any relevant mcu boot options.

@MabezDev
Copy link
Member

and we should also be careful to only include the relevant linker changes (e.g https://github.com/espressif/esp-idf/blob/c5865270b50529cd32353f588d8a917d89f3dba4/components/esp_system/ld/esp32/sections.ld.in#L300-L322) when supporting the esp-idf bootloader.

@MabezDev MabezDev added linker scripts Linker script issues 1.0-blocker and removed status:needs-attention This should be prioritized labels Jan 29, 2025
@MabezDev
Copy link
Member

Adding the 1.0 blocker as we need to solve this update the bootloaders in espflash for v4? Correct me if I'm wrong

@ivmarkov
Copy link

ivmarkov commented Feb 3, 2025

Adding the 1.0 blocker as we need to solve this update the bootloaders in espflash for v4? Correct me if I'm wrong

That's correct. To my understanding, the first bootloaders that do read esp_app_desc_t are the ones from 5.2.3 and 5.3.2. They are specifically reading the two new fields in esp_app_desc_t (which were pulled from the reserved space) and which are named:

  • min_efuse_blk_rev_full
  • max_efuse_blk_rev_full

They should be set to whatever MCU version range the app can deal with (or to 0 - 99 by default, if the app is compatible with all MCU versions)

@ivmarkov
Copy link

ivmarkov commented Feb 3, 2025

There's also this new guy named mmu_page_size which appears in ESP-IDF bootloaders >= 5.4. I haven't looked into it yet.

@ivmarkov
Copy link

ivmarkov commented Feb 3, 2025

Related: esp-rs/espflash#741

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.0-blocker linker scripts Linker script issues
Projects
Status: Todo
Development

No branches or pull requests

3 participants