Hello World example from example-v2 not working with QEMU

Sambeet Panigrahi sambeet161616 at gmail.com
Sat Aug 27 05:24:40 UTC 2016


Thank You Saeed! That works perfectly for me. It easier this way too,no
need to prepare the floppy disk image :)

On Fri, Aug 26, 2016 at 8:01 PM, Gedare Bloom <gedare at rtems.org> wrote:

> Please see the instructions in the examples-v2/README.waf or read
> about how to use Application Makefiles
> https://devel.rtems.org/wiki/Developer/Makefile to learn more about
> how to compile and link an application with an installed build of
> RTEMS.
>
> Note that pc386 has a compile-time option to select the console
> driver, see for an example:
> https://devel.rtems.org/wiki/Developer/Simulators/QEMU#
> Usingthertems-testingModule
>
> Gedare
>
> On Fri, Aug 26, 2016 at 1:22 AM, Sambeet Panigrahi
> <sambeet161616 at gmail.com> wrote:
> > Hi
> > I made the following changes to the commands in
> > https://devel.rtems.org/wiki/Building/Grub for GRUB2
> >
> > set default="0"
> > set timeout=10
> > serial --unit=0 --speed=9600
> > terminal serial
> >
> > menuentry "RTEMS Hello" {
> >      set root='hd1,msdos1'
> >      multiboot (hd1,msdos1)/examples/hello.exe --console=/dev/com1
> > --printk=/dev/com1
> > }
> >
> > And my qemu.sh file looks like
> >
> > #!/bin/bash
> > qemu-system-i386 -m 128 -boot b -hda rtems-boot.img -hdb fat:. -serial
> stdio
> > -no-reboot
> >
> > But the problem stays the same.The examples-v2/hello/hello_world_
> c/test.c
> > file still does not compile whereas the one from pc386 bsp testsuite
> > compiles.That's why I think there's something wrong with my code.
> >
> > The source code is:
> >
> > /*
> >  *  Classic API Hello World
> >  */
> >
> > #include <rtems.h> //Contains the RTEMS datatypes
> > #include <stdlib.h>//Standard C library
> > #include <stdio.h>//Standard C input ouput library
> >
> > rtems_task Init(
> >   rtems_task_argument ignored
> > )
> > {
> >   printf( "\n\n*** MODIFIED HELLO WORLD TEST ***\n" );
> >   printf( "Hello Sambeet!How are You?\n" );
> >   printf( "*** END OF MODIFIED HELLO WORLD TEST ***\n" );
> >   exit( 0 );
> > }
> >
> > /* configuration information */
> >
> > #include <bsp.h>
> >
> > /* NOTICE: the clock driver is explicitly disabled */
> > #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
> > #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
> > #define CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM
> >
> > #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
> > #define CONFIGURE_MAXIMUM_TASKS 1
> >
> > #define CONFIGURE_INIT
> > #include <rtems/confdefs.h>
> > /* end of file */
> >
> > And I compile it using this command.I don't understand where I am going
> > wrong as this produces the executable.
> >
> > /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
> >
> >
> >
> > _______________________________________________
> > users mailing list
> > users at rtems.org
> > http://lists.rtems.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20160827/f03b21c2/attachment-0002.html>


More information about the users mailing list