_sys_command_string()

Defined in rt_sys.h, this function retrieves the command line used to invoke the current application from the environment that called the application.

Show/hideSyntax

char *_sys_command_string(char *cmd, int len);

where:

cmd

is a pointer to a buffer that can be used to store the command line. It is not required that the command line is stored in cmd.

len

is the length of the buffer.

Show/hideUsage

This function is called by the library startup code to set up argv and argc to pass to main().

Note

You must not assume that the C library is fully initialized when this function is called. For example, you must not call malloc() from within this function. This is because the C library startup sequence calls this function before the heap is fully configured.

Show/hideReturns

The function must return either:

  • A pointer to the command line, if successful. This can be either a pointer to the cmd buffer if it is used, or a pointer to wherever else the command line is stored.

  • NULL, if not successful.

Show/hideSee also

Reference

Using ARM C and C++ Libraries and Floating-Point Support:

Copyright © 2010-2012 ARM. All rights reserved.ARM DUI 0492H
Non-ConfidentialID070912