• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Microcontrollers » Stellaris® ARM® Microcontrollers » Stellaris® ARM® LM3S Microcontrollers Forum » Where is the program running from?
Share
Stellaris® ARM® Microcontrollers
  • Forum
Options
  • Subscribe via RSS
Helpful Stellaris® LM4F Series Links
  • LM4F Series
  • Stellaris PinMux Utility
  • Stellaris® LM4F120 LaunchPad
  • LM4F MCU Applications
  • LM4F MCU Video
  • ARM Cortex-M4F Whitepaper
  • Stellaris MCU Brochure
  • LM4F232 Eval Kit
  • Where is the program running from?

    Where is the program running from?

    This question is not answered
    Pascal4275
    Posted by Pascal4275
    on May 15 2012 01:43 AM
    Expert1145 points

    Hello!

    I am using LM3S6965 ethernet eval board. I have compiled StellarisWare
    program (led blink). It works fine. If I stop the debugger, it still
    runs 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 from
    flash at power up, so I'm surprised that this one does not...

    Thanks,

    Pascal

    LM3S6965
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Stellaris Joe
      Posted by Stellaris Joe
      on May 15 2012 11:11 AM
      Genius15560 points

      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?

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Pascal4275
      Posted by Pascal4275
      on May 16 2012 03:49 AM
      Expert1145 points

      Hello!

      I'm using CCS5.1.

      Apparently there was something wrong in my installation. Last year, I managed to make
      a 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" item
      was 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 work
      anymore. What is the difference? I noticed that there are also a few c files in the blinky
      project (startup,etc), so I thought that might be the reason. But it still does not work
      right 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?

      Thanks,

      Pascal

      LM3S6965
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Stellaris Joe
      Posted by Stellaris Joe
      on May 16 2012 11:37 AM
      Genius15560 points

      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.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • marc_rir
      Posted by marc_rir
      on May 16 2012 13:54 PM
      Intellectual885 points

      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.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • cb1_mobile
      Posted by cb1_mobile
      on May 16 2012 14:07 PM
      Guru21640 points

      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...)

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Pascal4275
      Posted by Pascal4275
      on May 16 2012 20:17 PM
      Expert1145 points

      Hello!

      Thanks for your replies and sorry for this mess. I finally found the solution.
      Basically what happened is that the imported project (blinky) worked and
      the 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 noticed
      that 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 somebody
      else 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 therefore
      it could be automatically added.

      Pascal

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Stellaris Joe
      Posted by Stellaris Joe
      on May 17 2012 09:49 AM
      Genius15560 points

      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.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • cb1_mobile
      Posted by cb1_mobile
      on May 17 2012 10:00 AM
      Guru21640 points

      Pascal4275
      newly created project with the same code

      @Stellaris Joe:

      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...

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    TI E2E™ Community
    • Support Forums
    • Blogs
    • Videos
    • Groups
    • Site Support & Feedback
    • Settings
    TI E2E™ Community Groups
    • TI University Program
    • Make the Switch
    • Microcontroller Projects
    • Motor Drive & Control
    Other Communities
    • Deyisupport
    • Designsomething.org
    • beagleboard.org
    • TI on Element 14
    • TI on TechXchangeSM
    Other Technical & Support Resources
    • WEBENCH® Design Center
    • Product Information Centers
    • Technical Documents
    • TI Design Network
    • TI Technical Articles
    • TI Training

    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.

    Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

    Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
    TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

    TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
    embedded processors, along with software, tools and the industry’s largest sales/support staff.

    © Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
    Trademarks | Privacy Policy | Terms of Use