This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Problem loading my program on stellaris launchpad flash

Hi,

I'm evaluating stellaris microcontrollers using a stellaris launchpad. I've debugged the examples for my board included in StellarisWare with out any problem. I've created a new project, copied the code of the examples (including the startup_css.c file), genearated the .bin file  and loaded on flash using LM Flash Programmer with success.

The problem is when I want to load a program I built. I can debug the project and works OK. I can generate the bin file but when I load it on flash, the microcontroller seems to do nothing. I've copied all the properties of the StellarisWare examples to my project, but I think I'm missing something else.

Any idea?

Thanks

 

  • Sergio Cruz Perez said:
    I've created a new project

    Wiki suggested may aid - but there is far faster/easier/safer alternative!

    Do not create a completely new project!  (and this was recently endorsed by vendor - right here)  Hundreds have tried - and most all failed - you can repeatedly read of their plight here - other forums...

    So many things have to be included, attended to - and gotten, "just right." 

    Creating a new project is neither simple nor an especially productive use of your time/energy.  (and unwise if you're in MCU comparison/evaluation phase - as you state)

    Instead - as vedor recently noted - "hitch your wagon" to the closest existing, vendor supplied program.  These are tested, known good - and get you, "on the air" quickly and easily.  You may wish to copy/safely store the original vendor program - and then you can "modify, add, subtract" while avoiding almost all of the "pitfalls" introduced by your own, "creation." 

    Be assured that your learning/mastery of the complex ARM MCU will be challenge enough - mastery of the arcane IDE "ins/outs" should be of far less importance...

     

  • Hi Markel,

    I've tried that before but it doesn't work with my code. If I follow the steps but using stellarisware example codes, it works. When I debug my project everything is OK so, i think something is missing when the project is built in the bin file. Does exist a way to check if the startup_css.c file is being included in the bin file?

  • Sergio:

    Not sure where you are in all the learning process. You have been given good advice by CB1. Take a known working project -- test it that it works and that it works "stand-alone". Copy and Modify that project to move towards what you want -- testing as you go.

    I have built many projects from scratch and moved them from debug to release phase. The process works.

    However, as CB1 points out there are many files to create or copy from other "working projects" to do this easily.

    Have you followed the courses for the Launchpad available on the Launch pad site? If so you should not be having problems with this process.

    http://www.ti.com/ww/en/launchpad/overview_head.html

    Of course the link to the Workshop is broken -- so here it is:

    http://processors.wiki.ti.com/index.php/Tiva_C_Series_LaunchPad

    Best wishes.

  • Considering how "hidden" this link is...

    http://processors.wiki.ti.com/index.php/Getting_Started_with_the_TIVA%E2%84%A2_C-Series_TM4C123G_LaunchPad?DCMP=tivac&HQS=TM4C123G-Launchpad-Workshop

    Direct link to the course...

  • Hi,

     

    Just to close the thread. I solved my problem. It was an optimization issue. I had to restructure my code and change some variables to "volatile". In debug mode, there weren't any problem because the compiler doesn't optimize the code.

    Thank you all

  • Sergio:

    I think that you were conflating and confusing issues. You did not mention that you were building a Release version as opposed to a Debug version in your original Post. That would have clarified the issue.

    It is indeed possible to change the optimization parameters for Debug versions. Indeed the courses have cautions that point out that you will unlikely get good debugging information unless the code is built with low or no optimization. However you can optimize so that you may test the effects.

    Indeed I have made posts on the differences between Release Versions and Debug versions in the past when people had trouble.

    Accurate reporting of issues is a tremendous aid when requesting help.

    As for my missing your need to mark a variable as volatile -- I will re-examine the code you posted. I can't believe I missed that!