Skip to main content

Tutorial: freeDSP classic and Ubuntu 16.04

So, last week I ordered a freeDSP kit, assembled it and tried to program it on an Ubuntu machine using the freeUSBi programmer. I couldn't get this to work, so I switched from the freeUSBi programmer to an Arduino micro. Since I now finally got it to work, I'll share my experiences and what I find the easiest way to work with Linux and freeDSP.

Hardware needed:
  • A freeDSP classic board + power supply (for testing, I'm using a USB port's 5V supply)
  • An Arduino micro
Software needed:
  • Arduino IDE (install the latest version from arduino.cc)
  • Virtualbox (install the latest version from virtualbox.org)
    • Install Windows 7 inside Virtualbox
    • Install SigmaStudio inside Windows 7 (from analog.com)
Before getting started, please read the Getting started manual created by the freeDSP people. Most of the information I got from there, with some tweaks to get it working from Ubuntu.


Step 1. Create a firmware (hex) file

Boot Windows 7 inside Virtualbox, start SigmaStudio and create a new project. Inside the hardware configuration tab, connect a USBi block to ADAU1701 and E2Prom block. In the schematic tab, connect the two inputs to all four outputs using T Connection blocks (this is a simple 'pass-through' configuration to test the board and its sound quality when it's doing 'nothing'). Hit the 'Link Compile Download' button and ignore the warning. In the hardware tab, right-click the ADAU1701 block and hit 'Write latest compilation to E2Prom'. This will create the .hex firmware file that we will use inside Ubuntu. Transfer this file (e.g. via a shared folder) from Windows to Ubuntu. From this point on you can close Windows/Virtualbox if it annoys you.




Step 2. Program the firmware via Arduino

Download the Arduino sketch and I2C libraries from the links as found in the Getting started manual. The first thing to do to get Arduino running, is uninstalling (if it is installed) the modemmanager package, since it interferes with serial communication:
sudo apt purge modemmanager
Connect the Arduino to your Linux box and upload the Arduino sketch through the Arduino IDE. If it works, you'll see the serial port it uses in the tools>port menu (in my case it was /dev/ttyACM0, and I will use that one here). Now connect the Arduino onto the freeDSP board, power the freeDSP board (with the E2Prom jumper set to 'write enabled', see manual) and connect the Arduino USB cable. Open a terminal and type:
sudo apt install screen
screen /dev/ttyACM0 9600
GNU screen will now open up (it's a bit like PuTTY/TeraTerm) a connection to the Arduino. If all went well, you will see:
Elektor Project 130232 Audio DSP Board
EEPROM Programmer
eeprom found
waiting for E2Prom.Hex file...

Now, open the E2Prom.Hex file in a text editor, copy all the text and paste it into the GNU screen window (using Ctrl+Shift+V). The firmware data will now be received by the Arduino and programmed into the E2Prom. Disconnect all power, remove the Arduino from the freeDSP board (essential!), set the E2Prom jumper to 'write protected' and power on the freeDSP board (you might need to hit the reset pushbutton on the board.

This worked for me! Happy freeDSP'ing :)

Please leave a comment for questions/remarks.


Comments

Popular posts from this blog

Project: Arduino XZ dip coater

This project outlines, without going into too much detail, how to build a small XZ robot based on Arduino Uno and Firgelli miniature linear actuators. The electronics and programming skills needed are low. Mechanical skills required (to build something sturdy) are average to okay, meaning, you have to be able to make something solid ;)

(Note: this is an old project, so stuff might be outdated.)

What you'll need:
Arduino UnoMotor shield:Velleman KA03 (kit) or VMA03 (prebuilt)Any other L298P-based shield (source code changes needed)LCD:20x4 LCD03 from Robot ElectronicsAny other I2C LCD (source code changes needed)12V/2A power supply and a power connector for the ArduinoEither a lot of jumper wires or some pcb, pinheaders and wiresTwo Firgelli linear actuators (12V, linear position feedback, choose stroke and ratio to your needs): L12-P and L16-PBall bearings, aluminium strips and screws+bolts(Update 2018: I see that Firgelli sells drawer slides nowadays! What a coincidence :) ) T…

Project: Floating book shelves

I decided I wanted to make bookshelves in our living room. On one of our stranger walls. It is 1 m wide, 3 m high and after 1.5 m up it slowly starts to extend to the right, over our desk and maps.

This is the result - "floating" book shelves:


What you'll need:
Wooden planks (I used scaffolding planks: 18~19 cm x 250 cm, 3 cm thick)Wooden rods, 3 cm thickDowel pins, 10 mm x 4 cmWood glueScrews and plugs (screws should be 2 cm longer than the plugs) for wall-mountingOptional: paint (for either/both spacers, pillars and shelves) Step 1. Design As I like to make stuff as cheap as possible while still looking awesome, I started with sourcing cheap wood. Since a few years, hipsters in Amsterdam are being 'creative' with scaffolding planks ("steigerplanken"), which come in lengths up to 3 m with a fixed width of a little less than 20 cm and which are generally made of spruce ("vuren") or pine ("grenen"). This'd make great wood for the b…