MSP430 mcu: Display characters on terminal I/O __ IAR simulator

=_NextPart_000_023D_01C81180.EE84DD30 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

I am trying to debug my code via the built-in IAR simulator. Is there = any way to using the printf statement in the source code to send = characters to terminal I/O during simulation?=20 such as :=20

printf("hello world");=20 printf("PORT2 =3D %d", P2IN); //read and display port 2 pins=20

Has anybody used the statements above or something similar before? = Please share your idea or suggestions,

Thanks in advance,=20

JIMMY

Reply to
JS
Loading thread data ...

What on earth would you want to go and do that for? You have a simulator/debugger, so why resort all the way back to printf debugging?

Reply to
Hans-Bernhard Bröker

One reason could be that the code has realtime dependecies to the environment. That would be typical for a realtime system :-)

Reply to
Mikael Nordman

Please note that we're talking about a *simulator* here. Time is simulated, too, i.e. it's not real. Thus there can be no realtime dependence on anything other than the (simulated) peripherals.

But entirely untypical for simulators.

Not even to mention that using printf() tends to be seriously incompatible with the idea of keeping the debugged application realtime.

Reply to
Hans-Bernhard Bröker

Oh Well, it seems to be past my bedtime...

Reply to
Mikael Nordman

First, don't include the HTML junk in newsgroup postings. You add bulk and clutter without adding any useful content.

I don't know about IAR, but Imagecraft makes provision for a local version of putchar() which outputs characters to a real or simulated serial port. printf() and the other character output functions all perform their output via putchar().

Reply to
Everett M. Greene

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.