Setup an ARM Toolchain in Ubuntu Part 1


Stellaris Evalbot Fix

I recently purchased the Evalbot from TI.  This was the robot that hackaday.com posted a awesome $25 checkout code for the whole robot.  However as it turns out this robot was meant to be purchased with a RTOS book.  It currently is NOT a standalone development platform.  So I started digging and this is how I came up with setting up my ARM GNU Cross Compiler for Ubuntu Linux.

Setup StellarisWare Software:

TI has a software suite full of code examples called StellarisWare.  Its AMAZING! for all of their development boards (Minus the Evalbot) it has examples and drivers for all of the on board devices.  One thing that TI did which was really lame was release StellarisWare in an self extracting PE executable.  (.exe)  You do not need to download StellarisWare to start coding for the Evalbot (or any Stellaris processor) however I highly recommend doing so.  Inside Stellarisware the “LM3S9B92.h” is included.  So unless you want to write your own header files and pour through datasheets to do so.  Grab StellarisWare from here.  NOTE: registration IS required.  Once you download that file.  You can used Wine to run the extractor.  This will extract StellarisWare directory to:

~/.wine/drive_c/StellarisWare

Copy that folder to your ~/ directory (/home/USERNAME).  This way you have your original copy in the wine directory listed above and you can edit all the files in your StellarisWare home directory.

Install ARM Toolchain:

Next we need to get the ARM toolchain.  There are a few ways to do this.  However I will talk about only one.  Code Sourcery has a free binary download for a complete ARM-EABI toolchain.
Download the installer from here:

http://www.codesourcery.com/sgpp/lite/arm/portal/release1592

Fix the bash shell for the installer:

sudo dpkg-reconfigure -plow dash

Then select NO at the prompt Run the installer: (Note the installer is java based.. so you needs the Java)

sh arm-2010.09-51-arm-none-eabi.bin

Do the regular next next song and dance… Select Custom if you want to install the toolchain to a different directory than /home/usr/CodeSoucery etc..  Then wait for the installer to finish… Not sure why but I had to manually add the arm utils (gcc, gdb, etc) to my path.  I choose to add the arm utils to the /etc/enviroment file.  This is a global path setting for all users.  You can of course do it as you please.

ril3y@ril3y-XPS-M1530:~$ sudo vim /etc/environment

and change it to look something like this:

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/ril3y/CodeSourcery/Sourcery_G++_Lite/bin"

There is a way to re-init you path.  I think you do something like: ./etc/enviroment Test ARM Toolchain: However I just rebooted to have my new path become active.  From here you can check to see if your PATH and toolchain are all setup by:
You should see something like this:

ril3y@ril3y-XPS-M1530:~$ arm-none-eabi-gcc
arm-none-eabi-gcc: no input files

Compile StellarisWare Examples:

We can now compile the examples in the StellarisWare directory.  We need to do one thing to make this work.  Inside the root of the StellarisWare folder is a file called “makedefs”.  We need to edit this file to make it use our new ARM compiler to build these examples.  So open the makedefs with whatever editor you want.

ril3y@ril3y-XPS-M1530:~/StellarisWare$ vim makedefs

And change the PREFIX section to look like it does below.  NOTE:  You don’t need to change them all.  However I did just to be sure it used the right one.  It SHOULD work by just changing one.  However do what you like.

PREFIX=${shell type arm-none-eabi-gcc /dev/null echo arm-none-eabi || echo arm-none-eabi} Now we can go to the root of the StellarisWare folder and type make:

ril3y@ril3y-XPS-M1530:~/StellarisWare$ make make[1]: Entering directory `/home/ril3y/StellarisWare/driverlib'
CC adc.c
CC can.c
CC comp.c
CC cpu.c
CC epi.c
CC ethernet.c
CC flash.c
CC gpio.c
CC hibernate.c
CC i2c.c
CC i2s.c
CC interrupt.c
CC mpu.c
CC pwm.c
CC qei.c
CC ssi.c
CC sysctl.c
CC systick.c
CC timer.c

You should end up seeing something like this…. This will run for a bit of time so just sit back and relax.  I did have an ERROR building some of the dk- development boards code.  However I didnt really care as it is no the board I am using.  I think it had something to do with the simplicity radio stack that TI provides.  Either way you can delete the board folder that is causing the the make to fail if you like.  The important thing to know is the ~/StellarisWare/boards/ek-lm3s9b92 code has been built.  This development board uses the same processor as the Evalbot.  However the examples will not work unless we change some of the pin assignments around.  But more on that after we have OpenOCD installed and working…

Onward!

From here we still need to do a few things before we are able to load code onto the Evalbot.  In the next Tutorial I will show how to build OpenOCD and modify example code provided by TI on to the Evalbot.

Comments

  • Pretty nice documentation to get going on the EVALBOT.. Do you have the part 2 of this posted yet? How do you go about using openOCD to modify the pin assignments?

    Gopi PalaniappanJanuary 18, 2011
  • I did get the Evalbot working. I have most of the next part of this blog done. I will try to post it tonight / tomorrow. Thanks for letting me know someone used it :).

    Riley

    Ril3yJanuary 18, 2011
  • Thank you so much!!! I was able to push out some pixels. Unfortunately I’ve not been able to bridge the gap and correct the pin assignments to get the StellarisWare code to work properly. So I’m about as a far as controlling the OLED display at this point. Baby steps… Anyway, I put a link to this site as your instructions are totally vital to the success of using a GCC toolchain with this board.

    …I did manage to have very good luck getting OpenOCD set up and configured with Eclipse.

    BrendanFebruary 4, 2011
  • protip: you can just open the StellarisWare exe with a file archiver

    KevinJanuary 9, 2012
Comments Are Closed