AMP (Asymmetric Multiprocessing) on the Arduino Nicla Vision with openmv

Hi all,

I’m trying to run openmv on the M7 core and arduino code on the M4 core of the arduino nicla vision, so that the two cores can communicate via rpc.

My approach is based on this blog post and this guide it is referencing.
It clearly states that running micropython and arduino code simultaneously on two cores should be possible.

My problem is that I don’t now what kind of library for openmv to use so that the two cores can communicate via rpc like described in the guide.

In the openmv docs there’s also openamp listed as a library, but when I try to import it, it can not be found and it is also not listed under possible libraries with help('modules').
Why is the openamp library not included in the latest release of openmv?

msgpackrpc from the arduino guide also seems to depend on openamp.

Is there a way to use AMP with arduino and openmv?
If not is there an alternative for using the arduino camera with openmv’s features and running arduino C/C++ code?

I’m using openmv 4.5.8 with micropython 1.23.

Thank you!

We don’t have support for this right now in our firmware. However, we just updated to MicroPython 1.23. So, we have access to everything.

Ibrahim can comment on this more. However, he’s on vacation at the moment.

It is possible to run OpenMV firmware and Arduino sketch on the Nicla, and yes msgpackrpc is the library to use for AMP RPC once you have that working. However, the only free flash space for the M4 firmware (when using our firmware) is near the beginning of the flash (where there’s an unused sector), but the Arduino IDE/firmware doesn’t support placing the firmware at arbitrary addresses (it only supports fixed flash split/address like 50-50 or 1.5/0.5 etc…). I could ask if this is something that Arduino would be interested in fixing, when everyone gets back from vacations. Note that even if this is fixed, the sketch will be limited to 128K. Alternatively, if you know your way around the firmware, you can reduce the size of our firmware to make the 1.5/0.5 work, and then enable open-amp for Nicla.

The situation is different for Giga as it has an SDRAM, so we could just reserve some of it and run the M4 from there. However up until recently, M4 couldn’t run from SDRAM, but I’ve made a series of fixes to both Arduino firmware and Micropython to fix that, but it will be a while before things get released (new mbed core, new micropython release etc…)