Hello Joel, Daron,<br><br>Thanks for your help. Things work well for me now, after I delete the whole build directory instead of "make clean".<br><br>BTW, it works without '-nographic' to output to stdio, as I use '-serial stdio', However, with '-nographic', it simply does not work ...<br>
<br>Thanks again,<br>Alan<br><br><div class="gmail_quote">2008/6/25 Reng Zeng <<a href="mailto:alan@fiucssa.org">alan@fiucssa.org</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I remaked all RTEMS code by 'make clean', '../rtems/configure USE_COM1_AS_CONSOLE=1 BSP_PRESS_KEY_FOR_RESET=0 --target=i386-rtems4.9<div class="Ih2E3d"><br>
--enable-rtemsbsp=pc586 --disable-posix --disable-itron<br></div>
--enable-tests=samples', <br>'make', 'make install'.<br><br>This 'hello' sample works well for me, in graphical mode:<br>qemu -serial stdio -boot a -m 128 -fda '/home/zengreng/rtems-boot.img' -hda 'fat:/home/zengreng/pc586/i386-rtems4.9/c/pc586/testsuites/samples/hello' --no-reboot<br>
<br>But with -nographic , it does not work, simply suspending there, no output.<br>qemu -nographic -serial stdio -boot a -m 128 -fda '/home/zengreng/rtems-boot.img' -hda 'fat:/home/zengreng/pc586/i386-rtems4.9/c/pc586/testsuites/samples/hello' --no-reboot<br>
<br>My QEMU version is 0.9.1 as well.<br>QEMU PC emulator version 0.9.1, Copyright (c) 2003-2008 Fabrice Bellard<br><br>Your command line work well for me, but it is still graphic mode, I can not log the output.<br>qemu -boot n -m 128 -tftp /home/zengreng/pc586/i386-rtems4.9/c/pc586/testsuites/samples/hello/ -bootp /hello.exe -no-reboot -serial stdio<br>
<br>And when I run it with -nographic, no any output again.... :(<br>/usr/bin/qemu -boot n -m 128 -tftp /home/zengreng/pc586/i386-rtems4.9/c/pc586/testsuites/samples/hello/ -bootp /hello.exe -no-reboot -serial stdio -nographic<br>
<br>I would appreciate if any more clues for me to figure out the cause.<br><br>Thanks,<br>Alan<br><br><div class="gmail_quote">2008/6/25 Daron Chabot <<a href="mailto:daron.chabot@usask.ca" target="_blank">daron.chabot@usask.ca</a>>:<div>
<div></div><div class="Wj3C7c"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>
<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><div></div><div><div>On 25-Jun-08, at 11:11 AM, Reng Zeng wrote:</div><br></div></div><blockquote type="cite"><div><div></div><div>
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" target="_blank">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>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>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><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><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>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><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><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> <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>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><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><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" target="_blank">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><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" target="_blank">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> Joel Sherrill, Ph.D. Director of Research & Development<br>
<a href="mailto:joel.sherrill@OARcorp.com" target="_blank">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: 0px;">_______________________________________________</div><div style="margin: 0px;">rtems-users mailing list</div><div style="margin: 0px;"><a href="mailto:rtems-users@rtems.com" target="_blank">rtems-users@rtems.com</a></div>
</div></div><div><div style="margin: 0px;"><a href="http://rtems.rtems.org/mailman/listinfo/rtems-users" target="_blank">http://rtems.rtems.org/mailman/listinfo/rtems-users</a></div> </div></blockquote></div>
<br></div></div></div>
</blockquote></div></div></div><br>
</blockquote></div><br>