zephyr/lib/libc/armstdc/src/errno.c
Torsten Rasmussen 36bb00d1f5 armclang: ARM Compiler C library support
Support for ARM Compiler C library.

This commit add support for the ARM Compiler C libary in:
- Kconfig
- libc/armstdc

A new Kconfig symbol is added to allow a toolchain to specify if they
support linking with the minimal C library.
Also the CMake variable `TOOLCHAIN_HAS_NEWLIB` is exported to Kconfig
so that CONFIG_NEWLIB_LIBS can only be enabled if the toolchain has
newlib.

The armclang toolchain selects the CMake scatter file generator and
disables support for the LD linker template which is not supported by
armlink.

For the ARM Compiler C library, a corresponding lib/libc/armstc/ folder
with a minimal implementation to work with the ARM Compiler C library
is added.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-08-30 08:54:23 -04:00

28 lines
786 B
C

/*
* Copyright (c) 2021 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @brief System error numbers
* Error codes returned by functions.
* Includes a list of those defined by IEEE Std 1003.1-2017.
*
* This file is supposed to be used together with ARMClang and
* #define _AEABI_PORTABILITY_LEVEL 1
* or
* -D_AEABI_PORTABILITY_LEVEL=1
*
* For details, please refer to the document:
* 'C Library ABI for the Arm® Architecture, 2021Q1'
*
* @defgroup system_errno Error numbers
* @ingroup c_std_lib
* @{
*/
const int __aeabi_EDOM = 33; /**< Argument too large */
const int __aeabi_ERANGE = 34; /**< Result too large */
const int __aeabi_EILSEQ = 138; /**< Illegal byte sequence */