Skip to content

Firmware Development Environment

robertfisk edited this page Mar 1, 2017 · 3 revisions

This page will help you install and configure a development environment for the USG's firmware. By now you should have a JTAG connection ready.

Note: The instructions below are written with minimal testing. I may have forgotten something!

Install firmware development environment

  1. Follow the excellent documentation to install GNU ARM Eclipse. You will need the ARM Toolchain, Windows Build Tools if you run Windows, OpenOCD, Eclipse CDT, and the GNU ARM Eclipse plugins. And finally set up a new workspace according to the instructions.

  2. Clone the USG repository, and make sure you checkout the correct branch. Use the USG_0.9 branch if you have made your own v0.9 hardware, or the USG_1.0 branch if you have purchased v1.0 hardware.

  3. Import the Upstream and Downstream folders into your Eclipse workspace. Because the USG reverses the USB paradigm of a host being 'higher' than a device, 'Upstream' refers to the processor connecting to your host computer, and 'Downstream' refers to the processor connecting to your attached USB device.

Build it

On the Eclipse toolbar next to the 'Build' hammer, from the drop-down menu choose either the Debug or Release build configuration. Since you went to the trouble of setting up a JTAG connection I'm going to assume you will be debugging the firmware, so you should probably choose the Debug configuration. The project should then build. This is where you find out if you configured your tools correctly, and whether I forgot something important!

Load it

Attach your JTAG debugger to each development board in turn, and from the debug menu choose "Upstream Debug" or "Downstream Debug" depending on which side of the USG you connect to. The firmware will be flashed permanently into the processors and you can start your debug session, or simply disconnect the debugger to run it standalone.

The USG has two LEDs, and you should see them flash once when the USG is powered on. If you see them do anything else, check the LED page to decode what went wrong.

You can’t perform that action at this time.