You copied the Doc URL to your clipboard.

Environment

Describes implementation-defined aspects of the Arm® C compiler and C library relating to environment, as required by the ISO C standard.

The mapping between physical source file multibyte characters and the source character set in translation phase 1 (5.1.1.2).
The compiler interprets the physical source file multibyte characters as UTF-8.
The name and type of the function called at program startup in a freestanding environment (5.1.2.1).
When linking with microlib, the function main() must be declared to take no arguments and must not return.
The effect of program termination in a freestanding environment (5.1.2.1).
The function exit() is not supported by microlib and the function main() must not return.
An alternative manner in which the main function can be defined (5.1.2.2.1).

The main function can be defined in one of the following forms:

int main(void)
int main()
int main(int)
int main(int, char **)
int main(int,char **, char **)
The values given to the strings pointed to by the argv argument to main (5.1.2.2.1).
In the generic Arm library the arguments given to main() are the words of the command line not including input/output redirections, delimited by whitespace, except where the whitespace is contained in double quotes.
What constitutes an interactive device (5.1.2.3).
What constitutes an interactive device depends on the environment and the _sys_istty function. The standard I/O streams stdin, stdout, and stderr are assumed to be interactive devices. They are line-buffered at program startup, regardless of what _sys_istty reports for them. An exception is if they have been redirected on the command line.
Whether a program can have more than one thread of execution in a freestanding environment (5.1.2.4).
Depends on the environment. The microlib C library is not thread-safe.
The set of signals, their semantics, and their default handling (7.14).

The <signal.h> header defines the following signals:

Signal Value Semantics
SIGABRT 1 Abnormal termination
SIGFPE 2 Arithmetic exception
SIGILL 3 Illegal instruction execution
SIGINT 4 Interactive attention signal
SIGSEGV 5 Bad memory access
SIGTERM 6 Termination request
SIGSTAK 7 Stack overflow (obsolete)
SIGRTRED 8 Run-time redirection error
SIGRTMEM 9 Run-time memory error
SIGUSR1 10 Available for the user
SIGUSR2 11 Available for the user
SIGPVFN 12 Pure virtual function called
SIGCPPL 13 Not normally used
SIGOUTOFHEAP 14 ::operator new or ::operator new[] cannot allocate memory

The default handling of all recognized signals is to print a diagnostic message and call exit().

Signal values other than SIGFPE, SIGILL, and SIGSEGV that correspond to a computational exception (7.14.1.1).
No signal values other than SIGFPE, SIGILL, and SIGSEGV correspond to a computational exception.
Signals for which the equivalent of signal(sig, SIG_IGN); is executed at program startup (7.14.1.1).
No signals are ignored at program startup.
The set of environment names and the method for altering the environment list used by the getenv function (7.22.4.6).
The default implementation returns NULL, indicating that no environment information is available.
The manner of execution of the string by the system function (7.22.4.8).
Depends on the environment. The default implementation of the function uses semihosting.
Was this page helpful? Yes No