source/platform/CM/syscalls.c
// This is the standard default implementation for the routine to
// process args. It returns a single empty arg.
// For semihosting applications, this is redefined to get the real
// args from the debugger. You can also use it if you decide to keep
// some args in a non-volatile memory.
This is the standard default implementation for the routine to
process args. It returns a single empty arg.
For semihosting applications, this is redefined to get the real
args from the debugger. You can also use it if you decide to keep
some args in a non-volatile memory.
This is the standard default implementation for the routine to process args . It returns a single empty arg . For semihosting applications this is redefined to get the real args from the debugger . You can also use it if you decide to keep some args in a non - volatile memory .
void __attribute__((weak))
__initialize_args(int* p_argc, char*** p_argv)
{
  static char name[] = "";
  static char* argv[2] =
    { name, NULL };
  *p_argc = 1;
  *p_argv = &argv[0];
  return;
}
void __attribute__ ( ( weak ) ) __initialize_args ( int * p_argc , char * * * p_argv ) { static char name [ ] = " " ; static char * argv [ 2 ] = { name , NULL } ; * p_argc = 1 ; * p_argv = & argv [ 0 ] ; return ; }
This is the standard default implementation for the routine to
process args.
This is the standard default implementation for the routine to process args .
// By the time we reach this, the data and bss should have been initialised. // The strings pointed to by the argv array shall be modifiable by the // program, and retain their last-stored values between program startup // and program termination. (static, no const) // The string pointed to by argv[0] represents the program name; // argv[0][0] shall be the null character if the program name is not // available from the host environment. argv[argc] shall be a null pointer. // (static, no const)