Page 1 of 1

openMV Firmware Build Instructions

Posted: Mon Aug 13, 2018 2:42 pm
by drewwestrick
I've looked extensively on this forum and the website. Do instructions exist for building the openMV firmware from source? I see the Makefiles in the /src directory on the open-mv github account but is there a document that outlines the build process and/or requirements and any general documentation regarding the device firmware?

Re: openMV Firmware Build Instructions

Posted: Mon Aug 13, 2018 6:13 pm
by kwagyeman
If you googled it this is the first result: https://github.com/openmv/openmv/wiki

Re: openMV Firmware Build Instructions

Posted: Tue Aug 14, 2018 10:00 am
by drewwestrick
Thanks, *slaps forehead*. I did not look at the wiki page (should have looked there).

Re: openMV Firmware Build Instructions

Posted: Tue Aug 14, 2018 6:57 pm
by drewwestrick
Hope this isn't an obvious error. I've followed the build instructions on the wiki and I have the prerequisites installed along with the QtCreator IDE. I've set the Qt Projects Make arguments to TARGET=OPENMV3. When I build, things start compiling just fine, but then it gives the following error about 10 seconds into the build process:

Code: Select all

make[1]: Leaving directory '/home/drewwestrick/openmv/src/sthal/f7'
make[1]: Entering directory '/home/drewwestrick/openmv/src/micropython/ports/stm32'
Makefile:5: *** Invalid BOARD specified.  Stop.
make[1]: Leaving directory '/home/drewwestrick/openmv/src/micropython/ports/stm32'
Makefile:428: recipe for target 'FIRMWARE_OBJS' failed
make: *** [FIRMWARE_OBJS] Error 2
18:50:51: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project openmv (kit: Desktop Qt 5.11.1 GCC 64bit)
When executing step "Make"
It appears I'm not specifying the right board but from what I can tell the TARGET=OPENMV3 variable should be taking care of this. Also FYI I've tried this on both master and the 3.0 tag.

Re: openMV Firmware Build Instructions

Posted: Wed Aug 15, 2018 1:01 am
by kwagyeman
Ibrahim?

Re: openMV Firmware Build Instructions

Posted: Wed Aug 15, 2018 8:51 am
by drewwestrick
I figured out what the issue is. I forked the openmv/micropython repo and checked it out manually instead of using the --recursive function when cloning the openmv repo. By doing this, the repo was set to the master branch not the openmv branch which means the OPENMV boards weren't present in the ports/stm32/boards directory. Once I did a checkout of the openmv branch the project built just fine.

This might be a good note to add to the wiki for people forking their own copies of the micropython repo. I'd be happy to suggest an edit if you would like me to.

Re: openMV Firmware Build Instructions

Posted: Wed Aug 15, 2018 1:30 pm
by kwagyeman
Mmm, I see. I think the recursive flag is in the build docs.

Um, sure. Just edit the MD file and send a copy. Not sure if you can PR wiki pages.

Re: openMV Firmware Build Instructions

Posted: Wed Aug 15, 2018 1:57 pm
by drewwestrick
Exactly, the --recursive flag pulls the proper openmv commit which right now is fc69b6a (aka head of the openmv branch). If you fork your own version of openmv and micropython then you need to do a git checkout openmv to switch to the branch which has the right board files.

I went ahead and made an edit to the wiki that should point those forking their own repos in the right direction:
https://github.com/openmv/openmv/wiki

Re: openMV Firmware Build Instructions

Posted: Wed Aug 15, 2018 3:35 pm
by kwagyeman
Awesome!

Re: openMV Firmware Build Instructions

Posted: Fri Sep 07, 2018 1:08 am
by jurban
May I suggest an improvement in the Firmware Update dialogue for next time? I interpreted the existing message that the blue LED indicates it is complete with the update. While it flashed blue, it was apparently RED when complete. So, I stared at it for a while as instructed. I think, if the RED LED is the indicator that the update is successful, the dialogue/message should reflect that.

<or else I'm totally wrong and just bricked my cam>

Re: openMV Firmware Build Instructions

Posted: Fri Sep 07, 2018 1:20 am
by kwagyeman
The red LED means the OS is accessing the file system. The blue LED is the script running the heart beat. You should just need to see the blue LED.

Re: openMV Firmware Build Instructions

Posted: Fri Nov 16, 2018 1:32 am
by victagayun
Hello completely noob here.

I dont have any idea what "recursive" means etc. etc.
I also havent tried compiling as per the procedure in the wiki yet, will try it later.

My dumb questions are (if it is not top secret to answer):

1. How do you go on developing the openmv firmware?
What IDE are you using?
How those file (from git) are imported into the IDE as project files?
how do you compile it?
on cli by gcc?

If I am to use Nucleo-H7 board (or other boards), the Xtal is 8Mhz and 144pins while openmv H7 is 12Mhz and 100pins (viewtopic.php?f=3&t=965&p=6492&hilit=nucleo#p6041),
2. what are the changes needed be?
Do I use Cubemx for the setup files and pinout definitions (for that "init" purpose only https://www.kickstarter.com/projects/17 ... MTY3NzQ%3D)?
Because I have this impression that the STCube is only to init ports and freq among others.
how to compile afterwards?

3. Since I see that STCube, SW4STM32, mbed and Atollic are free, why not use those as IDE?
I may be wrong on STCube as being IDE because I havent tried it.

Re: openMV Firmware Build Instructions

Posted: Fri Nov 16, 2018 4:52 pm
by iabdalkader
victagayun wrote:
Fri Nov 16, 2018 1:32 am
Hello completely noob here.

I dont have any idea what "recursive" means etc. etc.
I also havent tried compiling as per the procedure in the wiki yet, will try it later.

My dumb questions are (if it is not top secret to answer):

1. How do you go on developing the openmv firmware?
What IDE are you using?
How those file (from git) are imported into the IDE as project files?
how do you compile it?
on cli by gcc?

If I am to use Nucleo-H7 board (or other boards), the Xtal is 8Mhz and 144pins while openmv H7 is 12Mhz and 100pins (viewtopic.php?f=3&t=965&p=6492&hilit=nucleo#p6041),
2. what are the changes needed be?
Do I use Cubemx for the setup files and pinout definitions (for that "init" purpose only https://www.kickstarter.com/projects/17 ... MTY3NzQ%3D)?
Because I have this impression that the STCube is only to init ports and freq among others.
how to compile afterwards?

3. Since I see that STCube, SW4STM32, mbed and Atollic are free, why not use those as IDE?
I may be wrong on STCube as being IDE because I havent tried it.
Those are all a matter of personal preference, for example I use the command line (vim, make etc.. old school :/) Kwabena uses Eclipse I think. You can use whatever tool/framework/IDE/board you like, you can even build the code on PC, however you do need to know what you're doing as I doubt you'll find someone here with enough time to go through all that with you. Would an introductory book about all that be helpful ?

Re the crystal frequency, I think there are a few places it needs to be changed, I can't remember them all right now, search for HSE_VALUE

Re: openMV Firmware Build Instructions

Posted: Sat Feb 09, 2019 12:15 am
by victagayun
iabdalkader wrote:
Fri Nov 16, 2018 4:52 pm
Those are all a matter of personal preference, for example I use the command line (vim, make etc.. old school :/) Kwabena uses Eclipse I think. You can use whatever tool/framework/IDE/board you like, you can even build the code on PC, however you do need to know what you're doing as I doubt you'll find someone here with enough time to go through all that with you. Would an introductory book about all that be helpful ?

Re the crystal frequency, I think there are a few places it needs to be changed, I can't remember them all right now, search for HSE_VALUE
Hello from wiki https://github.com/openmv/openmv/wiki#q ... stallation, it seems that the IDE used is QT Creator? Can you confirm that and I would try to install and use it too?

Re: openMV Firmware Build Instructions

Posted: Sat Feb 09, 2019 3:06 pm
by kwagyeman
Hi, if you are trying to build the firmware it is expected you know what you are doing.

Re: openMV Firmware Build Instructions

Posted: Sat Feb 09, 2019 6:00 pm
by victagayun
kwagyeman wrote:
Sat Feb 09, 2019 3:06 pm
Hi, if you are trying to build the firmware it is expected you know what you are doing.
In Step 8 Under make arguments add TARGET=OPENMV3 to build for the OpenMV Cam M7 (or TARGET=OPENMV2 to build for the OpenMV Cam M4). If you don't add this the firmware is built for the OpenMV Cam M4 by default.

I used TARGET=OPENMV4 for H7 in both Build Step and Clean Step.

Image

In step 9 Then switch over to the Run Tab (top area) and go to the Run configuration area on the same page. Add a Custom Executable option. For the executable write /home/(username)/openmvide/bin/openmvide if you installed OpenMV IDE to the default location. This will allow you to launch OpenMV IDE from Qt-Creator which has the boot loader we'll use to program your OpenMV Cam.

It says "(top area)" which is confusing. Could be version different, thus different layout?

Image

Anyway, seems to build, I think. Files in openmv/firmware/OPENMV4/ seems to be the current time and date.

Re: openMV Firmware Build Instructions

Posted: Sat Feb 09, 2019 11:32 pm
by kwagyeman
Yeah, that's basically right.