<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div>What version of Qemu are you using ?</div><div><br></div>To narrow down the problem, try using one of the sample/test programs in /opt/rtems-4.9/i386-rtems4.9/pc586/lib/rtems-4.9/tests (eg: hello.exe).<div><br></div><div>The command line I use with Qemu 0.9.1 is:</div><div><br></div><div>qemu -no-reboot -m 128 -boot n -tftp /opt/rtems/i386-rtems/pc386/lib/rtems-4.9/tests -bootp /hello.exe -serial stdio<br><div><br></div><div><br></div><div>-- dc</div><div><br></div><div><br></div><div><br><div><div>On 25-Jun-08, at 11:11 AM, Reng Zeng wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">It does not work as well with '-serial stdio', <br><br>btw, I also 'make clean' 'make' my program. And, when I make , it seems do not have any "USE_COM1_AS_CONSOLE" in it, is that the problem?<br> <br>i386-rtems4.9-gcc --pipe -B/opt/rtems-4.9/i386-rtems4.9/pc586/lib/ -specs bsp_specs -qrtems -g -Wall -O2 -g -g -mtune=pentium -c -o o-optimize/init.o init.c<br><br>Thanks,<br>Alan<br><br><div class="gmail_quote"> 2008/6/25 Joel Sherrill <<a href="mailto:joel.sherrill@oarcorp.com">joel.sherrill@oarcorp.com</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div class="Ih2E3d">Reng Zeng wrote:<br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Hi Joel,<br> <br> Thanks for your tips, I tried it as steps below, it still does not work.<br> <br> 1. ../rtems/configure USE_COM1_AS_CONSOLE=1 BSP_PRESS_KEY_FOR_RESET=0 --target=i386-rtems4.9 --enable-rtemsbsp=pc586 --disable-posix --disable-itron --enable-tests=samples<br> 2. make clean<br> 3. make<br> 4. make install<br> <br> Then I run it my qemu:<br> <br> /usr/bin/qemu -monitor null -nographic -serial <a href="file:qemu.log">file:qemu.log</a> -boot a -m 128 -fda '/home/zengreng/rtems-boot.img' -hda 'fat:/home/zengreng/workspace/rtems_tools/src/generated/' --no-reboot<br> <br> </blockquote></div> Try -serial stdio and see if that works. Maybe file: doesn't work. I have never used it.<div class="Ih2E3d"><br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> The program to run is managed by Makefile I drafted, not automake, I attached it to see whether that is the cause things do not work, shall I add something like "USE_COM1_AS_CONSOLE" into it as well?<br> <br> </blockquote></div> There was no program attached but any of the samples should just work<br> that way.<br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <br> Thanks again,<br> Alan<br> <br> 2008/6/25 Joel Sherrill <<a href="mailto:joel.sherrill@oarcorp.com" target="_blank">joel.sherrill@oarcorp.com</a> <mailto:<a href="mailto:joel.sherrill@oarcorp.com" target="_blank">joel.sherrill@oarcorp.com</a>>>:<div> <div></div><div class="Wj3C7c"><br> <br> Reng Zeng wrote:<br> <br> Hello,<br> <br> It do NOT work for me, I add "#define USE_COM1_AS_CONSOLE 1 "<br> into my init.c, and run qemu by<br> qemu -nographic -serial <a href="file:output.txt">file:output.txt</a> -boot a -m 128<br> -fda myimage.img -hda fat:.<br> <br> No. That's not going to work. You have to configure with that<br> set on the configure<br> comment line.<br> <br> ..../configure ... USE_COM1_AS_CONSOLE=1 BSP_PRESS_KEY_FOR_RESET=0<br> <br> The BSP_PRESS_KEY_FOR_RESET=0 configures the BSP to not wait for a key<br> press before resetting. Just add --no-reboot to your qemu<br> command line and<br> it will "power down" which is exiting. :-D<br> <br> I did not get anything from output.txt. It run well in graphic<br> mode, but I want the output from the program.<br> <br> I would appreciate if you could shed me some light on my mind :)<br> <br> This is a fragement from the shell script I use.<br> <br> QEMU="/usr/local/bin/qemu -cpu 486"<br> <br> runit()<br> {<br> ARGS="-m 8 -boot a -fda ${fd0Image} -hda fat:${hd0Dir} \<br> -monitor null -nographic -serial stdio --no-reboot"<br> <br> ${QEMU} ${ARGS} >${logfile} 2>&1 &<br> }<br> <br> <br> Thanks,<br> Alan<br> <br> 2008/3/21 Jean-Claude Grange <<a href="mailto:lebauce@free.fr" target="_blank">lebauce@free.fr</a><br></div></div> <mailto:<a href="mailto:lebauce@free.fr" target="_blank">lebauce@free.fr</a>> <mailto:<a href="mailto:lebauce@free.fr" target="_blank">lebauce@free.fr</a><div><div></div><div class="Wj3C7c"><br> <mailto:<a href="mailto:lebauce@free.fr" target="_blank">lebauce@free.fr</a>>>>:<br> <br> <br> Hello,<br> <br> Thank you all for answers. USE_COM1_AS_CONSOLE =1 worked<br> just fine.<br> I'm really interested in your patch, Joel. Are you going to<br> commit it<br> soon ? Or would you mind sending your patch to me so that I can<br> test it.<br> <br> Thanks<br> See you<br> <br> <br> Le 17 mars 08 à 19:47, Joel Sherrill a écrit :<br> <br> > Jean-Claude Grange wrote:<br> >> Hello,<br> >><br> >> Thanks for your answer. I'll try that.<br> >> But I wonder if it's possible to do it without modifying the<br> >> program ?<br> >><br> >><br> > Define USE_COM1_AS_CONSOLE =1 on the RTEMS configure<br> > command line and the console will move to the serial port.<br> > This is how I run RTEMS and GCC tests in an automated<br> > fashion.<br> ><br> > I discovered another nice qemu option --no-reboot which<br> > exits when the simulated PC does a reset. This means you<br> > get a single run of the application and then it exits. I<br> have<br> > a pending patch in my tree to make the BSP reset on<br> > application exit or exception without waiting for a human<br> > to press a character. This sped up the gcc test runs<br> > by a large factor since they have >50K tests.<br> ><br> > --joel<br> >> José Marinho <<a href="mailto:zemanel@gmail.com" target="_blank">zemanel@gmail.com</a><br></div></div> <mailto:<a href="mailto:zemanel@gmail.com" target="_blank">zemanel@gmail.com</a>> <mailto:<a href="mailto:zemanel@gmail.com" target="_blank">zemanel@gmail.com</a><div class="Ih2E3d"><br> <mailto:<a href="mailto:zemanel@gmail.com" target="_blank">zemanel@gmail.com</a>>>> wrote:<br> >><br> >><br> >>> you can allways create a file, format it to a specific<br> fylesystem<br> >>> and pass<br> >>> it to qemu as an hard drive, and tell the rtems program<br> to create<br> >>> and write<br> >>> in a file in that hard drive. and then you can mount<br> that file<br> >>> with loop<br> >>> device and access it and get the output file. that's<br> the approach<br> >>> that I'de<br> >>> take. Hope that's usefull to you<br> >>><br> >>> José Marinho<br> >>><br> >>> On 16/03/2008, Jean-Claude Grange <<a href="mailto:lebauce@free.fr" target="_blank">lebauce@free.fr</a><br> <mailto:<a href="mailto:lebauce@free.fr" target="_blank">lebauce@free.fr</a>><br></div><div><div></div><div class="Wj3C7c"> <mailto:<a href="mailto:lebauce@free.fr" target="_blank">lebauce@free.fr</a> <mailto:<a href="mailto:lebauce@free.fr" target="_blank">lebauce@free.fr</a>>>> wrote:<br> >>><br> >>>> Hello,<br> >>>><br> >>>> I'm sorry if this is a stupid question but I've<br> searched on the<br> >>>> mailing<br> >>>> list and<br> >>>> didn't find an answer.<br> >>>> I'm trying to get the output of a RTEMS program (for<br> example the<br> >>>> Hello<br> >>>> from the<br> >>>> samples testsuite) using QEmu, into a file. I'm using the<br> >>>> command (on<br> >>>> Linux) :<br> >>>><br> >>>> qemu -nographic -serial <a href="file:output.txt">file:output.txt</a> -boot a -fda<br> myimage.img<br> >>>> -hda<br> >>>> fat:.<br> >>>><br> >>>> but I don't get anything in the 'output.txt' file. I<br> also tried -<br> >>>> serial<br> >>>> /dev/ttyS* and with the -monitor stdio option but I<br> still have<br> >>>> nothing. I<br> >>>> must<br> >>>> be doing something wrong.<br> >>>><br> >>>> I would really appreciate your help.<br> >>>> Thank you<br> >>>> _______________________________________________<br> >>>> rtems-users mailing list<br> >>>> <a href="mailto:rtems-users@rtems.com" target="_blank">rtems-users@rtems.com</a> <mailto:<a href="mailto:rtems-users@rtems.com" target="_blank">rtems-users@rtems.com</a>><br></div></div> <mailto:<a href="mailto:rtems-users@rtems.com" target="_blank">rtems-users@rtems.com</a> <mailto:<a href="mailto:rtems-users@rtems.com" target="_blank">rtems-users@rtems.com</a>>><div class="Ih2E3d"><br> <br> >>>> <a href="http://rtems.rtems.org/mailman/listinfo/rtems-users" target="_blank">http://rtems.rtems.org/mailman/listinfo/rtems-users</a><br> >>>><br> >>>><br> >>><br> >>> --<br> >>> <img> <a href="http://www.deec.uc.pt/common/img/deezoom.gif" target="_blank">http://www.deec.uc.pt/common/img/deezoom.gif</a> </img><br> >>><br> >>><br> >><br> >><br> >> _______________________________________________<br> >> rtems-users mailing list<br> >> <a href="mailto:rtems-users@rtems.com" target="_blank">rtems-users@rtems.com</a> <mailto:<a href="mailto:rtems-users@rtems.com" target="_blank">rtems-users@rtems.com</a>><br></div> <mailto:<a href="mailto:rtems-users@rtems.com" target="_blank">rtems-users@rtems.com</a> <mailto:<a href="mailto:rtems-users@rtems.com" target="_blank">rtems-users@rtems.com</a>>><div class="Ih2E3d"><br> <br> >> <a href="http://rtems.rtems.org/mailman/listinfo/rtems-users" target="_blank">http://rtems.rtems.org/mailman/listinfo/rtems-users</a><br> >><br> ><br> ><br> > --<br> > Joel Sherrill, Ph.D. Director of Research &<br> Development<br> > <a href="mailto:joel.sherrill@OARcorp.com">joel.sherrill@OARcorp.com</a> On-Line Applications<br> Research<br> > Ask me about RTEMS: a free RTOS Huntsville AL 35805<br> > Support Available (256) 722-9985<br> ><br> ><br> <br> _______________________________________________<br> rtems-users mailing list<br> <a href="mailto:rtems-users@rtems.com" target="_blank">rtems-users@rtems.com</a> <mailto:<a href="mailto:rtems-users@rtems.com" target="_blank">rtems-users@rtems.com</a>><br></div> <mailto:<a href="mailto:rtems-users@rtems.com" target="_blank">rtems-users@rtems.com</a> <mailto:<a href="mailto:rtems-users@rtems.com" target="_blank">rtems-users@rtems.com</a>>><div class="Ih2E3d"><br> <br> <a href="http://rtems.rtems.org/mailman/listinfo/rtems-users" target="_blank">http://rtems.rtems.org/mailman/listinfo/rtems-users</a><br> <br> <br> <br> <br> -- Joel Sherrill, Ph.D. Director of Research & Development<br> <a href="mailto:joel.sherrill@OARcorp.com">joel.sherrill@OARcorp.com</a> On-Line Applications Research<br> Ask me about RTEMS: a free RTOS Huntsville AL 35805<br> Support Available (256) 722-9985<br> <br> <br> <br> </div></blockquote> <br> <br> -- <br><div><div></div><div class="Wj3C7c"> Joel Sherrill, Ph.D. Director of Research & Development<br> <a href="mailto:joel.sherrill@OARcorp.com">joel.sherrill@OARcorp.com</a> On-Line Applications Research<br> Ask me about RTEMS: a free RTOS Huntsville AL 35805<br> Support Available (256) 722-9985<br> <br> <br> </div></div></blockquote></div><br><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">rtems-users mailing list</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="mailto:rtems-users@rtems.com">rtems-users@rtems.com</a></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="http://rtems.rtems.org/mailman/listinfo/rtems-users">http://rtems.rtems.org/mailman/listinfo/rtems-users</a></div> </blockquote></div><br></div></div></body></html>