This is a multi-part message in MIME format. ------=_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 ------=_NextPart_000_023D_01C81180.EE84DD30 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 6.00.6000.16481" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2> <DIV class=3Dmessage-text id=3Dnabble.msgtext>I am trying to debug my = code via the=20 built-in IAR simulator. Is there any way to using the printf statement = in the=20 source code to send characters to terminal I/O during simulation? </DIV> <DIV class=3Dmessage-text>such as : </DIV> <DIV class=3Dmessage-text> </DIV> <DIV class=3Dmessage-text>printf("hello world"); </DIV> <DIV class=3Dmessage-text>printf("PORT2 =3D %d", P2IN); //read and = display port 2=20 pins </DIV> <DIV class=3Dmessage-text> </DIV> <DIV class=3Dmessage-text>Has anybody used the statements above or = something=20 similar before? Please share your idea or suggestions,</DIV> <DIV class=3Dmessage-text> </DIV> <DIV class=3Dmessage-text> Thanks in advance, </DIV> <DIV class=3Dmessage-text> </DIV> <DIV class=3Dmessage-text>JIMMY</DIV> <SCRIPT type=3Dtext/javascript><!-- if( Nabble.ads ) { Nabble.ads(); } //--></SCRIPT> <SCRIPT> if( self =3D=3D top ) { Nabble.writeReturnToLink( '<a href=3D"' +( Nabble.tview =3D=3D "dump" ? = 'http://www.nabble.com/Display-Characters-in-terminal-I-O-on-simulator-t4= 648430.html' : = 'http://www.nabble.com/Display-Characters-in-terminal-I-O-on-simulator-tf= 4648430.html' ) + '" target=3D"_top">Return to thread</a>' ); } else if( Nabble.prev ) Nabble.writeReturnToLink(Nabble.prev); </SCRIPT> <BR></FONT></DIV></BODY></HTML> ------=_NextPart_000_023D_01C81180.EE84DD30--
MSP430 mcu: Display characters on terminal I/O __ IAR simulator
Started by ●October 18, 2007
Reply by ●October 18, 20072007-10-18
JS wrote:> 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?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 by ●October 18, 20072007-10-18
Hans-Bernhard Br�ker wrote:> JS wrote: > >> 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? > > > 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?One reason could be that the code has realtime dependecies to the environment. That would be typical for a realtime system :-)
Reply by ●October 18, 20072007-10-18
Mikael Nordman wrote:> Hans-Bernhard Br�ker wrote: >> JS wrote:>>> 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?>> 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?> One reason could be that the code has realtime dependecies to the > environment.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. > That would be typical for a realtime system :-) 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 by ●October 18, 20072007-10-18
Hans-Bernhard Br�ker wrote:> 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. > > > That would be typical for a realtime system :-) > > 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.Oh Well, it seems to be past my bedtime...
Reply by ●October 19, 20072007-10-19
"JS" <xyz@yahoo.com> writes:> 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 > > JIMMYFirst, 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().