change(esp_libc): rename newlib component to esp_libc

This commit is contained in:
Alexey Lapshin
2025-08-28 11:56:31 +07:00
committed by BOT
parent aae5071dff
commit 9281e78381
149 changed files with 127 additions and 122 deletions

View File

@@ -1,4 +1,4 @@
[codespell] [codespell]
skip = build,*.yuv,components/fatfs/src/*,alice.txt,*.rgb,components/wpa_supplicant/*,components/esp_wifi/*,*.pem,components/newlib/COPYING.*,docs/sphinx-known-warnings.txt skip = build,*.yuv,components/fatfs/src/*,alice.txt,*.rgb,components/wpa_supplicant/*,components/esp_wifi/*,*.pem,*/COPYING*,docs/sphinx-known-warnings.txt
ignore-words-list = ser,dout,rsource,fram,inout,shs,ans,aci,unstall,unstalling,hart,wheight,wel,ot,fane,assertIn,registr,oen,parms ignore-words-list = ser,dout,rsource,fram,inout,shs,ans,aci,unstall,unstalling,hart,wheight,wel,ot,fane,assertIn,registr,oen,parms
write-changes = true write-changes = true

View File

@@ -103,6 +103,7 @@
/components/esp_hw_support/lowpower/ @esp-idf-codeowners/power-management /components/esp_hw_support/lowpower/ @esp-idf-codeowners/power-management
/components/esp_hw_support/usb_phy/ @esp-idf-codeowners/peripherals/usb /components/esp_hw_support/usb_phy/ @esp-idf-codeowners/peripherals/usb
/components/esp_lcd/ @esp-idf-codeowners/peripherals /components/esp_lcd/ @esp-idf-codeowners/peripherals
/components/esp_libc/ @esp-idf-codeowners/system @esp-idf-codeowners/toolchain
/components/esp_local_ctrl/ @esp-idf-codeowners/app-utilities /components/esp_local_ctrl/ @esp-idf-codeowners/app-utilities
/components/esp_mm/ @esp-idf-codeowners/peripherals /components/esp_mm/ @esp-idf-codeowners/peripherals
/components/esp_netif/ @esp-idf-codeowners/network /components/esp_netif/ @esp-idf-codeowners/network
@@ -140,7 +141,6 @@
/components/lwip/ @esp-idf-codeowners/lwip /components/lwip/ @esp-idf-codeowners/lwip
/components/mbedtls/ @esp-idf-codeowners/app-utilities/mbedtls @esp-idf-codeowners/security /components/mbedtls/ @esp-idf-codeowners/app-utilities/mbedtls @esp-idf-codeowners/security
/components/mqtt/ @esp-idf-codeowners/network /components/mqtt/ @esp-idf-codeowners/network
/components/newlib/ @esp-idf-codeowners/system @esp-idf-codeowners/toolchain
/components/nvs_flash/ @esp-idf-codeowners/storage /components/nvs_flash/ @esp-idf-codeowners/storage
/components/nvs_sec_provider/ @esp-idf-codeowners/storage @esp-idf-codeowners/security /components/nvs_sec_provider/ @esp-idf-codeowners/storage @esp-idf-codeowners/security
/components/openthread/ @esp-idf-codeowners/ieee802154 /components/openthread/ @esp-idf-codeowners/ieee802154

View File

@@ -48,7 +48,7 @@ deactivate_dependency_driven_build_by_components = [
'hal', 'hal',
'heap', 'heap',
'log', 'log',
'newlib', 'esp_libc',
'riscv', 'riscv',
'soc', 'soc',
'xtensa', 'xtensa',

View File

@@ -10,7 +10,7 @@ The core components are organized into two groups.
The first group (referred to as `G0`) includes `hal`, `arch` (where `arch` is either `riscv` or `xtensa` depending on the chip), `esp_rom`, `esp_common`, and `soc`. This group contains information about and provides low-level access to the underlying hardware. In the case of `esp_common`, it contains hardware-agnostic code and utilities. These components may have dependencies on each other within the group, but outside dependencies should be minimized. The reason for this approach is that these components are fundamental, and many other components may require them. Ideally, the dependency relationship only goes one way, making it easier for this group to be usable in other projects. The first group (referred to as `G0`) includes `hal`, `arch` (where `arch` is either `riscv` or `xtensa` depending on the chip), `esp_rom`, `esp_common`, and `soc`. This group contains information about and provides low-level access to the underlying hardware. In the case of `esp_common`, it contains hardware-agnostic code and utilities. These components may have dependencies on each other within the group, but outside dependencies should be minimized. The reason for this approach is that these components are fundamental, and many other components may require them. Ideally, the dependency relationship only goes one way, making it easier for this group to be usable in other projects.
The second group (referred to as `G1`) operates at a higher level than the first group. `G1` includes the components `esp_hw_support`, `esp_system`, `newlib`, `spi_flash`, `freertos`, `log`, and `heap`. Like the first group, circular dependencies within this group are allowed, and these components can have dependencies on the first group. G1 components represent essential software mechanisms for building other components. The second group (referred to as `G1`) operates at a higher level than the first group. `G1` includes the components `esp_hw_support`, `esp_system`, `esp_libc`, `spi_flash`, `freertos`, `log`, and `heap`. Like the first group, circular dependencies within this group are allowed, and these components can have dependencies on the first group. G1 components represent essential software mechanisms for building other components.
## Descriptions ## Descriptions
@@ -40,7 +40,7 @@ Example:
#### `esp_common` #### `esp_common`
Contains hardware-agnostic definitions, constants, macros, utilities, 'pure' and/or algorithmic functions that is useable by all other components (that is, barring there being a more appropriate component to put them in). Contains hardware-agnostic definitions, constants, macros, utilities, 'pure' and/or algorithmic functions that is usable by all other components (that is, barring there being a more appropriate component to put them in).
Example: Example:
@@ -85,7 +85,7 @@ Logging library.
Heap implementation. Heap implementation.
#### `newlib` #### `esp_libc`
Some functions n the standard library are implemented here, especially those needing other `G1` components. Some functions n the standard library are implemented here, especially those needing other `G1` components.

View File

@@ -31,8 +31,7 @@ set(COMPONENTS
micro-ecc micro-ecc
main main
efuse efuse
esp_system esp_libc
newlib
esp_tee) esp_tee)
# EXTRA_COMPONENT_DIRS can be populated with directories containing one or several components. # EXTRA_COMPONENT_DIRS can be populated with directories containing one or several components.
@@ -61,7 +60,7 @@ endforeach()
set(BOOTLOADER_BUILD 1) set(BOOTLOADER_BUILD 1)
set(NON_OS_BUILD 1) set(NON_OS_BUILD 1)
include("${IDF_PATH}/tools/cmake/project.cmake") include("${IDF_PATH}/tools/cmake/project.cmake")
set(common_req log esp_rom esp_common esp_hw_support newlib) set(common_req log esp_rom esp_common esp_hw_support esp_libc)
idf_build_set_property(EXTRA_COMPONENT_EXCLUDE_DIRS "${EXTRA_COMPONENT_EXCLUDE_DIRS}") idf_build_set_property(EXTRA_COMPONENT_EXCLUDE_DIRS "${EXTRA_COMPONENT_EXCLUDE_DIRS}")
idf_build_set_property(__COMPONENT_REQUIRES_COMMON "${common_req}") idf_build_set_property(__COMPONENT_REQUIRES_COMMON "${common_req}")
idf_build_set_property(__OUTPUT_SDKCONFIG 0) idf_build_set_property(__OUTPUT_SDKCONFIG 0)

View File

@@ -74,15 +74,15 @@ if(NOT esp_tee_build)
# Furthermore, force libcxx to appear later than libgcc because some libgcc unwind code is wrapped, if C++ # Furthermore, force libcxx to appear later than libgcc because some libgcc unwind code is wrapped, if C++
# exceptions are disabled. libcxx (this component) provides the unwind code wrappers. # exceptions are disabled. libcxx (this component) provides the unwind code wrappers.
# This is to prevent linking of libgcc's unwind code which considerably increases the binary size. # This is to prevent linking of libgcc's unwind code which considerably increases the binary size.
# Also force libnewlib to appear later than libstdc++ in link line since libstdc++ depends on # Also force esp_libc to appear later than libstdc++ in link line since libstdc++ depends on
# some functions in libnewlib, e.g. getentropy(). # some functions in esp_libc, e.g. getentropy().
idf_component_get_property(pthread pthread COMPONENT_LIB) idf_component_get_property(pthread pthread COMPONENT_LIB)
idf_component_get_property(newlib newlib COMPONENT_LIB) idf_component_get_property(esp_libc esp_libc COMPONENT_LIB)
if(CMAKE_C_COMPILER_ID MATCHES "Clang") if(CMAKE_C_COMPILER_ID MATCHES "Clang")
target_link_libraries(stdcpp_deps INTERFACE stdc++ c $<TARGET_FILE:${pthread}> $<TARGET_FILE:${newlib}>) target_link_libraries(stdcpp_deps INTERFACE stdc++ c $<TARGET_FILE:${pthread}> $<TARGET_FILE:${esp_libc}>)
else() else()
target_link_libraries(stdcpp_deps INTERFACE stdc++ $<TARGET_FILE:${pthread}> $<TARGET_FILE:${newlib}>) target_link_libraries(stdcpp_deps INTERFACE stdc++ $<TARGET_FILE:${pthread}> $<TARGET_FILE:${esp_libc}>)
endif() endif()
endif() endif()

View File

@@ -229,7 +229,7 @@ static ssize_t uart_write(int fd, const void * data, size_t size)
tx_func_t tx_func = s_ctx[fd]->tx_func; tx_func_t tx_func = s_ctx[fd]->tx_func;
esp_line_endings_t tx_mode = s_ctx[fd]->tx_mode; esp_line_endings_t tx_mode = s_ctx[fd]->tx_mode;
const char *data_c = (const char *)data; const char *data_c = (const char *)data;
/* Even though newlib does stream locking on each individual stream, we need /* Even though libc does stream locking on each individual stream, we need
* a dedicated UART lock if two streams (stdout and stderr) point to the * a dedicated UART lock if two streams (stdout and stderr) point to the
* same UART. * same UART.
*/ */

View File

@@ -68,7 +68,7 @@ else()
endif() endif()
set(ldfragments "") set(ldfragments "")
list(APPEND ldfragments "src/newlib.lf" "src/system_libs.lf") list(APPEND ldfragments "src/esp_libc.lf" "src/system_libs.lf")
if(CONFIG_LIBC_NEWLIB) if(CONFIG_LIBC_NEWLIB)
list(APPEND ldfragments src/libc.lf) list(APPEND ldfragments src/libc.lf)
@@ -84,8 +84,8 @@ idf_component_register(SRCS "${srcs}"
LDFRAGMENTS "${ldfragments}") LDFRAGMENTS "${ldfragments}")
# Toolchain libraries require code defined in this component # Toolchain libraries require code defined in this component
idf_component_get_property(newlib newlib COMPONENT_LIB) idf_component_get_property(esp_libc esp_libc COMPONENT_LIB)
target_link_libraries(${COMPONENT_LIB} INTERFACE c m ${CONFIG_COMPILER_RT_LIB_NAME} "$<TARGET_FILE:${newlib}>") target_link_libraries(${COMPONENT_LIB} INTERFACE c m ${CONFIG_COMPILER_RT_LIB_NAME} "$<TARGET_FILE:${esp_libc}>")
set_source_files_properties(heap.c PROPERTIES COMPILE_FLAGS -fno-builtin) set_source_files_properties(heap.c PROPERTIES COMPILE_FLAGS -fno-builtin)

View File

@@ -1,5 +1,5 @@
name: 'newlib' name: 'newlib'
version: '4.3.0' version: '4.5.0'
cpe: cpe:2.3:a:newlib_project:newlib:{}:*:*:*:*:*:*:* cpe: cpe:2.3:a:newlib_project:newlib:{}:*:*:*:*:*:*:*
supplier: 'Organization: Espressif Systems (Shanghai) CO LTD' supplier: 'Organization: Espressif Systems (Shanghai) CO LTD'
originator: 'Organization: Red Hat Incorporated' originator: 'Organization: Red Hat Incorporated'

View File

@@ -1,5 +1,5 @@
[mapping:newlib] [mapping:esp_libc]
archive: libnewlib.a archive: libesp_libc.a
entries: entries:
if LIBC_OPTIMIZED_MISALIGNED_ACCESS = y: if LIBC_OPTIMIZED_MISALIGNED_ACCESS = y:
memcpy (noflash) memcpy (noflash)

View File

@@ -1,3 +1,3 @@
# Documentation: .gitlab/ci/README.md#manifest-file-to-control-the-buildtest-apps # Documentation: .gitlab/ci/README.md#manifest-file-to-control-the-buildtest-apps
components/newlib/test_apps/newlib: components/esp_libc/test_apps/newlib:

Some files were not shown because too many files have changed in this diff Show More