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.

stellaris launchpad not running after reset



Hi,

Using Launchpad LM4F120 and CCS

I have one project which I can build and debug using CCS and on repowering it still works fine (ie boots itself from flash and runs as expected).

I have made a new project which builds and runs from CCS but when I repower it fails to run (ie seems like the flash has not been programmed and the run was in ram).

I suspect there is a setting in Properties or in the Linker control, but I can't find it (good old Eclipse!).

Can anyone help me out please?

Thanks - Richard

  • Hi Richard,

    the Tiva Launchpad Workshop 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 is a good place to get you (jump)started.

    I think you've done all project settings by your own, right? Well, I must say I'm a lazy guy and I'm always using 'known good' settings to get started with. An excellent source are the Lab files which were part of the Launchpad Workshop. Another resource is the 'Project0' wwhich comes with the tool (http://processors.wiki.ti.com/index.php/Stellaris_LM4F120_LaunchPad_Blink_the_RGB).

    Rgds
    aBUGSworstnightmare

  • Hi BUGS,

    Thanks - I've been using the Launchpad very happily for a few months and had great support on this forum.

    Could you explain the technique for "using known good project settings" please.

    I used Project/New CCS Project to make a new Empty Project with main.c, connected to ICDI, and a LM4F120H5QR Device.

    Richard

  • Well,

    I intended to say that you could easliy use an existing workshop example to get started with.

    If you generate a project by using the project wizzard you will have to alter/add some settings. The Stellaris/Tiva workshops also cover some of these steps.

    Rgds
    aBUGSworstnightmare

    P.S. I often used Lab5 (from the workshop files) or Project0 for a jump-start and then altered some settings.

  • Richard Bland said:
    I used Project/New CCS Project to make a new Empty Project with main.c, connected to ICDI, and a LM4F120H5QR Device.

    When you create a new Empty project for a Tiva or Stellaris device in CCS there is nothing in the project which sets the interrupt vectors in flash. This means that upon a device power-up/reset the reset vector (and initial stack pointer) won't be stored in flash so the program won't start.

    If you import the "empty" CCS project from TivaWare you will see a startup_ccs.c file which contains and array of interrupt vectors. Your options are either:

    a) Import the "known good" empty project from TivaWare, from the examples\project subdirectory within the TivaWare installation, and then add your code.

    b) Compare the settings in an empty project created in CCS against the TivaWare examples\project to understand the differences.

     

    [This highlights a "weakness" in CCS, in that when a new MSP430 empty project the default CCS linker command file has placements for the interrupt vectors in flash and the reset vector in flash is automatically set to point to C run-time initialization code. Whereas for a new CCS Tiva or Stellaris empty project is created there is nothing which sets the interrupt vectors in flash.]

  • Chester Gillon said:
    [This highlights a "weakness" in CCS, in that when a new MSP430 empty project the default CCS linker command file has placements for the interrupt vectors in flash and the reset vector in flash is automatically set to point to C run-time initialization code. Whereas for a new CCS Tiva or Stellaris empty project is created there is nothing which sets the interrupt vectors in flash.]

    Hi Chester,

    yes, your right! It is a must that CCS also creates a startup-file when one uses 'New CCS Project' to create a new project for TIVA/Stellaris parts. Even if it's empty (all interrupts lead to IntDefaultHandler(void)) it needs to be in place.

    As already noted, I think the best advice is to import 'Project0' and start from there!

    Rgds
    aBUGSworstnightmare 

  • Hi Chester,

    Many thanks - that's exactly what I needed to know - all sorted now :)

    Thanks to BUGS too for advice - I will in future start from another working project - could have saved myself half a day's puzzling...heh ho...