sparc-rtems-run program args

Saeed Ehteshamifar salpha.2004 at gmail.com
Wed Sep 21 11:33:12 UTC 2016


Hello,

In the help of sparc-rtems4.1X-run is written:

Usage: sparc-rtems4.12-run [options] program [program args]

program args    Arguments to pass to simulated program.
                Note: Very few simulators support this.

I wrote a simple RTEMS program that prints the Init task argument as a
string:

#include <rtems.h>
#include <stdio.h>
rtems_task Init(
  rtems_task_argument ignored
)
{
  printf ("Salaaaaam!\n");
  printf ("%s\n", ignored);
  printf ("Khodafezzz!\n");
  exit(0);
}

/* configuration information */

#include <bsp.h>

#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 4
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_MINIMUM_TASK_STACK_SIZE (8U * 1024U)
#define CONFIGURE_EXTRA_TASK_STACKS (8 * 1024)

#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE

#define CONFIGURE_INIT
#include <rtems/confdefs.h>

However after running my program with:
sparc-rtems4.12-run o-optimize/hello.exe "yoohoo"

I see no output for the argument printf. Is there any format in passing
'program args' to sparc-rtems-run?

Best Regards,
Saeed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20160921/dd54529e/attachment.html>


More information about the users mailing list