Page 1 of 1

Dual core bootloader on a single core chip?

Posted: Fri May 24, 2024 11:14 am
by cruvus
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?

Re: Dual core bootloader on a single core chip?

Posted: Fri May 24, 2024 11:44 am
by boarchuz
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.

Re: Dual core bootloader on a single core chip?

Posted: Fri May 24, 2024 6:16 pm
by MicroController
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.

Re: Dual core bootloader on a single core chip?

Posted: Fri May 24, 2024 11:11 pm
by cruvus
I cannot determine that. People are running the app on the ESP32-U4WDH (the old one and the new one).