Jump to content

Stellaris Launchpad as a Programmer

Recommended Posts

Hello all, new to the forum and to the Stellaris Launchpad (EK-LM4F120XL).


I've got a project coming along and soon it will be time to start thinking about making a PCB. It is really a proof of concept that uses some ideas from my research, so it's not expected to go to production or anything. 


My main question is that I'm thinking it must be possible to use the unpopulated row of headers (labeled TCK TMS TDO TDI EXT TXD RXD) to program a standalone LM4F120 chip as it appears that that is how the programming works for the chip that's on the board. So is it as simple as attaching a cable to those Launchpad pins and connecting them to a bare chip? I'm assuming both sides would need power and that they'd need to have common ground.


Furthermore, I'm fairly new to ARM, so coming from 8-bit AVR where the code you write is basically all that goes on the chip, the idea of startup code and functions already present in ROM etc. is a bit confusing. That said, if I buy a few chips new from TI, do I need to do anything special or will I be able to simply program them with code that I have already working on the Launchpad? I run Linux, so my current workflow (a bit hackish) is to compile code with CCS and then load it to the Launchpad with lm4flash.


Finally, it seems the LM4F120H5QR has been superseded by the TM4C1233H6PM. The datasheet for the latter states that they are identical, so I'm assuming I can buy those and all should work fine. Is this true? 

Link to post
Share on other sites

You can use the LaunchPad to program standalone chips that you purchase and install on your own PCB.  There is a how-to at http://processors.wiki.ti.com/index.php/Stellaris_LM4F120_LaunchPad_Debug_How_To


I'd suggest putting a standard ARM connector on any board you create and interface that to the pins on the LaunchPad http://www.keil.com/support/man/docs/ulinkpro/ulinkpro_hw_if_jtag10.htm  This is what the programmers from Keil, IAR and others use this gives you flexibility if you want a different "standard" programmer later.


The chip you buy from TI will identical to the chip on the LaunchPad in terms of how you program and how you get code on to it.  See LMFlashProgrammer, This plus the bootloaders in ROM means that production boards (debug not needed) don't need to waste space and money on JTAG connectors.  You can use serial or USB or other interfaces.


The TivaWare examples generally use the ROM_ functions.  These are in ROM so no flash space gets used by them.  They also execute at full device speed.  Flash executes at 40Mhz max then you get a read buffer and some minimal performance loss vs the ROM.


Yes again, the TM4C1233H6PM is "identical" to the LX4F.  The TM4C is a later revision of the same silicon.  It has a few errata fixes but the base function is the same.


Don't be scared by the ROM.  If you don't want to use it at first then you can pretend it is not there and then you just concern yourself with the code you write that goes in flash.


The latest builds of openocd now have integrated the support for the ICDI interface on the LaunchPad so lm4flash should not be needed anymore and you can do much more in depth debugging with openocd and gdb.  Tivaware ships with makefiles for GCC as well as the project files for CCS.  I believe Mentor Sourcery CodeBench is also supported in Linux and project files are in TivaWare.





Link to post
Share on other sites

My question is similar, except it involves the hardware.



If I want to build a PCB, and use the LM4F chip on the PCB, is there some place where I can easily see a basic circuit design?  By that I mean, what needs to be pulled up, or down for the chip to run/reset...where I would need to put caps, etc.  



I know that is a pretty broad question, but what I want to know is...if I program one to for instance...blink an LED...other than VCC, GND, and I would assume RESET has to be pulled high or low (haven't check in the datasheet yet)...what else do I need to get it going?



Link to post
Share on other sites

If I want to build a PCB, and use the LM4F chip on the PCB, is there some place where I can easily see a basic circuit design?  By that I mean, what needs to be pulled up, or down for the chip to run/reset...where I would need to put caps, etc.  



If you want to build your board, based on (more or less) same chip as on TI Launchpad, this is not a problem because in Launchpad datasheet (for example spmu289 Stellaris® LM4F120 LaunchPad Evaluation Board) there are is also schematic.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...