Copyright © https://mongoose-os.com

Mongoose OS Forum

frame
ATTENTION! This forum has moved to:

https://community.mongoose-os.com

Do not post any new messages.

How can I make mongoose-os work in multi-core mode on ESP32?

ESP32 is multi-core MCU.

In multi-core mode, the booting info is :

I (1403) cpu_start: Pro cpu up.
I (1415) cpu_start: Starting app cpu, entry point is 0x40080bb4
I (0) cpu_start: App cpu up.
I (1447) cpu_start: Pro cpu start user code
I (1639) phy: phy_version: 258, Nov 29 2016, 15:51:07, 0, 0
I (2334) cpu_start: Starting scheduler on PRO CPU.
starting app_main()
I (905) cpu_start: Starting scheduler on APP CPU.

Tow cores start: Pro cpu and App cpu.

Mongoose-os booting info :

I (1636) cpu_start: Pro cpu up.
I (1647) cpu_start: Single core mode
I (1831) cpu_start: Pro cpu start user code
I (1886) cpu_start: Starting scheduler on PRO CPU.

Only one core is start: Pro cpu up.

Can mongoose-os work in multi-core mode? And how?

Comments

  • rojerrojer Dublin, Ireland

    you'll need to change this setting and rebuild firmware.
    we have not tested this mode yet, though.

  • aiferaifer China

    Thanks.
    By the way, when mos works in single-core mode, another core is no use?

  • rojerrojer Dublin, Ireland

    yes, it's idle

  • mookiedogmookiedog Washington, USA

    you'll need to change this setting and rebuild firmware.
    we have not tested this mode yet, though.

    When you say "rebuild firmware" are you saying rebuild the whole SDK?

    More importantly: are there any plans at Mongoose OS to officially support the other core? This is perhaps the most important feature of the ESP32 and I would really like to use it. Really, really, really :)

  • rojerrojer Dublin, Ireland

    setting the SDK option and rebuilding fw should be enough to get it going. i tried it, and it seemed to work - for a while at least. but at this point i would not recommend using it.

    yes, there is a plan - we definitely want mOS to run ESP32 in multicore mode, but there is no timeline at this point.

  • I'm testing with 2 cores enabled (CONFIG_FREERTOS_UNICORE=n). It crashes randomly when you do some http requests...
    Single core works perfectly

  • rojerrojer Dublin, Ireland

    that's sort of what i'd expect. mos in its current form is not thread-safe and needs careful examination to add locking.

  • mookiedogmookiedog Washington, USA

    I was thinking about a stop-gap measure to help us use the second core. Would it be possible for you to enable the second core in your generic builds, but limit Mongoose to only run on the existing core? For example, you could change the mongoose API to return a new, generic "operation not permitted on this core" error if any Mongoose call was made from the newly enabled core. That would at least let us start experimenting with the second core without having to figure out how to build the SDK. It might be better than nothing.

  • tripflextripflex Orlando, FL

    bump bump I agree with @mookiedog

  • mamuespmamuesp Germany/Northern coast

    i don't. If you look around seeing the problems coming up with using 2 cores, I'd rather use only one and have a stable system.

Sign In or Register to comment.