Table of Contents
The controller's STM32 is the hardware behind the buttons, sticks, and display. It is a separate piece of hardware from the IMX Linux computers. When the solo-builder runs to compile the full copter and controller images, this Artoo STM32 firmware is included. You can also run the Artoo STM32 builder here separately if you only want to make changes to it. It is fast and simple compared to the entire copter and controller builds.
Some compiled versions of the Artoo STM32 firmware can be found in the STM32(/Firmware/Artoo) directory.
To build the Artoo STM32 firmware, you must use the Open Solo vagrant virtual machine, which will have everything configured by script. We can assure with 100% confidence that trying to run the builder naively on your own Linux machine will not work. The vagrant VM is configured to have all required packages, and uses Ubuntu 14.04. Nothing newer will work. Do not attempt to upgrade the Vagrant VM, even if it suggests you do so. Everything will explode.
The vagrant VM used for Artoo is also used for solo-builder. So if you already installed and setup the VM for solo-builder, you can skip right to executing the build
Visit the Vagrant VM page for first time installation and initialization of the Vagrant VM.
vagrant upfrom the root of root of the OpenSolo repo directory (windows command prompt or Ubuntu terminal) starts the VM
vagrant sshconnects you to the vagrant VM, where you will do all the building
vagrant@vagrant-ubuntu-trusty-64:~$is what the prompt will look like once you're connected. You will land in the home directory (
/vagrantwithin the vagrant VM is symlink to the root of the OpenSolo repo outside the vagrant VM.
$ cd /vagrant/artoochanges to the artoo directory
$ ./tupexecutes the build.
The build produces
artoo.bin which is deposited in the /artoo directory. You can use it as is, or you can rename it. If you rename the file, it must always begin with
artoo_ and must have a
The default filename is
artoo.bin. You can rename it, as long as it begins with
artoo_. For example, you can name the file
artoo_1234xyz.bin. This firmware can be installed directly using SCP or and SFTP application. Connect your PC to the Solo's WiFi. If you never changed the Solo's wifi password, the default is sololink.
Doublecheck the .bin file to make sure it is about 200-300kb in size. If it's 0kb, the build failed and it shouldn't be loaded
- Connect via SCP or an SFTP application to the **controller** with IP 10.1.1.10, username root, password TjSDBkAu
/firmwaredirectory on the controller.
- Reboot the controller. When powering up, the display will go out and come back on during the update.
--THIS NEEDS TO BE UPDATED--
Stick calibration data (along with other params) are stored in the STM32's MCU flash. There exists as GUI to calibrate them as part of the manufacturing process, but if you're interested in calibrating an existing Artoo, use
tools/stick-cal.py as follows:
- copy both
tools/stick-cal.pyto the iMX6 board in your Artoo unit, via
sshinto the iMX6, and run
python stick-cal.py<code>, move the sticks and camera controls to their extremes, then press <code>ctrl-Cto complete the calibration
It is possible to do some basic testing against a simulated vehicle with the SITL environment provided by ardupilot. http://dev.ardupilot.com/wiki/setting-up-sitl-on-linux should get you set up to run it.
To connect your board to the simulation environment:
- connect an FTDI cable (or similar) to the UART that is normally connected to the iMX6
- if using a VM, pass the virtual serial device into the VM
tools/slip-mavlink.py(within the VM if you're using one) - this translates mavlink data from SITL into SLIP encoded data, and passes it to the STM32. It should print the IP address it's listening on - pass this to the
--outargument of SITL when you start it below.
$ cd ArduCopter $ ../Tools/autotest/sim_vehicle.sh --console --out xxx.xxx.xxx.xxx $ ... SITL starts up ...
Now, stick values and mavlink data are sent bidirectionally between artooSITL, and you should be able to fly as normal.