Académique Documents
Professionnel Documents
Culture Documents
search
The complete tutorial for Stellaris LaunchPad development with GNU/Linux (I)
[http://4.bp.blogspot.com/dIsfUg8tlaE/UK1DB8EA49I/AAAAAAAAAPE/r77VWN8nT3E/s1600/stlp.jpg]
So you bought the Stellaris LaunchPad, this powerful and cheap development board. Maybe you are even one of the lucky ones that bought it for only $4.99. You received it, grabbed a breadboard, some wires, resistors, capacitors and ICs, mixed all together and are ready to start writing software, but... what options do you have for developing software for this platform? Let's see what TI has to offer on the Stellaris LaunchPad web page
[http://www.ti.com/ww/en/launchpad/stellaris_head.html? DCMP=stellaris-launchpad&HQS=stellaris-launchpad-b] :
Code Composer Studio (CCS) is the IDE from Texas Instruments. It's Eclipse based and you can use it with the Stellaris Launchpad without any limit on the code size. Keil RealView MDK-ARM: This is a popular IDE supporting several chip architectures, including the ARM Cortex M4 in your Stellaris LaunchPad. You can freely download an evaluation version, which is 32 kiB code size limited. IAR Embedded Workbench. Another popular IDE. It has also an evaluation version, with a 32 kiB code size limit. Sourcery Codebench. An IDE by Mentor Graphics. You can download a 30-day evaluation version. If you want to stick to non-limited non-pay options, you can use Code Composer Studio. End of story. See you in Hack a Day when you finish your neat gadget! Are you still reading? If that's the case, maybe you don't like/have a Windows box for developing, and all the four IDEs I have mentioned are Windows only. But don't worry, of course you can develop for this board using GNU/Linux. Don't forget GNU/Linux is the best OS for software developing ;-). I'll write some entries detailing all the process needed to set up the toolchain, build the StellarisWare libraries, build your project, flash and debug it and set up an Eclipse project. In the end, we will have a completely FOSS
have
completely IDE
[http://en.wikipedia.org/wiki/Free_and_open_source_software]
without any time/code size restrictions! But enough talk, let's get our hands dirty!
1. Create working directory and change to it: mkdir -p ~/src/stellaris cd ~/src/stellaris 2. Install the compiler and dependencies required to build the toolachain. In Ubuntu (and hopefully in most Debian based distros): apt-get install flex bison libgmp3-dev libmpfr-dev libncurses5-dev libmpc-dev \ autoconf texinfo build-essential libftdi-dev git 3. Download the script for building the toolchain and run it. This step will take some time to complete, but when it finishes, you should have the toolchain ready to use, in the sat/ directory under your home: git clone https://github.com/esden/summon-arm-toolchain cd summon-arm-toolchain ./summon-arm-toolchain Once the build is successfully completed, your toolchain will be ready for building programs for the Stellaris Launchpad. For convenience don't forget to add ~/sat/bin to your PATH variable. For example edit .profile file in your home, and add the following line at its end: export PATH=$PATH:$HOME/sat/bin You will have to restart your session for this change to take effect.
These steps will build StellarisWare library and also the examples. StellarisWare example files are not BSD licensed. They have some obscure license terms, including the startup code files, the linker scripts and the Makefiles for building them. This can be a problem for some users, so be warned.
View comments
James Kemp December 24, 2012 at 3:36 AM Step #3, under "Building and using lm4flash", should have the second command say: sudo usermod -aG users my_username Otherwise, this is Awesome!
Thanks so much for a great step-by-step. Jim Reply Replies doragasu December 24, 2012 at 12:25 PM Blogger took as an HTML tag and ate it :-P. Thanks for the correction, it's fixed now. Reply
Andy Robson March 15, 2013 at 2:18 PM thanks seems to work, its blinking good. Reply
janisozaur April 7, 2013 at 10:29 PM you don't have to deal with windows binaries at all, you can clone stellarisware from https://github.com/yuvadm/stellaris/ Reply
an.schall April 15, 2013 at 4:48 PM I always get 'error: bad value (cortex-m4) for -mcpu= switch' and 'error: invalid floating point option: -mfpu=fpv4-sp-d16' when invoking 'make' in the stellaris dir: $ make make[1]: Betrete Verzeichnis '/home/andre/Dokumente/DevBoards/stellarislm4f/dev/stellarisware/driverlib' CC adc.c adc.c:1: error: bad value (cortex-m4) for -mcpu= switch adc.c:1: error: invalid floating point option: -mfpu=fpv4-spd16 make[1]: *** [gcc-cm4f/adc.o] Fehler 1 make[1]: Verlasse Verzeichnis '/home/andre/Dokumente/DevBoards/stellarislm4f/dev/stellarisware/driverlib' make: *** [all] Fehler 2 $ uname -a Linux an 3.5.0-27-generic #46-Ubuntu SMP Mon Mar 25 20:00:05 UTC 2013 i686 i686 i686 GNU/Linux Reply
Ludo6431 April 25, 2013 at 11:17 PM You may need libusb developpement files to build lm4flash : apt-get install libusb-1.0-0-dev Reply Replies Ludo6431 April 26, 2013 at 12:54 AM You may also need python-yaml module: apt-get install python-yaml Reply
Unknown May 8, 2013 at 6:51 AM Whe i was compiling it I got the following error:
checking for arm-none-eabi-gcc... ~/lm4tools/summon-armtoolchain/build/./gcc/xgcc -B/~/lm4tools/summon-armtoolchain/build/./gcc/ -nostdinc -B/~/lm4tools/summon-armtoolchain/build/arm-none-eabi/newlib/ -isystem /~/lm4tools/summon-arm-toolchain/build/arm-noneeabi/newlib/targ-include -isystem /~/lm4tools/summon-armtoolchain/gcc-linaro-4.7-2013.01/newlib/libc/include B/~/lm4tools/summon-arm-toolchain/build/arm-noneeabi/libgloss/arm -L/~/lm4tools/summon-armtoolchain/build/arm-none-eabi/libgloss/libnosys L/~/lm4tools/summon-arm-toolchain/gcc-linaro-4.72013.01/libgloss/arm -B/root/sat/arm-none-eabi/bin/ B/root/sat/arm-none-eabi/lib/ -isystem /root/sat/arm-noneeabi/include -isystem /root/sat/arm-none-eabi/sys-include checking for suffix of object files... configure: error: in `~/lm4tools/summon-arm-toolchain/build/arm-noneeabi/libgcc': configure: error: cannot compute suffix of object files: cannot compile See `config.log' for more details. make[1]: *** [configure-target-libgcc] Error 1 make[1]: Leaving directory `~/lm4tools/summon-armtoolchain/build' Could somebody help me? the directory /sat has been created but i don't know what does this error means Reply Replies doragasu May 8, 2013 at 8:32 AM It looks like you are building as root. Maybe that's not related to this problem, but usually it's not a good idea to build stuff as root. Reply