Hello World example from example-v2 not working with QEMU

Sambeet Panigrahi sambeet161616 at gmail.com
Fri Aug 26 05:22:58 UTC 2016


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20160826/76df9a0b/attachment-0002.html>


More information about the users mailing list