CYGPKG_LIBC_STARTUP
Dummy
This component manages the control of the environment (in the general sense) that the C library provides for use for full ISO C compatibility, including a main() entry point supplied with arguments and an environment (as retrievable by the getenv() function). It also includes at the other end of things, what happens when main() returns or exit() is called.
CYGDAT_LIBC_ARGUMENTS
String
This option allows the setting of the arguments to the main function. This only has any effect when cyg_iso_c_start() is used to start the ISO C compatibility. This will automatically invoke main() in an ISO C compatible fashion. This option is in fact used as argv, and so is an n-tuple of string constants. The final entry must be NULL. Conventionally if argv[0] is supplied, it is used to inform the program of its name.
CYGSEM_LIBC_STARTUP_MAIN_THREAD
Boolean
It is normally expected (e.g. in a POSIX 1003.1 environment) that main() is run in the context of a thread just like any other thread. If this option is disabled then main() will instead be called in the context of the initialization routines, without the scheduler running and using the interrupt stack. This means that any functions that may require interactions with a running kernel will not work (including libc functions, if configured to be thread safe for example), so you should restrict yourself to only calling fully re-entrant functions from within main() in this case.
CYGNUM_LIBC_MAIN_STACK_SIZE
Count
With an eCos kernel, when the cyg_iso_c_start() function is used to invoke the user-supplied main() function in an ISO C compatible fashion, a separate thread is created to call main(). This option controls the size of that thread"s stack, which is allocated in the BSS. It must be a multiple of 8. Note, a low number here may be overridden by the HAL if there is a minimum requirement to process interrupts etc.
CYGFUN_LIBC_ATEXIT
Boolean
This option enables the use of the atexit() function, and ensure that the atexit handlers are invoked from within exit() as defined in the ISO C standard.
CYGNUM_LIBC_ATEXIT_HANDLERS
Count
This option sets the number of functions that atexit() has room for. In other words, the number of separate atexit() calls that can be made before calling exit() or returning from main() ( in an environment controlled by cyg_iso_c_start() ). For strict compliance with the ISO C standard this should be at least 32.
CYGSEM_LIBC_EXIT_CALLS_FFLUSH
Boolean
This option will ensure that all output streams are flushed when exiting using exit() as prescribed by the ISO C standard.
CYGSEM_LIBC_EXIT_STOPS_SYSTEM
Boolean
If this option is enabled then _exit(), which is called from exit() which itself is called on return from main(), stops the eCos scheduler. For strict POSIX 1003.1 compatibility this would be the normal behavior. To allow the thread to simply exit, without affecting other threads, simply disable this option. If there is no eCos scheduler, then _exit() simply loops irrespective of the setting of this option.
CYGPKG_LIBC_ENVIRONMENT
Boolean
This option allows use of the getenv() function and the global environment pointer char **environ defined by POSIX 1003.1. Disabling this saves a small amount of space.
CYGDAT_LIBC_DEFAULT_ENVIRONMENT
String
This option allows the setting of the default contents of the environment. This is in fact the contents of the global environment pointer char **environ defined by POSIX 1003.1. Strings must be of the form NAME=VALUE, and the final entry must be NULL.
CYGSEM_LIBC_INVOKE_DEFAULT_STATIC_CONSTRUCTORS
Boolean
This option causes the C library to call static constructors with default priority from within the context of the main() thread, working with the co-operation of the HAL. This may be needed for environments that expect static constructors to be run in a thread context. Note that this uses an object with priority 65534. Therefore do not use priority 65534 for any other static objects with this option enabled.