<p dir="ltr"></p>
<p dir="ltr">On Aug 21, 2016 1:31 AM, "Sambeet Panigrahi" <<a href="mailto:sambeet161616@gmail.com">sambeet161616@gmail.com</a>> wrote:<br>
><br>
> Hi,<br>
> I followed the <a href="https://devel.rtems.org/wiki/Developer/Simulators/QEMU">https://devel.rtems.org/wiki/Developer/Simulators/QEMU</a> <br>
>  simulate RTEMS for i386. I used the hello world example from examples-v2 repository. The source code is directly taken from RTEMS C user guide.<br>
><br>
> /*<br>
>  *  Classic API Hello World<br>
>  */<br>
><br>
> #include <rtems.h> //Contains the RTEMS datatypes<br>
> #include <stdlib.h>//Standard C library<br>
> #include <stdio.h>//Standard C input ouput library<br>
><br>
> rtems_task Init(<br>
>   rtems_task_argument ignored<br>
> )<br>
> {<br>
>   printf( "\n\n*** MODIFIED HELLO WORLD TEST ***\n" );<br>
>   printf( "Hello Sambeet!How are You?\n" );<br>
>   printf( "*** END OF MODIFIED HELLO WORLD TEST ***\n" );<br>
>   exit( 0 );<br>
> }<br>
><br>
> /* configuration information */<br>
><br>
> #include <bsp.h><br>
><br>
> /* NOTICE: the clock driver is explicitly disabled */<br>
> #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER<br>
> #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER<br>
> #define CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM<br>
><br>
> #define CONFIGURE_RTEMS_INIT_TASKS_TABLE<br>
> #define CONFIGURE_MAXIMUM_TASKS 1<br>
><br>
> #define CONFIGURE_INIT<br>
> #include <rtems/confdefs.h><br>
> /* end of file */<br>
><br>
> I compiled it using RTEMS GCC, the exact same commands as the makefile i.e. <br>
><br>
> /home/sambeet/NewRockPort/x86/Install/rtems/4.11.0-rc3/bin/i386-rtems4.11-gcc --pipe -B/home/sambeet/NewRockPort/x86/Install/rtems/4.11.0-rc3/i386-rtems4.11/pc486/lib/ -specs bsp_specs -qrtems   -Wall  -O2 -g    -mtune=i486      -o o-optimize/test.exe test.c<br>
><br>
> that was because makefile was showing some errors<br>
><br>
> sambeet@Holmes ~/Documents/GitRepos/examples/examples-v2/hello/hello_world_c $ make <br>
> i386-rtems4.11-gcc --pipe -B/home/sambeet/NewRockPort/x86/Install/rtems/4.11.0-rc3/i386-rtems4.11/pc486/lib/ -specs bsp_specs -qrtems   -Wall  -O2 -g    -mtune=i486       -c   -o o-optimize/test.o test.c<br>
> /bin/bash: i386-rtems4.11-gcc: command not found<br>
> make: *** [o-optimize/test.o] Error 127<br>
><br>
> Now I generated the executable successfully but when I run it in QEMU.I get a blank screen.However  when I try this which comes with i386 testsuites, I get the output<br>
><br>
> /*<br>
>  *  COPYRIGHT (c) 1989-2012.<br>
>  *  On-Line Applications Research Corporation (OAR).<br>
>  *<br>
>  *  The license and distribution terms for this file may be<br>
>  *  found in the file LICENSE in this distribution or at<br>
>  *  <a href="http://www.rtems.org/license/LICENSE">http://www.rtems.org/license/LICENSE</a>.<br>
>  */<br>
><br>
> #ifdef HAVE_CONFIG_H<br>
> #include "config.h"<br>
> #endif<br>
><br>
> #include <rtems/test.h><br>
><br>
> #include <bsp.h> /* for device driver prototypes */<br>
><br>
> #include <stdio.h><br>
> #include <stdlib.h><br>
><br>
> /* forward declarations to avoid warnings */<br>
> rtems_task Init(rtems_task_argument argument);<br>
><br>
> const char rtems_test_name[] = "HELLO WORLD";<br>
><br>
> rtems_task Init(<br>
>   rtems_task_argument ignored<br>
> )<br>
> {<br>
>   rtems_test_begin();<br>
>   printf( "Hello World\n" );<br>
>   rtems_test_end();<br>
>   exit( 0 );<br>
> }<br>
><br>
><br>
> /* NOTICE: the clock driver is explicitly disabled */<br>
> #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER<br>
> #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER<br>
><br>
> #define CONFIGURE_MAXIMUM_TASKS            1<br>
> #define CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM<br>
><br>
> #define CONFIGURE_RTEMS_INIT_TASKS_TABLE<br>
><br>
> #define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION<br>
><br>
> #define CONFIGURE_INIT<br>
> #include <rtems/confdefs.h><br>
><br>
> QEMU doesn't show any error, just the blank screen, so I am not able to figure out what,s wrong with my code,can somebody help?<br>
></p>
<p dir="ltr">The kernel arguments format changed a few months ago. Very likely it is passing --console=com1 when it is now --console=/dev/com1.</p>
<p dir="ltr">Notice the addition of /dev/ to the device name so no string construction had to occur during the BSP boot sequence.</p>
<p dir="ltr">How are you invoking qemu? If using a virtual floppy, you need to edit a file on that virtual floppy to change this.</p>
<p dir="ltr"> _______________________________________________<br>
> users mailing list<br>
> <a href="mailto:users@rtems.org">users@rtems.org</a><br>
> <a href="http://lists.rtems.org/mailman/listinfo/users">http://lists.rtems.org/mailman/listinfo/users</a><br></p>