Setting up an openOBC development environment

From openlabs wiki
Jump to: navigation, search


[edit] Linux

If you're running a compatible Ubuntu distro, the easiest way to get the toolchain installed is to use a PPA:

sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded
sudo apt-get update
sudo apt-get install gcc-arm-none-eabi

Otherwise, you'll need to get the toolchain some other way. You may want to check to make sure you're downloading the latest version, but here's the latest as of this writing:

tar -vxjf gcc-arm-none-eabi-4_7-2013q2-20130614-linux.tar.bz2
cd gcc-arm-none-eabi-4_7-2013q2
... (unfinished)

That's it for the toolchain. Now you're ready to download the openOBC source code and build the firmware. You'll need git and make, so install them if you need to:

sudo apt-get install git make

Now you can fetch the source from github:

git clone

...and build it:

cd openOBC-devboard

Assuming your computer has multiple cores/CPUs, you'd probably rather tell make to spawn multiple threads according to how many cores you have since this will significantly shorten the build time. So instead of running make with no options, run it like this:

make -j4

Note: -j places make into jobserver mode, and likely will take ALL your system resources, potentially spawning hundreds of threads. The number limits how many threads make can spawn. So if we changed it to -j17, it would spawn 17 threads.

If everything went ok, you should now have a new file in your source directory named openOBC-devboard.elf. This is your compiled firmware. You're now ready for Flashing the openOBC firmware.

[edit] OS X

[edit] Windows

To install the toolchain, download and run the windows installer located here.

To get the openOBC source code, you can use a Git client to download it from the github repo here, or you can just download it as a zip file here. Unzip it to somewhere you'll remember.

Install make somehow... (incomplete)

To compile the firmware, open the start menu and run the GCC Command Prompt that was installed in the first step. In the command prompt window that appears, cd to where you unzipped the source code and run make to build it. Once it's done, you should have a new file openOBC-devboard.elf in the source code directory. This is the compiled firmware. You're now ready for Flashing the openOBC firmware.