TI E2E Community
Stellaris® ARM® Microcontrollers
Stellaris® ARM® LM3S Microcontrollers Forum
Where is the program running from?
Hello!I am using LM3S6965 ethernet eval board. I have compiled StellarisWareprogram (led blink). It works fine. If I stop the debugger, it stillruns fine. Now if I unplug the board and plug it back, it does not blink.So my wuestion is simpl: is the program running in RAM? If it's the case,what should I do to have it run from flash?I used another program earlier (enet_io http server), and it runs fromflash at power up, so I'm surprised that this one does not...Thanks,Pascal
Do you mean the "blinky" program? Are you using the StellarisWare example, or is this a new program that you made?
What tools are you using?
I'm using CCS5.1.
Apparently there was something wrong in my installation. Last year, I managed to makea derivative from enet_io in order to control motors and other devices through the net.Now nothing was working anymore, so I decided to go back to the simplest possible code.I was reading the file "Getting Started with the Cortex-M3® and StellarisWare®Student Guide and Lab Manual" and I noticed that "import existing project" itemwas missing from the project menu. I reinstalled everything and I am back on track.
But this brings me back to my question.- I create a new program (without loading existing blinky program, just a plain new program).- I copy blink.c into of main.c and change the path to the only include file.Compiling and running works fine. However, if I unplug and re-plug, it does not workanymore. What is the difference? I noticed that there are also a few c files in the blinkyproject (startup,etc), so I thought that might be the reason. But it still does not workright after plugging USB... What's the difference between importing the existing "blinky"project and creating it from scratch by copying the files in the newly created project?
The project menu "import existing project" was from CCS 4.x. In CCS 5.x they moved that to the file menu, where you choose File-->Import, and then from there you can select the kind of thing to import, one of which is an existing CCS project.
When you create the project from scratch, do you set the part type? Do you have a file named lm3s6965.cmd in your newly created project? This is the linker script and it should be properly locating your program to load into flash.
My guess would be that you have a clock(crystal) problem, can you check with an oscilloscope if the signal on the crystal is oscillating? Sometimes a slightly change in capacitance(or a broken crystal) won’t let the crystal to start oscillating, but if for some reason it starts(debugging?), then it continues working.
marc_rir clock(crystal) problem
Agree w/Marc in general - however poster states early that his is official Eval Board - thus doubt bad value/connection/device. We have seen (and corrected) past MCU failure due entirely to excessive "C" values at xtal pins. Again - don't believe official Eval suffers such fate.
Instead - perhaps this eval board "relies" on MCU's internal pull-ups for JTAG connections. While JTAG probe attached - board works (suggesting that probe properly controls JTAG lines) When probe is removed - inadequate JTAG signal levels/oscillation place the MCU into indeterminate state. Adding external pull-ups to JTAG lines can quickly/easily confirm... (and fix - if this is the issue) (poster's writing somewhat unclear as to JTAG probe's presence/attachment...)
Thanks for your replies and sorry for this mess. I finally found the solution.Basically what happened is that the imported project (blinky) worked andthe newly created project with the same code was working only in debug mode(i.e. not after power cycling the board). By comparing both projects, I noticedthat the file startup_ccs.c was missing in the newly created project.Now it works fine. Sorry for all this mess. I hope this will help somebodyelse in the same case.Is there a way to automatically include this file when starting a new project?It looks like it's exactly the same file for all the projects, and thereforeit could be automatically added.
Thank you for figuring out and pointing out the problem. I'm sorry I did not spot that from the beginning. The CCS project wizard does create the linker script but not the startup code. I think it must be providing some default startup code from a library but it probably does not have a proper vector table. We will work with the CCS team to see if there is a way to solve this problem.
Pascal4275newly created project with the same code
Forgive - but this NEW/USER PROJECT failure- and near variants - occurs SO often...
Perhaps the "urge" to "create own project" should be dampened until better safeguards and/or clear/detailed written description of the process is published...
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.