edit

# How to build the DSO Nano firmware using gcc¶

The DSO Nano firmware can be build with a gcc toolchain. The gcc-specific files reside in the project/gcc folder of the firmware source code tree.

## Get a ARM cross-building gcc toolchain¶

The ARM toolchain most of us use is the GCC from ARM at <https://launchpad.net/gcc-arm-embedded>.

For Linux, you can choose the tarball or the installer. The latter is a much larger download than the former, for some reason. In any case make sure you have the toolchain's "bin" directory in your path. For example, if you extracted the tarball to /opt, type this in your shell, or add it to your .bashrc or .pam_environment:

 1 PATH=/opt/gcc-arm-none-eabi-4_6-2012q2/bin:\$PATH 

Once you have the toolchain set up correctly, simply typing:

 1 arm-none-eabi-gcc -v 

should list the compiler version and the options it was built with. If you instead get an error, please fix your toolchain installation before continuing.

If you can not find a pre-built ARM toolchain for your platform, or otherwise want to build the toolchain yourself, you can download the source or check out https://open-bldc.org/wiki/Building_ARM_Toolchain

## Get and build the firmware source code¶

For now, get the code from Tormod's gitorious tree:

 1 2 git clone [git://gitorious.org/dsonano/dso-firmware.git](git://gitorious.org/dsonano/dso-firmware.git) cd dso-firmware 

If you later want to update your tree to latest git:

 1 git pull 

### Compile the application part¶

 1 2 cd DS0201_APP/project/gcc make 

### Compile the library part¶

 1 2 3 cd ../../../DS0201_LIB/project/gcc make clean make 

## Testing¶

Use Dfu-util to download the dso-lib.bin and dso-app.bin files to your Nano V1 or V2. For the Nano V3 model, copy the dso-lib.hex and dso-app.hex one at a time to the DFU virtual USB drive.

## Tech Support¶

Please submit any technical issue into our forum.