Build OpenMV from source...

Please refer to Failed to build openmv from source... · Issue #373 · openmv/openmv · GitHub

My working environment:

Ubuntu: 18.04.1
GCC: gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0
arm-none-eabi-gcc: arm-none-eabi-gcc (GNU MCU Eclipse ARM Embedded GCC, 64-bit) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907]
openmv: (git of September 11, 2018)
micropython: (git of September 11, 2018)

  1. . I can successfully build micropython/ports/unix and have it run on my laptop. However, I don’t have some of the packages from, including:
  2. ) MicroPython-specific libraries:
  • machine
  • network
    2. ) Libraries specific to the OpenMV Cam
  • pyb
  • time
  • sensor
  • image
  • nn
  • gif
  • mjpeg
  • lcd
  • fir
  1. . I realize I need to build openmv from source, together with micropython. I strictly follow
    Linux Installation at Home · openmv/openmv Wiki · GitHub.

It seems Makefiles for building openmv are all for ports/stm32. Therefore, I met the following ERROR messages (even if with arm-none-eabi-gcc installed):

make[1]: Entering directory ‘…/openmv/src/micropython/ports/stm32’
Makefile:11: *** Invalid BOARD specified: boards/OPENMV3. Stop.
make[1]: Leaving directory ‘…/openmv/src/micropython/ports/stm32’
Makefile:428: recipe for target ‘FIRMWARE_OBJS’ failed
make: *** [FIRMWARE_OBJS] Error 2

Just wonder how to build openmv together with micropython from source? In other words, how to build micropython with the supported board openmv?

It looks like it’s just a directory problem?

git checkout openmv

There is NO openmv branch at all under micropython

Can you please help?


Git clone --recursive

Now successfully built…
But, it seems there is NO EXE micropython built?
Which EXE that I need to run?
Or, it has to be run from within OpenMV-IDE?


It outputs a binary file. The binary file has to be loaded on the OpenMV Cam using openmv-ide. You’ll notice the openmv/firmware/OPENMV3 binary files were updated when you built. That’s the result of the compile process.

In fact, the reason why I’m asking this question is: I want to DEBUG my code based on OpenMV libraries…
It looks to me that OpenMV-IDE does NOT provide a DEBUG environment ???
I was wondering if there is any other IDEs or just console command for me to debug OpenMV? Particularly with a simulator like QEMU?

I’m pretty sure I can run micropython, but only a few number of Python standard libraries and micro-libraries are supported from As enumerated already, other libraries are of course NOT supported by micropython, including 2 MicroPython-specific libraries and all Libraries specific to the OpenMV Cam.

I’m NOT actually burn/flash the built/updated OpenMV firmware into the board, but just want to debug the code with the micropython environment(some fundamental libraries) with supporting board OpenMV (some extra libraries) .

Is there a way to do that?


Ibrahim may have some thoughts. He uses GDB with a STLink tool.

Do you mean debug Python scripts ? I don’t know of any tools for debugging MicroPython, if you mean debug the firmware I use stlink v2 + stutil + gdb.

I’m thinking to either debug or run with both MicroPython and OpenMV support, but NOT the general python3 support.

I mean: I prefer type some command lines like:

$ micropython
>>>import xxxxx

And so far, it works for MicroPython. However, that is MicroPython ONLY, and of course, I canNOT import libraries for OpenMV.
The situation is: I can ONLY view the code via OpenMV-IDE, which does NOT have the functionality of debugging yet…

I’m NOT downloading any code down to the chip yet… I just want to simulate running the code by using QEMU, or at least, let me run the code in a MicroPython or OpenMV environment ???

I see what you want to do. Um, yeah, we don’t actually have support to do that. It would make debugging a lot easier to have built a PC environment but we did everything on the MCU.