OpenMV Firmware Error

I am trying to build an OpenMV firmware so I can try to use it on a Nicla Vision.

The Vision has 1MB of RAM and the model reports requiring only 206kb of RAM.

When I try do deploy the OpenMV firmware, I get the following error:

Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
Including User C Module from /app/openmv/src/omv/modules
GEN /app/openmv/src/PORTENTA_build/micropython/genhdr/mpversion.h
CC ../../extmod/moduplatform.c
CC ../../shared/runtime/pyexec.c
CC moduos.c
CC /app/openmv/src/omv/modules/py_tf.c
/opt/gcc/gcc-arm-none-eabi-10-2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: /app/openmv/src/PORTENTA_build/bin/firmware.elf section `.text' will not fit in region `FLASH_TEXT'
/opt/gcc/gcc-arm-none-eabi-10-2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: region `FLASH_TEXT' overflowed by 6708 bytes
collect2: error: ld returned 1 exit status
make: *** [omv/ports/stm32/ firmware] Error 1
Application exited with code 2

Job failed (see above)

When I try to download the model as a OpenMV Library, it build fine but I get the following error when I try to run it:

Exception: Failed to load "trained.tflite", did you copy the .tflite and labels.txt file onto the mass-storage device? (Arena size is too small for all buffers. Needed 207376 but only 47040 was available.

Is my model simply to big? I have tried reducing the frame size down to QQVGA…

Hi @lukedc,

The error is related to the flash memory. How do you build your firmware? I see your logs mention Portenta.
FYI, we’re going to release FOMO deployment for Nicla Vision very soon.

In the meantime, maybe check with @rovai as he made it work using the OpenMV library.


Sorry - that is an important detail… I got this error when I was trying to deploy a OpenMV Firmware on the EI Studio. This is for an Image Classification model - it is project number: 84358

Hi @lukedc,

I’ve checked with our embedded team and at the moment you’ll need to select a smaller MobileNet model and/or reduce the image resolution. In the future we’ll look into deploying OpenMV firmware for specific boards to avoid the deployment to fail.


Ah! That makes a lot of sense. There are a wide range of OpenMV boards, each with a different amounts of RAM. Thanks for looking into this!!

For now, using the OpenMV Library approach works fine.