The following changes are made in this commit:
1. This commit updates the implementation of usleep() to now always yield
CPU time if undergoing a multi-tick sleep. This reduces the accuracy of
usleep() but in turn allows the scheduler to schedule different tasks.
2. The commit also updates the MCPWM unit test which fails due to the
change in the behavior of usleep().
Closes: https://github.com/espressif/esp-idf/pull/15132
This commit updates usleep() to always sleep for the required sleep
period or more. This fixes a bug where the usleep() could sleep for less
than the request sleep period.
Closes https://github.com/espressif/esp-idf/pull/15132
This option replaces implementations of functions from ROM:
- memcpy
- memcmp
- memmove
- str[n]cpy
- str[n]cmp
The functions used in the firmware will be better optimized for misaligned
memory. Here are some measurements in CPU cycles for 4096-byte buffers:
memcpy: 28676 -> 4128
memcmp: 49147 -> 14259
memmove: 33896 -> 8086
strcpy: 32771 -> 17313
strcmp: 32775 -> 13191
fix(heap): fixed CONFIG_HEAP_PLACE_FUNCTION_INTO_FLASH not working together with CONFIG_HEAP_TLSF_USE_ROM_IMPL
See merge request espressif/esp-idf!37692
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