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.

I cant upload my first LM4F120 application with IAR IDE

Hello,

I'm using IAR 32ko free IDE V6.4 and yhe Stellaris Launchpad.

I'm not able to upload .

The Log Window display :

Thu Dec 27, 2012 09:15:28: JTAG Speed is set to: 500 kHz
Thu Dec 27, 2012 09:15:28: JTAG IDCODE      = 0x0BA00477
Thu Dec 27, 2012 09:15:28: AHB-AP ID        = 0x00000000
Thu Dec 27, 2012 09:15:28: AHB-AP ROM       = 0x00000000
Thu Dec 27, 2012 09:15:28: ROM Component ID = 0x00000000
Thu Dec 27, 2012 09:15:28: Device ID        = 0x00000000 (Unknown)
Thu Dec 27, 2012 09:15:28: Software reset was performed
Thu Dec 27, 2012 09:15:28: Initial reset was performed
Thu Dec 27, 2012 09:15:29: 172 bytes downloaded (0.77 Kbytes/sec)
Thu Dec 27, 2012 09:15:29: Loaded debugee: C:\ARM_IAR\Essai1\Debug\Exe\cpp.out
Thu Dec 27, 2012 09:15:29: Software reset was performed
Thu Dec 27, 2012 09:15:30: Warning: Stack pointer is setup to incorrect alignment. Stack addr = 0x6802E016
Thu Dec 27, 2012 09:15:30: Target reset
Thu Dec 27, 2012 09:15:30: There was 1 warning during the initialization of the debugging session.

I've verified all Linker Options and RAM location and Stack location are Ok (RAM : 20000000-200007FFF and Stack Size : 0x800)

Can somebody help me ?

Thank you and sorry for my poor english

Alan

  • Did you properly select the "Target" device under Project > Options > Target > Device?

    And further down - did you select TI Stellaris (or similar) under Project > Options > Debugger?

  • Hello cb1,

    Yes, the target is TI Stellaris.

    I've try to compile without StartUpCode source It's the same.

    I've try to compile with the stellaris ware Lib. It's the same.

    I've try to compile without the lib and including the sources (driver, gpio ...).

    Is it a possible IAR bug  ?    Using CCS all is Ok.

    Thank you

    Alan

  • alain milesi said:
    Yes, the target is TI Stellaris

    Not exactly - under IAR - as stated: Project > General Options > Target > Device "LM4F120" - not TI Stellaris.

    TI Stellaris is further down IAR's Project > Options selection - under Debugger.

    We have paid IAR 6.4 - all is fine w/LX4F231, 232 and Launchpad...

  • I am sorry cb1, I wrote my answer very quickly.

    The target is "Texasinstruments LM4F120H5QR". It was good.

    The debugger is "TI Stellaris". It was good also.

    They are the only two options I selected myself. All other options are "Factory settings".

    Notice that the projet works fine under simulator.

    Alan

  • Unfortunately I have another maker's M0 ARM loaded in my IAR system at this time - can't provide you further detail.

    Be sure to check: Project > Options >Category > Output Converter > Output File.  Be sure that this file exists and is located where IAR notes it.

    You may also check under "Linker" > Linker Configuration File.  Again be sure the file exists and is properly located.  I don't recall if the launchpad set-up provided full detail for other than CCS - you may have to "nicely" ask IAR if they have any suggestions...   Good luck - let us know if you succeed.

  • Hello cb1,

    I can't found some thing wrong!

    I've search on the web  " iar warning stack pointer is setup to incorrect alignment"
    And I found :   http://supp.iar.com/Support/?note=82023&from=search+result

    After saving sources, clearing my project folder and create a new project the behavior is different.. Now it starts to upload displaying the upload window "Programming flash memory" and ... no more. The only way is now to clik Cancel".
    The target is connected. If it is disconnected, the sysyem displays an error window.

    This is the log window :

    Fri Dec 28, 2012 08:10:14: Loaded macro file: C:\Program Files\IAR Systems\Embedded Workbench 6.4 Kickstart\arm\config\flashloader\TexasInstruments\FlashLM4Fxxxxxx.mac
    Fri Dec 28, 2012 08:10:14: JTAG Speed is set to: 500 kHz
    Fri Dec 28, 2012 08:10:14: JTAG IDCODE      = 0x0BA00477
    Fri Dec 28, 2012 08:10:14: AHB-AP ID        = 0x00000000
    Fri Dec 28, 2012 08:10:14: AHB-AP ROM       = 0x00000000
    Fri Dec 28, 2012 08:10:14: ROM Component ID = 0x00000000
    Fri Dec 28, 2012 08:10:14: Device ID        = 0x00000000 (Unknown)
    Fri Dec 28, 2012 08:10:14: Software reset was performed
    Fri Dec 28, 2012 08:10:14: Initial reset was performed
    Fri Dec 28, 2012 08:10:14: Turning off watchdog timers
    Fri Dec 28, 2012 08:10:14: 512 bytes downloaded and verified (2.28 Kbytes/sec)
    Fri Dec 28, 2012 08:10:14: Loaded debugee: C:\Program Files\IAR Systems\Embedded Workbench 6.4 Kickstart\arm\config\flashloader\TexasInstruments\FlashLM3SxxxRAM32K.out
    Fri Dec 28, 2012 08:10:14: Target reset
    Fri Dec 28, 2012 08:11:36: Debug session aborted.

    Is the Loaded debugee line correct ? (FlashLM3SxxxRAM32K.out )

    Thank you for all. I continue. I'll let you know the solution ... if I found.

    Alan

  • Hello,

    I've try the same method suggested by IAR for STM32 device. See : http://supp.iar.com/Support/?note=82023&from=search+result

    Using the LMFlash Programmer, I've clear the flash. Now IAR can upload my first very powerfull application (blinking a LED)

    Now we know if we see the message " Warning: Stack pointer is setup to incorrect alignment. Stack addr = 0x6802E016  " we need to clear the flash.

    Many thanks.

    Alan

  • Hello Alain,

    alain milesi said:
    Kickstart\arm\config\flashloader\TexasInstruments\FlashLM3SxxxRAM32K.out

    This looks like one major source of your earlier trouble - there should be a file more appropriate for your LM4F/LX4F device.  The line quoted is incorrect.

    As the launchpad is reasonably new - it does take the 3rd party SW/IDE vendors some time to, "connect all of the dots."

    Glad you persisted and got such a powerful program (led blink) to respond...