Page 1 of 1

makefile for omv

Posted: Mon Mar 12, 2018 4:53 pm
by calvinmryan
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.

Re: makefile for omv

Posted: Mon Mar 12, 2018 5:08 pm
by kwagyeman
Hi, the make file just works when you follow how to build our code here: https://github.com/openmv/openmv/wiki

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

Re: makefile for omv

Posted: Mon Mar 12, 2018 5:09 pm
by kwagyeman
Oh, are you on a Mac?

Re: makefile for omv

Posted: Tue Mar 13, 2018 5:44 pm
by calvinmryan
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!

Re: makefile for omv

Posted: Tue Mar 13, 2018 7:49 pm
by kwagyeman
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?

Re: makefile for omv

Posted: Thu Mar 15, 2018 3:05 pm
by calvinmryan
What do you mean by 'spaces in your path'?

Re: makefile for omv

Posted: Thu Mar 15, 2018 3:29 pm
by calvinmryan
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

Re: makefile for omv

Posted: Thu Mar 15, 2018 3:48 pm
by calvinmryan
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?

Re: makefile for omv

Posted: Thu Mar 15, 2018 3:52 pm
by calvinmryan
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?

Re: makefile for omv

Posted: Thu Mar 15, 2018 5:53 pm
by kwagyeman
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.

Re: makefile for omv

Posted: Mon Mar 19, 2018 9:26 am
by calvinmryan
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?

Re: makefile for omv

Posted: Mon Mar 19, 2018 11:11 pm
by kwagyeman
All commits compile. Weird. Um, this is the latest stable version:

https://github.com/openmv/openmv/commit ... d5d91825e4