TI EvalBot and Windows, Eclipse style

[Work in progress]

This guide is based on Brendan Robert’s guide for linux which can be found here.

I finally got my Evalbot from Texas Instruments, only took them over six months to ship it. Anyway, after I got it, I started researching for examples, guides, tutorials and most importantly: the best IDE that I could use.

Documentation regarding the board is pretty scarce and the most IDE’s out there have all sorts of limitations and bloatware.

This is when I decided that I would go throug the minimal steps of setting up Eclipse as your primary IDE on Windows, so you could easily install and configure a proper development environment and get started by writing your first HelloWorld project.

Eclipse CDT - Your first task is to download Eclipse CDT. Unzip it somewhere safe.

StellarisWare - While this step is optional, I highly recommend downloading the example sources from StellarisWare, as they contain libraries (and sample code) that’ll prove very useful.

CodeSourcery G++ Lite - This is the toolchain, so you’ll definitely be needing this one. Just grab the Windows installer and install it.

GNU ARM Eclipse-plugin - Eclipse wouldn’t know what to do with you projects without this. Install the plugin according to the instructions, just make sure you do it the recommended way!

LMFlash - We need to be able to download the application to the board.

After all this is done, it’s time to create a new C project in Eclipse. Remember to choose ARM Windows GCC (Sourcery G++ Lite) when creating the project.

We’ll be using Martin Hubacek’s Nunchuk library for this HelloWorld project, so download that here. After unzipping it, copy the following files to the root of your HelloWorld project directory:

  • I2Clib.c
  • I2Clib.h
  • oled.c
  • oled.h
  • startup_gcc.c
  • main.ld

You’re almost there! We will now configure all the project settings so the project knows where everything is and will compile without a fuss.

Open up your project properties and browse to C/C++ Build > Settings, change the following (or make sure they’re correct):

  • In ARM Sourcery Windows GCC Assembler -> Miscellaneous
    • Specify this for Other flags option: -c -fmessage-length=0
  • In ARM Sourcery Windows GCC C Compiler -> Directories, the following include paths (-I) should be listed
    • StellarisWare
    • StellarisWare/driverlib
    • StellarisWare/utils
  • In ARM Sourcery Windows GCC C Linker -> General
    • For script file (-T), specify the main.ld that you copied from Martin’s project
    • Check Remove unused sections (-Xlinker —gc-sections)
    • Uncheck everything else
  • In ARM Sourcery Windows GCC C Linker -> Libraries
    • Add “driver” under the top libraries (-l) section
    • Add StellarisWare and StellarisWare/driverlib/gcc to library search path (-L)
  • In ARM Sourcery Windows GCC C Linker -> Miscellaneous
    • Set other flags option to this: —entry ResetISR

Add a new C file to your project, call it something like HelloWorld.c and paste the following in it:

#include “inc/lm3s9b92.h”
#include “inc/hw_i2c.h”
#include “oled.h”

void SysTickHandler()
{}

int main(void)
{
    init_display();
    dispString(“Hello World!”, 0, 0);
    while (1)
    {

    }
}

If it compiles without errors, that’s great news!

The final and most important step is the flashing part. We’ll be using LMFlash to download the application to the Evalbot. Start off by creating a new text file called manual_build.bat and paste the following in it:

@echo off
echo Ready to begin flashing.
echo.
pause
echo.
cd Debug
arm-none-eabi-objcopy -O binary HelloBot.elf HelloBot.bin
“C:\Program Files\Texas Instruments\Stellaris\LM Flash Programmer\LMFlash.exe” —quick-set=ek-lm3s9b92 —verify —reset “%CD%\HelloBot.bin”
echo.
echo.
echo Flashing done!
echo.
pause

Now, of course, you do need to change the paths to fit your environment, including HelloBot.* and the path to LMFlash.exe.

This batch file is mainly useful for problematic flashing, hence the manual-part.

Create a similar batch file to be able to flash it after compiling, automatically. Call it something like build.bat:

@echo off
cd Debug
arm-none-eabi-objcopy -O binary HelloBot.elf HelloBot.bin
“C:\Program Files\Texas Instruments\Stellaris\LM Flash Programmer\LMFlash.exe” —quick-set=ek-lm3s9b92 —verify —reset “%CD%\HelloBot.bin”

OPTIONAL: If you want to, you can just add the full path to the build.bat file to Eclipse projects post-build, so after building it’ll automatically start flashing, which is what I like to do.

You can now plug the Evalbot in with the USB cable provided (use the ICSI port on the board), turn the power on (it might require battery power even though it’s plugged in) and install the drivers. You can find the drivers in the StellarisWare directory.

Since you’ve propably already built the HelloWorld project, there should be a Debug directory containing the ELF file. If so, go ahead and run manual_build.bat and see the magic happen.

If all goes well you’ve got your first compiled application running on your Evalbot.

Congratulations!

EDIT: Still looking at debugging options, might be able to use arm-none-eabi-gdb —eval-command “target remote COM1” to connect to the board and debug, but not sure yet, will keep trying.

[Flash 10 is required to watch video]

Stellaris Evalbot. <3

Heck, even though it&#8217;s 10yo, it&#8217;s still a dual-core!

Heck, even though it’s 10yo, it’s still a dual-core!

It&#8217;s an $800 SBC (Single Board Computer)

It’s an $800 SBC (Single Board Computer)

Damn customs!

Damn customs!

Chessbot’s got moves!

Sorry about the crappy quality, especially with the LCD, had the contrast set too high so the camera picked it up a bit too well.

Basically, I’m running the chess app on my PC while transmitting data over bluetooth to the bot (currently just servo positions and moves), just to eliminate some of the wiring.

Will keep adding new features as soon as I can. :-)

First build is done (without gripper), though I think I need better servos. :-/

First build is done (without gripper), though I think I need better servos. :-/

Chessbot

It has begun.

An initial AutoCAD model of the body, think of it as a mockup, though keep in mind I’ve never even touched AutoCAD let alone know how to use it.

The gripper is still the toughest one to design, so this is a very rough example of what I’m trying to achieve. Still going over a few ideas. :-)

Frank’s alive, almost!

So, I’ve been working my ass off on the robot project (dubbed Frank or F.R.A.N.K.), both hardware AND software wise.

Here’s a few shots of what it looks like at the moment.

The beautiful case:

And the boring bottom:

Back panel has the interfaces for power and programming:

The innards (not connected yet, some of the guts still missing):

Ton of new stuff coming, like for example a remote controlled wireless camera and a remote controlled laser. Imagine that, a fricking laser that you can move around. ;-)