Command line arguments

Ed Sutter esutter at lucent.com
Thu Oct 14 11:30:26 UTC 2004


Lars,
I beleive this is boot loader specific.  At the time of command
line entry, the boot loader is still the active program, so it 
must provide the ability to deal with arguments.  In MicroMonitor,
this is very easy to do and pretty much independent of the CPU/RTOS.

Command line arguments established when the application starts up
are stored in the monitor's environment, then through a monitor
API call, they can be retrieved from anywhere in application
space (assuming the application doesn't disallow access to the
monitor's API because of MMU-based protection).

In most uMon-based applications, this API call is made prior to main()
so that argc/argv are populated just like a normal program; however,
this isn't a requirement.
Ed

Lars Munch wrote:
> 
> Hi All
> 
> Looking into some of the BSP's startup code I noticed that some BSP's is
> able of taking command line options from at boot loader and pass these
> arguments to the c_rtems_main function in libbsp/shared/main.c. But how
> can I get these argument from my "Init task"? No arguments seems to be
> passed to my "rtems_task Init(rtems_task_argument argument)" function?
> 
> Thanks.
> 
> Lars Munch



More information about the users mailing list