Currently, the new line ending conversion options for stdin and stdout
are specifically described for UART, which is inaccurate since the
console could be connected to USB serial/CDC or have secondary output.
Use a generic console term instead of UART.
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
The configuration of newline endings for stdout and stdin is supported
only by the VFS drivers. The write and read syscalls in newlib
automatically convert LF to CRLF for stdout and CR to LF for stdin,
ignoring the configured newline settings. Therefore, make the options
for newline endings visible only when VFS is enabled.
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
Currently, the newline conversions for the NEWLIB_STDOUT_LINE_ENDING and
NEWLIB_STDIN_LINE_ENDING options are only applied by VFS drivers.
Without VFS, newline conversion does not occur. Introduce the default
conversion of LF to CRLF on stdout and CF to LF on stdin for the default
read and write syscalls in newlib.
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
feat(newlib): add option to disable eval of expression in assert() when NDEBUG set
Closes IDFGH-479 and IDFGH-8692
See merge request espressif/esp-idf!32887
According to the standard assert(X) should be replaced by a void expression when
NDEBUG is set. IDF's behavior was to not trigger an assertion, but we would still
evaluate X, e.g. if X was a function it would be ran.
This MR adds a kconfig option CONFIG_COMPILER_ASSERT_NDEBUG_EVALUATE which allows us
revert the behavior to be inline with the standard.
With IDF v6.0 the plan is to make CONFIG_COMPILER_ASSERT_NDEBUG_EVALUATE=n the default
behavior.
Closes https://github.com/espressif/esp-idf/issues/10136
Closes https://github.com/espressif/esp-idf/issues/2758
Add the definition of aligned_alloc to the list of
definitions provided by heap.c.
Note that memalign (strictly equivalent) to aligned_alloc
is already defined in heap.c.
This commit replaces the use of portNUM_PROCESSORS and configNUM_CORES
macros in all of ESP-IDF. These macros are needed to realize an SMP
scenario by fetching the number of active cores FreeRTOS is running on.
Instead, a new Kconfig option, CONFIG_FREERTOS_NUMBER_OF_CORES, has been
added as a proxy for the FreeRTOS config option, configNUMBER_OF_CORES.
This new commit is now used to realize an SMP scenario in various places
in ESP-IDF.
[Sudeep Mohanty: Added new Kconfig option CONFIG_FREERTOS_NUMBER_OF_CORES]
Signed-off-by: Sudeep Mohanty <sudeep.mohanty@espressif.com>