makefile for omv

Hi,

I’m trying to make small changes to the OPENMV3 fw bundle. I’ve tried using virtualbox and can’t get linux to run well enough to even install qt editor. I also don’t want to pay for parallels or vmware. SO, I’m now trying to just compile using the makefile in the /src/omv folder. However, I keep getting basic errors such as:

p /img
make: p: No such file or directory
make: [/img] Error 1 (ignored)
p /py
make: p: No such file or directory
make: [/py] Error 1 (ignored)
“CC main.c”
/bin/sh: CC main.c: command not found
make: *** [/main.o] Error 127

I’ve tried mimicking the makefile in /src which gives a filepath to arm-none-eabi-xxx for commands such as CC and AS, but that doesn’t seem to help.

I’m somewhat new to building C using a makefile, although I have done this before. That said, it was a “it just works” kind of deal in the past because it was done during labs in college. Here, I’m not sure if the makefile that’s included is even complete or intended to be used.

Let me know if there i’m making obvious errors or if you have any suggested reading or next steps.

Hi, the make file just works when you follow how to build our code here: Home · openmv/openmv Wiki · GitHub

You don’t have to pay for VMware player. It’s free (VMware player workstation is not free though).

Oh, are you on a Mac?

Hi,

Yes, I am on mac. I noted that the make target needs to be OPENMV3, but I tried that and it didn’t work. I tried installing qt editor for Mac, and set things up the same way but that didn’t work either… Isn’t qt editor simply calling ‘make target=openmv3’ ? Or is it doing something more?..

Thanks!

The make command you specified above is all you need it to do. It should just work.

Um, do you have spaces in your path?

What do you mean by ‘spaces in your path’?

Hi,

So I can get the makefile to compile everything after I remove the line: $(MAKE) -C $(MICROPY_DIR)/ports/stm32 BUILD=$(BUILD)/$(MICROPY_DIR) BOARD=$(TARGET) QSTR_DEFS=$(OMV_QSTR_DEFS)

It seems that the directory …/micropython/ports/stm32 is not included in the git repo. As I’m not changing these files I’m going to try loading the FW that has been compiled without this line onto a board to see if it works.

Let me know if you can supply the /micropython/ports/stm32 directory. Thanks!

Yours,

Calvin Ryan

I am now running into the issue that mpconfigport.h is not included at the filepath /src/micropython/py/


The error is as follows:
In file included from /Users/calvinryan/Documents/mv_compile_test/openmv/src/micropython/py/nlr.h:36:0,
from src/nm_bsp.c:6:
/Users/calvinryan/Documents/mv_compile_test/openmv/src/micropython/py/mpconfig.h:45:10: fatal error: mpconfigport.h: No such file or directory
#include <mpconfigport.h>
^~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [/Users/calvinryan/Documents/mv_compile_test/openmv/src/build/winc1500/src/nm_bsp.o] Error 1
make: *** [FIRMWARE_OBJS] Error 2

Where can I get this file?

I see now that mpconfigport.h is used to configure a certain port. Not sure what exactly that entails. How can I make one of these files myself? What kind of information and formatting should it have?

Hi, that new directory is a git submodule. You have to also download it now. Google git submodule is you aren’t familiar with what these are.

Hi,

I think I have make actually running with the micropython submodule cloned as well. But at this point i’m getting errors in files like py_helper.c such as undeclared variables. I’m thinking that rather than go through these I want to just build off of the last stable build of openmv firmware. At what commit did you guys compile the latest (fw 2.7.0?) firmware bundle? Do you agree that this will be the simplest way for me to go forward?

All commits compile. Weird. Um, this is the latest stable version: