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?
If you googled it this is the first result: Home · openmv/openmv Wiki · GitHub
Thanks, slaps forehead. I did not look at the wiki page (should have looked there).
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:
make: Leaving directory '/home/drewwestrick/openmv/src/sthal/f7' make: Entering directory '/home/drewwestrick/openmv/src/micropython/ports/stm32' Makefile:5: *** Invalid BOARD specified. Stop. make: 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.
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.
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.
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:
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>
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.
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):
- 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 (http://forums.openmv.io/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/1798207217/openmv-cam-h7-machine-vision-w-micropython/comments?comment=UHJvamVjdENvbW1lbnQtMjE5MTY2OTQ%3D&reply=UHJvamVjdENvbW1lbnQtMjE5MTY3NzQ%3D)?
Because I have this impression that the STCube is only to init ports and freq among others.
how to compile afterwards?
- 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
Hello from wiki Home · openmv/openmv Wiki · GitHub, it seems that the IDE used is QT Creator? Can you confirm that and I would try to install and use it too?
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.
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?
Anyway, seems to build, I think. Files in openmv/firmware/OPENMV4/ seems to be the current time and date.
Yeah, that’s basically right.