EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Real Time Debugging Messages using IAR/C Spy

Started by achillea88 May 16, 2003
Hello,

I am a beginner with the MSP430, and I am wondering if it is possible 
to print debugging messages using printf or a similar function while 
running your code on the MSP430.

I see posts with people doing this with the LCD, but shouldn't it be 
possible to send debugging messages through your computers parrallel 
port and have them either captured into a text file or displayed in C-
Spy?  

The device I am developing interfaces with several peripherals so I 
would be much happier actually using the msp430 to test the code and 
debug than setting up the IAR Emulation tools, etc.

I would really appreciate any help/advice people had with this sort 
of debugging.

Thanks

Bob
achillea88@achi...


Beginning Microcontrollers with the MSP430

Yes, if you have a C compiler, define putchar() to send a character out the
UART.  Now printf will output to the UART.  Hook the serial port up to the
PC, and you can watch it in hyperterminal etc..


----- Original Message ----- 
From: "achillea88" <achillea88@achi...>
To: <msp430@msp4...>
Sent: Friday, May 16, 2003 4:05 PM
Subject: [msp430] Real Time Debugging Messages using IAR/C Spy


> Hello,
>
> I am a beginner with the MSP430, and I am wondering if it is possible
> to print debugging messages using printf or a similar function while
> running your code on the MSP430.
>
> I see posts with people doing this with the LCD, but shouldn't it be
> possible to send debugging messages through your computers parrallel
> port and have them either captured into a text file or displayed in C-
> Spy?
>
> The device I am developing interfaces with several peripherals so I
> would be much happier actually using the msp430 to test the code and
> debug than setting up the IAR Emulation tools, etc.
>
> I would really appreciate any help/advice people had with this sort
> of debugging.
>
> Thanks
>
> Bob
> achillea88@achi...
>
>
>
> .
>
>
>
> ">http://docs.yahoo.com/info/terms/
>
>
>


Good question, but what if both uarts are already used, is there an
other way to do this?
 
 
thanks,
Martijn
-----Oorspronkelijk bericht-----
Van: David Lions [mailto:davidl@davi...] 
Verzonden: vrijdag 16 mei 2003 8:25
Aan: msp430@msp4...
Onderwerp: Re: [msp430] Real Time Debugging Messages using IAR/C Spy
 
Yes, if you have a C compiler, define putchar() to send a character out
the
UART.  Now printf will output to the UART.  Hook the serial port up to
the
PC, and you can watch it in hyperterminal etc..


----- Original Message ----- 
From: "achillea88" <achillea88@achi...>
To: <msp430@msp4...>
Sent: Friday, May 16, 2003 4:05 PM
Subject: [msp430] Real Time Debugging Messages using IAR/C Spy


> Hello,
>
> I am a beginner with the MSP430, and I am wondering if it is possible
> to print debugging messages using printf or a similar function while
> running your code on the MSP430.
>
> I see posts with people doing this with the LCD, but shouldn't it be
> possible to send debugging messages through your computers parrallel
> port and have them either captured into a text file or displayed in C-
> Spy?
>
> The device I am developing interfaces with several peripherals so I
> would be much happier actually using the msp430 to test the code and
> debug than setting up the IAR Emulation tools, etc.
>
> I would really appreciate any help/advice people had with this sort
> of debugging.
>
> Thanks
>
> Bob
> achillea88@achi...
>
>
>
> .
>
>
>
> ">http://docs.yahoo.com/info/terms/
>
>
>




Yahoo! Groups Sponsor
 
<http://rd.yahoo.com/M%1812.3170658.4537139.1261774/D=egroupweb/S05
005378:HM/A64415/R=0/*http:/www.netflix.com/Default?mqso`164784&par
tid170658> 
 
<http://us.adserver.yahoo.com/l?M%1812.3170658.4537139.1261774/D=egrou
pmail/S=:HM/A64415/rand0139919> 

.



">http://docs.yahoo.com/info/terms/> . 





At 08:32 AM 5/16/2003 +0200, Martijn Broens wrote:
>Good question, but what if both uarts are already
used, is there an
>other way to do this?
>  ...

You can always bit bang it using an IO pin or two (or three...)


// richard <http://www.imagecraft.com> 
<http://www.dragonsgate.net/mailman/listinfo> 


Before Paul replies to this ;-)

If you use Crossworks then you can get debug messages output over the JTAG 
interface
to a console window in the debugger.  This is relatively slow and can have 
an effect upon
the operating speed of the processor (it pauses while the JTAG interface is 
being accessed)
but when all other output interfaces are used up it can get you out of a 
hole.

Ian

http://www.satamatics.com


>From: "achillea88"
<achillea88@achi...>
>Reply-To: msp430@msp4...
>To: msp430@msp4...
>Subject: [msp430] Real Time Debugging Messages using IAR/C Spy
>Date: Fri, 16 May 2003 06:05:52 -0000
>
>Hello,
>
>I am a beginner with the MSP430, and I am wondering if it is possible
>to print debugging messages using printf or a similar function while
>running your code on the MSP430.
>
>I see posts with people doing this with the LCD, but shouldn't it be
>possible to send debugging messages through your computers parrallel
>port and have them either captured into a text file or displayed in C-
>Spy?
>
>The device I am developing interfaces with several peripherals so I
>would be much happier actually using the msp430 to test the code and
>debug than setting up the IAR Emulation tools, etc.
>
>I would really appreciate any help/advice people had with this sort
>of debugging.
>
>Thanks
>
>Bob
>achillea88@achi...
>

_________________________________________________________________
Worried what your kids see online? Protect them better with MSN 8 
http://join.msn.com/?pageatures/parental&pgmarket=en-gb&XAPID6&DI59


Ian, All,

> Before Paul replies to this ;-)

Ahh, beat me to it...  ;-)

> If you use Crossworks then you can get debug
messages output 
> over the JTAG 
> interface
> to a console window in the debugger.  This is relatively slow 
> and can have 
> an effect upon
> the operating speed of the processor (it pauses while the 
> JTAG interface is 
> being accessed)
> but when all other output interfaces are used up it can get 
> you out of a 
> hole.

Glad you responded to this, Ian.  However, the next version of
CrossWorks will not have this intrusive effect on the code, and you'll
*still* be able to output debugging information over JTAG.  Note that
you can do a lot more than just output strings over JTAG using
debug_printf(), the v1.1 software can use the JTAG interface as a
virtual terminal, you can open files, and so on.

Also note that debug_printf()'s implementation does *not* drag in the
printf library--quite amazing, it's about 40 words of code to support
debug_printf.  Now, that's going to be invaluable to somebody debugging
a system on its code limit... ;-)

-- Paul.


The 2024 Embedded Online Conference