Skip to content

Commit f297a9d

Browse files
committed
Merge branch 'feature/add-picolibc-support' into 'master'
Add picolibc support Closes IDF-11319 See merge request espressif/esp-idf!33601
2 parents a8c822f + 5282a99 commit f297a9d

File tree

193 files changed

+8629
-1450
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+8629
-1450
lines changed

.codespellrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[codespell]
2-
skip = build,*.yuv,components/fatfs/src/*,alice.txt,*.rgb,components/wpa_supplicant/*,components/esp_wifi/*,*.pem
2+
skip = build,*.yuv,components/fatfs/src/*,alice.txt,*.rgb,components/wpa_supplicant/*,components/esp_wifi/*,*.pem,components/newlib/COPYING.*
33
ignore-words-list = ser,dout,rsource,fram,inout,shs,ans,aci,unstall,unstalling,hart,wheight,wel,ot,fane,assertIn,registr,oen,parms
44
write-changes = true

.pre-commit-config.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ repos:
1414
# 2 - any file matching *test*/*expected* (for host tests, if possible use this naming pattern always)
1515
# 3 - any directory named 'testdata'
1616
# 4 - protobuf auto-generated files
17+
# 5 - COPYING files
1718
exclude: &whitespace_excludes |
1819
(?x)^(
1920
.+\.(md|rst|map|bin)|
@@ -23,7 +24,8 @@ repos:
2324
.*.pb-c.h|
2425
.*.pb-c.c|
2526
.*.yuv|
26-
.*.rgb
27+
.*.rgb|
28+
.*COPYING.*
2729
)$
2830
- id: end-of-file-fixer
2931
exclude: *whitespace_excludes

Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,3 +696,4 @@ mainmenu "Espressif IoT Development Framework Configuration"
696696
- CONFIG_ESP_WIFI_ENABLE_ROAMING_APP
697697
- CONFIG_USB_HOST_EXT_PORT_SUPPORT_LS
698698
- CONFIG_USB_HOST_EXT_PORT_RESET_ATTEMPTS
699+
- CONFIG_LIBC_PICOLIBC

components/bootloader/subproject/main/bootloader_start.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,10 @@ static int selected_boot_partition(const bootloader_state_t *bs)
134134
return boot_index;
135135
}
136136

137+
#if CONFIG_LIBC_NEWLIB
137138
// Return global reent struct if any newlib functions are linked to bootloader
138139
struct _reent *__getreent(void)
139140
{
140141
return _GLOBAL_REENT;
141142
}
143+
#endif

components/bt/common/osi/include/osi/hash_map.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#define _HASH_MAP_H_
2121

2222
#include <stdbool.h>
23+
#include <stddef.h>
2324
#include <stdint.h>
2425

2526
struct hash_map_t;

components/console/linenoise/linenoise.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@
112112
// On Linux, we don't need __fbufsize (see comments below), and
113113
// __fbufsize not available on MacOS (which is also considered "Linux" target)
114114
#include <stdio_ext.h> // for __fbufsize
115-
#endif
115+
#endif // !CONFIG_IDF_TARGET_LINUX
116+
#include <stddef.h>
116117
#include <errno.h>
117118
#include <string.h>
118119
#include <stdlib.h>
@@ -226,10 +227,15 @@ static void flushWrite(void) {
226227
// Performance on Linux is not considered as critical as on chip targets. Additionally,
227228
// MacOS does not have __fbufsize.
228229
#if !CONFIG_IDF_TARGET_LINUX
229-
if (__fbufsize(stdout) > 0) {
230+
#if CONFIG_LIBC_PICOLIBC
231+
if (((struct __file_bufio *)(stdout))->len > 0)
232+
#else // CONFIG_LIBC_PICOLIBC
233+
if (__fbufsize(stdout) > 0)
234+
#endif // CONFIG_LIBC_PICOLIBC
235+
{
230236
fflush(stdout);
231237
}
232-
#endif
238+
#endif // !CONFIG_IDF_TARGET_LINUX
233239
fsync(fileno(stdout));
234240
}
235241

components/driver/deprecated/mcpwm_legacy.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66

77
#include "sdkconfig.h"
8+
#include <sys/lock.h>
89
#include "freertos/FreeRTOS.h"
910
#include "freertos/task.h"
1011
#include "esp_log.h"

components/driver/test_apps/twai/main/test_app_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "unity.h"
88
#include "unity_test_utils.h"
99
#include "esp_heap_caps.h"
10+
#include "esp_newlib.h"
1011

1112
// Some resources are lazy allocated in the TWAI driver, the threshold is left for that case
1213
#define TEST_MEMORY_LEAK_THRESHOLD (200)

components/esp-tls/test_apps/main/app_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#else
1818
#include "sha/sha_block.h"
1919
#endif
20+
#include "esp_newlib.h"
2021

2122
#if SOC_SHA_SUPPORT_SHA512
2223
#define SHA_TYPE SHA2_512

components/esp_driver_cam/dvp/src/esp_cam_ctlr_dvp_cam.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7+
#include <sys/lock.h>
78
#include <sys/param.h>
89
#include "hal/gpio_ll.h"
910
#include "hal/cam_ll.h"

0 commit comments

Comments
 (0)