Upcoming maintenance
Dear Customers and Partners.
This website will be undergoing scheduled maintenance on June 14, 2023. Please be aware there may be disruption to the developer portal website and associated services during the scheduled maintenance period.
This upgrade is essential to ensure the continued performance, reliability, and security of Developer World.
We apologize for any inconvenience.
Questions regarding Multiprocessing
-
Hi,
I'm a bit confused on how multiprocessing works on spresense. I've noticed the documentation mention that there are 6 "equal" application core. But the Arduino library has an example where there is one main core and the other sub cores are programmed individually. The C++ SDK also has an example which uses symmetric and asymmetric multiprocessing.Here are my questions:
-> Can you please explain how multiprocessing can be used on spresense?
-> From what I've understood, Nuttx is not used to handle any of the multiprocessing. Is this correct?
-> Can you please share which library should be used for multiprocessing and the examples for them?Thanks
-
Hi @tsg-0-0-0-0-0-0-0 ,
You can use ASMP or SMP. You can also use them together.
Information about ASMP can be found here: https://developer.sony.com/develop/spresense/docs/sdk_developer_guide_en.html#_asmp_framework. This is a framework that provides initialization and communication between cores. ASMP does not use NuttX. Example: https://github.com/sonydevworld/spresense/tree/master/examples/asmp/
Information about SMP you can find here: https://developer.sony.com/develop/spresense/docs/sdk_tutorials_en.html#_feature_smp and https://nuttx.apache.org/docs/latest/reference/os/smp.html. SMP is controlled by NuttX so you just have to enable it and assign how many cores you want to allocate for SMP. Example: https://github.com/sonydevworld/spresense-nuttx-apps/tree/1a501330f462e8d433c31fd6f6b7822a70ed0c26/testing/smp
You can use ASMP and SMP together. You can see how this works using
example/smp_asmp
config.Best Regards,
Kamil Tomaszewski -