Dual core bootloader on a single core chip?

cruvus
Posts: 59
Joined: Fri Jul 08, 2022 5:08 pm
Location: Planet Earth

Dual core bootloader on a single core chip?

Postby cruvus » Fri May 24, 2024 11:14 am

Can I use a bootloader compiled for dual core on a single core chip? The app is compiled for single core.

I somewhere read that we should not use a bootloader compiled for single core when the app is for dual core. But what about the other way round?

The bootloader documentation does not say anything about that:
https://docs.espressif.com/projects/esp ... oader.html

BTW, do you plan an auto detect mechanism for the IDF? esp_chip_info_t.cores shows the correct core count, why not use it in the initialization process so we can compile one app to fit both single and dual core chips?
ESP32 / ESP-IDF 5.1.4

boarchuz
Posts: 606
Joined: Tue Aug 21, 2018 5:28 am

Re: Dual core bootloader on a single core chip?

Postby boarchuz » Fri May 24, 2024 11:44 am

A quick search for "CONFIG_FREERTOS_UNICORE" in bootloader_support reveals a lot of initialisation dependent on this, many of them calling into ROM functions. I'd expect to find something like an "assert(chip_efuse_is_dual_core());" somewhere too if I looked hard enough.

So it's definitely not officially supported. If you don't hit an explicit check for chip capability, there's no telling what the ROM functions are going to do with invalid args (eg. mmu_init(1)).
cruvus wrote:
Fri May 24, 2024 11:14 am
BTW, do you plan an auto detect mechanism for the IDF? esp_chip_info_t.cores shows the correct core count, why not use it in the initialization process so we can compile one app to fit both single and dual core chips?
There's always a balance between BOM efficiency, runtime efficiency, and development efficiency. There's already a *lot* of dead code in a typical ESP-IDF build. I hope something like this never happens, but if it does I really hope it's behind an opt-in config option.

MicroController
Posts: 1734
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Dual core bootloader on a single core chip?

Postby MicroController » Fri May 24, 2024 6:16 pm

cruvus wrote:
Fri May 24, 2024 11:14 am
use it in the initialization process so we can compile one app to fit both single and dual core chips?
No. No, no, no.
I agree with @boarchuz in that there is absolutely no value in putting two systems/OS versions onto a chip when we can trivially determine beforehand which half of that will never be executed.

cruvus
Posts: 59
Joined: Fri Jul 08, 2022 5:08 pm
Location: Planet Earth

Re: Dual core bootloader on a single core chip?

Postby cruvus » Fri May 24, 2024 11:11 pm

I cannot determine that. People are running the app on the ESP32-U4WDH (the old one and the new one).
ESP32 / ESP-IDF 5.1.4

Who is online

Users browsing this forum: MSN [Bot] and 188 guests