EmbeddedRelated.com
Forums

MSP430 compiler Release mode

Started by baxtercodeworks August 18, 2005
Take pity - I'm a newbie at embedded programming

I've got a prototype with a MSP430F1121a on a header board.  I'm using
the IAR compiler and the TI "Flash Emulation Tool".    In Debug, the
C-Spy debugger downloads a binary file to the MSP430 chip, no problem.
 Compiler Release mode, however, builds a hex/Text file which C-Spy
does not handle - give an error message.  How do I download the
release program to the MSP430 chip?  (or do I not have IAR set up right?)

Perhaps I've not got the right format for output from the XLINK - what
should I select? (there's over 50 choices) (I'm useing the
MSP430F1121A chip.)

I'm also looking at making/getting a in-circuit debugger/burner. I've
got a 3M SOIC test clip - now what do I do?  What other pieces do I
need?  What circuit diagrams?  Etc.






Beginning Microcontrollers with the MSP430

Hello unkmnown,

Not sure if your question was answered but you will have to set up the XLINK
file in options. Yes the XCL file in should point to lnk430F1121.xcl Also try
ticking the  override default box & the ignore CSTARTUP library.
You will also have to make sure the DEVICE is correctly selected under the
General tab and in CSPY the device description is correct (box checked) etc. all
these settings go south when you go from debug to release.

This worked for me so I don't pretend to know the how just the why.
I guess it also depends on what version IAR your using. I also write in ASM so I
am assuming alot.

Hope this was of help

Dennis 

b> Take pity - I'm a newbie at embedded programming

b> I've got a prototype with a MSP430F1121a on a header board.  I'm
using
b> the IAR compiler and the TI "Flash Emulation Tool".    In Debug,
the
b> C-Spy debugger downloads a binary file to the MSP430 chip, no problem.
b>  Compiler Release mode, however, builds a hex/Text file which C-Spy
b> does not handle - give an error message.  How do I download the
b> release program to the MSP430 chip?  (or do I not have IAR set up right?)

b> Perhaps I've not got the right format for output from the XLINK -
what
b> should I select? (there's over 50 choices) (I'm useing the
b> MSP430F1121A chip.)

b> I'm also looking at making/getting a in-circuit debugger/burner.
I've
b> got a 3M SOIC test clip - now what do I do?  What other pieces do I
b> need?  What circuit diagrams?  Etc.








b> .

 
b> Yahoo! Groups Links



 







baxtercodeworks wrote:

>Take pity - I'm a newbie at embedded
programming
>
>I've got a prototype with a MSP430F1121a on a header board.  I'm
using
>the IAR compiler and the TI "Flash Emulation Tool".    In Debug,
the
>C-Spy debugger downloads a binary file to the MSP430 chip, no problem.
> Compiler Release mode, however, builds a hex/Text file which C-Spy
>does not handle - give an error message.  How do I download the
>release program to the MSP430 chip?  (or do I not have IAR set up right?)
>
>Perhaps I've not got the right format for output from the XLINK - what
>should I select? (there's over 50 choices) (I'm useing the
>MSP430F1121A chip.)
>  
>

Try UBROF, that is the native format for the IAR toolchain. However, 
don't expect to do much source-level debugging in C-spy in release mode, 
since in release mode you won't have any debug information.

    -- Anders Lindgren, IAR Systems

-- 
Disclaimer: Opinions expressed in this posting are strictly my own and
not necessarily those of my employer.


Anders Lindgren wrote:
> Try UBROF, that is the native format for the IAR
toolchain. However, 
> don't expect to do much source-level debugging in C-spy in release
mode, 
> since in release mode you won't have any debug information.

Anders,

I have a project with IAR that uses two libraries, compiled in
Release mode, and the main program in Debug mode using the
Released libraries. Now I find I have a problem in one of the
released libraries (it turns out that the optimiser was better
than I was, I forgot to use volatile somewhere :-), so I go
to the suspect *file* and enable debug information and disable
the optimiser. I rebuilt the Release library containing this file,
and I expect that the library will have debug info for just this
file and I can step into it from the main program, but it doesn't
and I can't.

Why not?

Clifford Heath.

Clifford Heath wrote:

>Anders,
>
>I have a project with IAR that uses two libraries, compiled in
>Release mode, and the main program in Debug mode using the
>Released libraries. Now I find I have a problem in one of the
>released libraries (it turns out that the optimiser was better
>than I was, I forgot to use volatile somewhere :-), so I go
>to the suspect *file* and enable debug information and disable
>the optimiser. I rebuilt the Release library containing this file,
>and I expect that the library will have debug info for just this
>file and I can step into it from the main program, but it doesn't
>and I can't.
>
>Why not?
>  
>

Sounds strange, to me it sounds like it should work... In fact, our 
library builder has no way of removing debug information from an object 
file.

You could check the list file of the file in question to check if it 
really was build using debug information, that is that "-r" is used.

Also, you could try to step into the library on the assembler level and 
check if there is debug information (that is, check if the problem is 
the "step into" or if debug info really is missing.)

If that fails, you could try to include the file in question in the main 
application while debugging your problem.

    -- Anders Lindgren, IAR Systems

-- 
Disclaimer: Opinions expressed in this posting are strictly my own and
not necessarily those of my employer.


Anders Lindgren wrote:
> Sounds strange, to me it sounds like it should
work...

Well, if you say it should work, it probably does, but it seemed
to me at the time that I did the right things. Certainly what I
did has worked with other toolchains. Probably my mistake, and as
you pointed out, there is a number of other ways around the problem
(as always!) and I got it fixed (last Saturday).

> You could check the list file of the file in
question to check if it 
> really was build using debug information, that is that "-r" is
used.

I'll try to reproduce it when I get back into EW this weekend,
Thanks for your help.

Clifford Heath.