Stellaris launchpad first project

I played with the stellaris launchpad and gcc today.

I basically created a folder in /stellaris/boards called myProjects copied the uart_echo example in the /stellaris/boards/ek-lm4f120xl.

You just need this files to work with gcc via command line:

  • uart_echo.c
  • startup_gcc.c
  • uart_echo.ld
  • Makefile

I changed the names of uart_echo.c and uart_echo.ld to something more convenient like serialADC and changed inside the Makefile all the names from “uart_echo” to “serialADC” at once.

I used the api called uartstdio.h so I needed to add the compilation of the object file uartsdio.o to the makefile rule.

Well, it has been cool, now going for something nicer to do! You can find all the source code files right here!

Advertisements

Stellaris Launchpad

So, I got my 2 stellaris launchpad boards from TI.

Launchpad
Stellaris Launchpad

Each board has 2 Stellaris LM4F120H5QR ARM Cortex-M4 MCUs. The nice thing it’s I’ve had them for less than 5$ with free shipment.

I’ve followed the getting started tutorial on a windows machine, as they suggested, using their Code Composer Studio 5, which is free for the launchpad board, with now limitation on code size or time.
I’ve noticed that the examples can be built with a GNU cross-toolchain for arm-none-eabi, like the codesourcery lite if you don’t want to build your own (Yeah, I’m lazy).
I just used my ubuntu pc to test that out, and it was kinda easy to build some sample!

First thing to do it’s downloading the toolchain from here, you’ll need to register on their site. The installation it’s pretty straightforward, just follow the instructions on the site, with the shell change and the adding of the bin directory to the path.

You can verify to have a working toolchain with this test:

arm-none-eabi-g++ –version

Next you need to download the StellarisWare software from here you’ll need to register in here too but also getting an approval.

After downloading the StellarisWare you should create a folder on your home directory:

cd
mkdir stellaris
cd stellaris

Then you just need to run unzip to extract inside your folder the content of the auto-extracting archive you downloaded.

unzip ../downloads/SW-EK-LM4F120XL-9453.exe

Then you’ll just have everything ready to work with that. Get inside a directory and just use make to build the project. The cross compiling and all the variables configurations are in the makedefs file in the stellarisware folder!

The only missing part until now it’s how you load to the compiled bin file into the microcontroller. On windows it can be achieved with the LMLoader program. In linux there’s no way at the moment usually with the ICDI controller on board, the only way it’s using a JTAG adapter connected on the breakout JTAG connector.

The nice thing it’s that there’s also a d DFU Bootloader on the chip, maybe with some work I could get it working and uhm that would be useful somehow.