Sign in

username:

password:



Not a member?

Search msp430



Search tips

Subscribe to msp430



Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | MSP430 | has anyone used the terminal I/O for debugging?


Advertise Here

The purpose of this group is to foster exchange of information on the Texas Instruments MSP430 family of microcontrollers and related tools. Everyone welcome, all levels of familiarity/expertise.

has anyone used the terminal I/O for debugging? - nhsolarguy - Aug 19 23:16:03 2009

Hi folks,

I'm trying to figure out how to use the terminal I/O window in the debugger. It's not well documented, but I used an #ifdef to compile in a putchar and getchar (to replace the hardware routines). The putchar works fine and displays in the terminal, but the getchar hangs waiting for characters - getchar() breakpoints and waits for a character from the terminal I/O. Apparently, the system breakpoint can't be turned off (it's grayed out in the project options).

Is there some equivalent to getchar() that doesn't set the system breakpoint (or sets it, looks to see if there's a character waiting, and clears it)?

thanks,
Mike.

------------------------------------



(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )


Re: has anyone used the terminal I/O for debugging? - old_cow_yellow - Aug 20 2:22:12 2009

I have used the terminal I/O emulator of IAR debugger a few times. I think it uses fake getch() and putch() consisting of a single RET instruction only.I think the debugger hides a break-point there and put/get a char to/from the PC. It is all done in smokes and mirrors.

--- In m...@yahoogroups.com, "nhsolarguy" wrote:
>
> Hi folks,
>
> I'm trying to figure out how to use the terminal I/O window in the debugger. It's not well documented, but I used an #ifdef to compile in a putchar and getchar (to replace the hardware routines). The putchar works fine and displays in the terminal, but the getchar hangs waiting for characters - getchar() breakpoints and waits for a character from the terminal I/O. Apparently, the system breakpoint can't be turned off (it's grayed out in the project options).
>
> Is there some equivalent to getchar() that doesn't set the system breakpoint (or sets it, looks to see if there's a character waiting, and clears it)?
>
> thanks,
> Mike.
>
------------------------------------



(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )

Re: has anyone used the terminal I/O for debugging? - tintronic - Aug 20 10:42:00 2009

I think I used IAR's (you didn't specify your emulator) terminal once, but it was too slow, because of the need to use a breakpoint which means the CPU is stopped, data is transferred throught JTAG, then execution is resumed. It's similar to using virtual breakpoints, in which case the emulator singlesteppes the CPU.

What I sometimes use for 'online' debugging (to not stop the CPU for seeing the RAM contents) is an 4x20 alfanumeric LCD display. It uses 7 I/O lines in total and it beats the hell out of 7 leds ;-). I use printf() and replace putchar() if execution time allows for the overhead, or write the code for binary to ascii conversion if I can't spare the execution time.

The UART and hyperterminal is sometimes a good alternative, specially if you can't spare the pins. Again, you may use printf() and replace putchar().

Regards,
Michael K.

--- In m...@yahoogroups.com, "nhsolarguy" wrote:
>
> Hi folks,
>
> I'm trying to figure out how to use the terminal I/O window in the debugger. It's not well documented, but I used an #ifdef to compile in a putchar and getchar (to replace the hardware routines). The putchar works fine and displays in the terminal, but the getchar hangs waiting for characters - getchar() breakpoints and waits for a character from the terminal I/O. Apparently, the system breakpoint can't be turned off (it's grayed out in the project options).
>
> Is there some equivalent to getchar() that doesn't set the system breakpoint (or sets it, looks to see if there's a character waiting, and clears it)?
>
> thanks,
> Mike.
>
------------------------------------



(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )