ersky9x compilation on linux (Ubuntu)

erskyTx runs on many radios and upgrade boards
ersky9x was a port of er9x for use on the sky9x board.
Post Reply
User avatar
duststorm
Posts: 43
Joined: Thu Oct 29, 2015 5:46 pm
Country: Belgium
Location: Leuven

ersky9x compilation on linux (Ubuntu)

Post by duststorm »

Hey all,

As I could not immediately find compilation instructions for building the firmware on linux, I decided to share what I know with the rest of you. Forgive me if this is redundant, but the fact that the gnumake script in the next branch was in a non-working state for unix toolchains, I suspect that not many people tried compiling the firmware on a unix/linux system.
Hence I think a little information (if only to show how easy it is ;)) on how to do this on Ubuntu could be welcome.

I did this on Ubuntu 14.04 Trusty Tahr.
The packages you need are in the Universe repository, so make sure that is enabled in your package management.

Install ARM toolchain (you need the bare-bones non-gnu lib variant, hence the none-eabi)
sudo apt-get install gcc-arm-none-eabi
You will also need some of the standard tools such as gnumake and of course git:
sudo apt-get install build-essential git
Checkout the source:
git clone https://github.com/MikeBland/mbtx.git
Step into the git checkout folder:
cd mbtx
Now, I am interested in the latest development version (which is kind of why I am building from source in the first place), so I will switch to the "next" branch, on which most of the development seems to happen:
git checkout next
Git will now be in the next branch, you can check this is follows (it should answer with "next"):
git branch
Now we can go into the source folder to build the firmware:
cd radio/ersky9x/src
To compile the source code, you will need to run the "make" command.
Using commandline options you can set extra options, like the type of hardware board for which the firmware should be built (PCB=...).
For example, for building a firmware for the 9Xtreme board, you can run:
make PCB=9XT DEBUG=1 STAMP=1
Other options for PCB are X9D (with suboptions REVPLUS=1 or REV9E=1), DUE or without PCB option which just builds the "ersky9x" version (for this last option you also have suboption REVX=1).
I am not knowledgeable enough about all of the available hardware types so I won't make assumptions and risk giving false info on these. What I can tell you is that PCB=9XT is for the latest and greatest 9Xtreme board.

DEBUG=1 outputs debugging information on the serial output which can be useful for reporting bugs
STAMP=1 runs a routine that adds a version stamp to the built firmware. While I suspect that currently this is broken because it still expects the source to reside on subversion source control, while Mike has switched to git, it doesn't hurt to enable it, and I suspect this will be fixed in the future.

That's it, running the make command should start compilation and when finished, and if everything goes well, you should end up with a set of firmware files. In my case, for the 9Xtreme board, they are named ersky9x9XT_rom.bin and ersky9x9XT_rom.elf

Post Reply

Return to “erskyTx (was ersky9x)”