Skip to content

openmv/openmv-ide

Repository files navigation

IDE Build 🔥 GitHub license GitHub release (latest SemVer) GitHub forks GitHub stars GitHub issues

OpenMV IDE based on Qt Creator

Overview

OpenMV IDE is a cross platform integrated development enviornment for writing python code to run on your OpenMV Cam. It includes all the necessary features and tools to update your OpenMV Cam's firmware and help you develop your application quickly.

Compiling OpenMV IDE for Windows, Linux, and Mac

Install Qt (to the default location) and then:

 git clone --recursive https://github.com/openmv/openmv-ide.git
 cd openmv-ide
 ./make.py

You'll find the installer in build.

Compiling OpenMV IDE for RaspberryPi on Linux

This guide works for compiling on a ubuntu-20.04 machine only.

First, you need to setup your machine:

 sudo apt update
 sudo apt upgrade

Next you need to download a bunch of packages required for the gui:

 sudo apt-get install make build-essential libclang-dev ninja-build gcc git bison python3 gperf pkg-config libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-util-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev libatspi2.0-dev libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev

Aftwards, you need to install the cross-compilier. Please note that by using ubuntu-20.04 this command should install version 9 of the cross-compilier. Using a newer version of the operating system will result in a newer version of the cross-compilier which will cause linker mismatch issues between the host system and the RaspberryPi:

 sudo apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu

Finally, the cmake build system for OpenMV IDE requires libclang to be available on the build system (though it's not used by the IDE):

 sudo apt install libclang-11-dev

Now it's time to install Qt Cross-Compiled for the RaspberryPi. Please note that this must be installed in your home directory with the username runner (e.g. /home/runner) as the cross-compile hardcodes its path when it's built:

 cd /home/runner
 wget https://github.com/openmv/qt-raspi/releases/download/v6.5.1/qt-raspi.tar.gz
 tar -xzvf qt-raspi.tar.gz

Now we can build the IDE. Please note that you need to install the cross-compile-ldd tool before you build as you can see in the snippet below:

 git clone --recursive https://github.com/openmv/openmv-ide.git
 cd openmv-ide
 sudo cp cross-compile-ldd /usr/bin/aarch64-linux-gnu-ldd
 ./make.py --rpi /home/runner/qt-raspi

You'll find the installer in build.

Command Line Options

Did you know that OpenMV IDE features command line options which allow you to automate connecting to your OpenMV Cam, updating its firmware, running scripts, and more? Pass -h or --help to OpenMV IDE on the command line to see what you can make the IDE automatically do!

Instructions for running the installer silently

The Qt Installer Framework features a robust set of command line actions. Using these you can install OpenMV IDE from the command line silently. You can also uninstall the IDE silently using the uninstaller generated by the installer. Please note that the command line installer will not automatically delete an old installation during an upgrade like when in GUI mode.

Windows

The installer will need administrator privileges which it should ask for when run.

 ./openmv-ide-windows-*.exe --al --am -c in

Linux

Note: libxcb-xinerama0 may be required for the installer to run.

 ./openmv-ide-linux-x86_64-*.run --al --am -c in
 cd <openmv-ide-install-dir>
 ./setup.sh

Alternatively, the installer is a tar file with a setup script:

 tar -xzvf openmv-ide-linux-x86_64-*.tar.gz
 cd openmv-ide
 ./setup.sh

Mac

The installer is a DMG with the app inside of it:

 hdiutil attach openmv-ide-mac-*.dmg
 sudo cp -rf /Volumes/OpenMV\ IDE/OpenMV\ IDE.app /Applications
 sudo hdiutil detach /Volumes/OpenMV\ IDE

RaspberryPi

The installer is a tar file with a setup script:

 tar -xzvf openmv-ide-linux-arm64-*.tar.gz
 cd openmv-ide
 ./setup.sh

Contributing to the project

Contributions are most welcome. If you are interested in contributing to the project, start by creating a fork of each of the following repositories:

Clone the forked openmv-ide repository, and add a remote to the main openmv-ide repository:

git clone --recursive https://github.com/<username>/openmv-ide.git
git -C openmv-ide remote add upstream https://github.com/openmv/openmv-ide.git

Set the origin remote of the qt-creator submodule to the forked qt-creator repo:

git -C openmv-ide/qt-creator remote set-url origin https://github.com/<username>/qtcreator.git

Finally add a remote to openmv's qt-creator fork:

git -C openmv-ide/qt-creator remote add upstream https://github.com/openmv/qt-creator.git

Now the repositories are ready for pull requests. To send a pull request, create a new feature branch and push it to origin, and use Github to create the pull request from the forked repository to the upstream openmv/qt-creator repository. For example:

git checkout -b <some_branch_name>
<commit changes>
git push origin -u <some_branch_name>

Contribution guidelines

Please follow the best practices when sending pull requests upstream. In general, the pull request should:

  • Fix one problem. Don't try to tackle multiple issues at once.
  • Split the changes into logical groups using git commits.
  • Pull request title should be less than 78 characters, and match this pattern:
    • <scope>:<1 space><description><.>
  • Commit subject line should be less than 78 characters, and match this pattern:
    • <scope>:<1 space><description><.>