openMV Firmware Build Instructions

Discussion related to "under the hood" OpenMV topics.
drewwestrick
Posts: 5
Joined: Mon Aug 13, 2018 2:39 pm

openMV Firmware Build Instructions

Postby drewwestrick » Mon Aug 13, 2018 2:42 pm

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?
User avatar
kwagyeman
Posts: 2407
Joined: Sun May 24, 2015 2:10 pm

Re: openMV Firmware Build Instructions

Postby kwagyeman » Mon Aug 13, 2018 6:13 pm

If you googled it this is the first result: https://github.com/openmv/openmv/wiki
Nyamekye,
drewwestrick
Posts: 5
Joined: Mon Aug 13, 2018 2:39 pm

Re: openMV Firmware Build Instructions

Postby drewwestrick » Tue Aug 14, 2018 10:00 am

Thanks, *slaps forehead*. I did not look at the wiki page (should have looked there).
drewwestrick
Posts: 5
Joined: Mon Aug 13, 2018 2:39 pm

Re: openMV Firmware Build Instructions

Postby drewwestrick » Tue Aug 14, 2018 6:57 pm

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.
User avatar
kwagyeman
Posts: 2407
Joined: Sun May 24, 2015 2:10 pm

Re: openMV Firmware Build Instructions

Postby kwagyeman » Wed Aug 15, 2018 1:01 am

Ibrahim?
Nyamekye,
drewwestrick
Posts: 5
Joined: Mon Aug 13, 2018 2:39 pm

Re: openMV Firmware Build Instructions

Postby drewwestrick » Wed Aug 15, 2018 8:51 am

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.
User avatar
kwagyeman
Posts: 2407
Joined: Sun May 24, 2015 2:10 pm

Re: openMV Firmware Build Instructions

Postby kwagyeman » Wed Aug 15, 2018 1:30 pm

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.
Nyamekye,
drewwestrick
Posts: 5
Joined: Mon Aug 13, 2018 2:39 pm

Re: openMV Firmware Build Instructions

Postby drewwestrick » Wed Aug 15, 2018 1:57 pm

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
User avatar
kwagyeman
Posts: 2407
Joined: Sun May 24, 2015 2:10 pm

Re: openMV Firmware Build Instructions

Postby kwagyeman » Wed Aug 15, 2018 3:35 pm

Awesome!
Nyamekye,
User avatar
jurban
Posts: 10
Joined: Wed May 30, 2018 12:17 am

Re: openMV Firmware Build Instructions

Postby jurban » Fri Sep 07, 2018 1:08 am

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>
User avatar
kwagyeman
Posts: 2407
Joined: Sun May 24, 2015 2:10 pm

Re: openMV Firmware Build Instructions

Postby kwagyeman » Fri Sep 07, 2018 1:20 am

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.
Nyamekye,
victagayun
Posts: 17
Joined: Wed Oct 17, 2018 12:08 am

Re: openMV Firmware Build Instructions

Postby victagayun » 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.
User avatar
iabdalkader
Posts: 596
Joined: Sun May 24, 2015 3:53 pm

Re: openMV Firmware Build Instructions

Postby iabdalkader » Fri Nov 16, 2018 4:52 pm

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

Return to “Technical Discussion”

Who is online

Users browsing this forum: Google [Bot] and 10 guests