Get the output of a program in a file using QEmu

Joel Sherrill joel.sherrill at OARcorp.com
Mon Mar 17 18:47:07 UTC 2008


Jean-Claude Grange wrote:
> Hello,
>
> Thanks for your answer. I'll try that.
> But I wonder if it's possible to do it without modifying the program ?
>
>   
Define USE_COM1_AS_CONSOLE =1 on the RTEMS configure
command line and the console will move to the serial port.
This is how I run RTEMS and GCC tests in an automated
fashion.

I discovered another nice qemu option --no-reboot which
exits when the simulated PC does a reset.  This means you
get a single run of the application and then it exits.  I have
a pending patch in my tree to make the BSP reset on
application exit or exception without waiting for a human
to press a character.  This sped up the gcc test runs
by a large factor since they have >50K tests.

--joel
> José Marinho <zemanel at gmail.com> wrote:
>
>   
>> you can allways create a file, format it to a specific fylesystem and pass
>> it to qemu as an hard drive, and tell the rtems program to create and write
>> in a file in that hard drive. and then you can mount that file with loop
>> device and access it and get the output file. that's the approach that I'de
>> take. Hope that's usefull to you
>>
>> José Marinho
>>
>> On 16/03/2008, Jean-Claude Grange <lebauce at free.fr> wrote:
>>     
>>> Hello,
>>>
>>> I'm sorry if this is a stupid question but I've searched on the mailing
>>> list and
>>> didn't find an answer.
>>> I'm trying to get the output of a RTEMS program (for example the Hello
>>> from the
>>> samples testsuite) using QEmu, into a file. I'm using the command (on
>>> Linux) :
>>>
>>> qemu -nographic -serial file:output.txt -boot a -fda myimage.img -hda
>>> fat:.
>>>
>>> but I don't get anything in the 'output.txt' file. I also tried -serial
>>> /dev/ttyS* and with the -monitor stdio option but I still have nothing. I
>>> must
>>> be doing something wrong.
>>>
>>> I would really appreciate your help.
>>> Thank you
>>> _______________________________________________
>>> rtems-users mailing list
>>> rtems-users at rtems.com
>>> http://rtems.rtems.org/mailman/listinfo/rtems-users
>>>
>>>       
>>
>> --
>> <img> http://www.deec.uc.pt/common/img/deezoom.gif </img>
>>
>>     
>
>
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users
>   


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985





More information about the users mailing list