mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-01 17:40:57 +02:00
change(esp_libc): rename newlib component to esp_libc
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
[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
|
||||
write-changes = true
|
||||
|
@@ -103,6 +103,7 @@
|
||||
/components/esp_hw_support/lowpower/ @esp-idf-codeowners/power-management
|
||||
/components/esp_hw_support/usb_phy/ @esp-idf-codeowners/peripherals/usb
|
||||
/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_mm/ @esp-idf-codeowners/peripherals
|
||||
/components/esp_netif/ @esp-idf-codeowners/network
|
||||
@@ -140,7 +141,6 @@
|
||||
/components/lwip/ @esp-idf-codeowners/lwip
|
||||
/components/mbedtls/ @esp-idf-codeowners/app-utilities/mbedtls @esp-idf-codeowners/security
|
||||
/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_sec_provider/ @esp-idf-codeowners/storage @esp-idf-codeowners/security
|
||||
/components/openthread/ @esp-idf-codeowners/ieee802154
|
||||
|
@@ -48,7 +48,7 @@ deactivate_dependency_driven_build_by_components = [
|
||||
'hal',
|
||||
'heap',
|
||||
'log',
|
||||
'newlib',
|
||||
'esp_libc',
|
||||
'riscv',
|
||||
'soc',
|
||||
'xtensa',
|
||||
|
@@ -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 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
|
||||
|
||||
@@ -40,7 +40,7 @@ Example:
|
||||
|
||||
#### `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:
|
||||
|
||||
@@ -85,7 +85,7 @@ Logging library.
|
||||
|
||||
Heap implementation.
|
||||
|
||||
#### `newlib`
|
||||
#### `esp_libc`
|
||||
|
||||
Some functions n the standard library are implemented here, especially those needing other `G1` components.
|
||||
|
||||
|
@@ -31,8 +31,7 @@ set(COMPONENTS
|
||||
micro-ecc
|
||||
main
|
||||
efuse
|
||||
esp_system
|
||||
newlib
|
||||
esp_libc
|
||||
esp_tee)
|
||||
|
||||
# EXTRA_COMPONENT_DIRS can be populated with directories containing one or several components.
|
||||
@@ -61,7 +60,7 @@ endforeach()
|
||||
set(BOOTLOADER_BUILD 1)
|
||||
set(NON_OS_BUILD 1)
|
||||
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(__COMPONENT_REQUIRES_COMMON "${common_req}")
|
||||
idf_build_set_property(__OUTPUT_SDKCONFIG 0)
|
||||
|
@@ -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++
|
||||
# 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.
|
||||
# Also force libnewlib to appear later than libstdc++ in link line since libstdc++ depends on
|
||||
# some functions in libnewlib, e.g. getentropy().
|
||||
# Also force esp_libc to appear later than libstdc++ in link line since libstdc++ depends on
|
||||
# some functions in esp_libc, e.g. getentropy().
|
||||
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")
|
||||
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()
|
||||
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()
|
||||
|
||||
|
@@ -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;
|
||||
esp_line_endings_t tx_mode = s_ctx[fd]->tx_mode;
|
||||
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
|
||||
* same UART.
|
||||
*/
|
||||
|
@@ -68,7 +68,7 @@ else()
|
||||
endif()
|
||||
|
||||
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)
|
||||
list(APPEND ldfragments src/libc.lf)
|
||||
@@ -84,8 +84,8 @@ idf_component_register(SRCS "${srcs}"
|
||||
LDFRAGMENTS "${ldfragments}")
|
||||
|
||||
# Toolchain libraries require code defined in this component
|
||||
idf_component_get_property(newlib newlib COMPONENT_LIB)
|
||||
target_link_libraries(${COMPONENT_LIB} INTERFACE c m ${CONFIG_COMPILER_RT_LIB_NAME} "$<TARGET_FILE:${newlib}>")
|
||||
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:${esp_libc}>")
|
||||
|
||||
set_source_files_properties(heap.c PROPERTIES COMPILE_FLAGS -fno-builtin)
|
||||
|
@@ -1,5 +1,5 @@
|
||||
name: 'newlib'
|
||||
version: '4.3.0'
|
||||
version: '4.5.0'
|
||||
cpe: cpe:2.3:a:newlib_project:newlib:{}:*:*:*:*:*:*:*
|
||||
supplier: 'Organization: Espressif Systems (Shanghai) CO LTD'
|
||||
originator: 'Organization: Red Hat Incorporated'
|
@@ -1,5 +1,5 @@
|
||||
[mapping:newlib]
|
||||
archive: libnewlib.a
|
||||
[mapping:esp_libc]
|
||||
archive: libesp_libc.a
|
||||
entries:
|
||||
if LIBC_OPTIMIZED_MISALIGNED_ACCESS = y:
|
||||
memcpy (noflash)
|
@@ -1,3 +1,3 @@
|
||||
# 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
Reference in New Issue
Block a user