I’ve been playing around a lot with the Stellaris Launchpad board, looking around the stuff I never noticed that the besides the fact of being licensed with a BSD style license, the Stellarisware SW provided by Texas Instruments has a closed license for the various examples.
The basic files needed to create a program for the board, and basically for all the ARM processors are the following with binutils and gcc:
- The program you want contained in a .c file.
- A linker script due to the fact you don’t have an operating system running.
- A startup code file that zeroes the .bss segment variables, copies the .data segment to ram and setups the NVIC vector table.
- A Makefile to build everything easily.
The program and the Makefile can be done with not much worries, but the linker script and the startup code are quite difficult, at least for me, to understand and set up properly.
So I ended up building from scratch the whole files needed and licensed them with a BSD license (Basically, do what you want with them, just give me credit I’m happy if someone find them useful, you can contribute, but don’t blame me if it doesn’t work lol)
You can find them in this Github repository
In the projects (eg: this) I’ve created in the past I just copied the 2 files from an existing example and modified them for my needs. That’s the lazy man (me) way! But after checking the license I was a little worried by this clause in particular:
# Texas Instruments (TI) is supplying this software for use solely and
# exclusively on TI’s microcontroller products. The software is owned by
# TI and/or its suppliers, and is protected under applicable copyright
# laws. You may not combine this software with “viral” open-source
# software in order to form a larger program.
So I decided to dig a bit deeper and figure out what makes typing “make” and enter on a shell prompt work.
After searching online I’ve found this 2 great pages:
Well, this provided a lot of help, giving me the basics of the ARM programming in GNU gcc and binutils. You should definitely check them out!
This have been a great learning experience for me, I’ve learned how to build a binary file from source code, how to use tools like objdump and nm, just following along the pages I’ve already posted before.
Well, if anyone wants to contribute it’s free to do it checking out my github repository for this project, cloning, editing and sending me bugs records and pull requests!
This is why I like open source, you can do everything you want with what others have shared with you. Isn’t this beautiful? 🙂