Commit Graph

351 Commits

Author SHA1 Message Date
Martin Vychodil
c9c7573f71 Storage: Partition APIs moved to the new component 'esp_partition'
All the partition handling API functions and data-types were moved from the 'spi_flash' component to the new one named 'esp_partition'. See Storage 5.x migration guide for more details
2022-11-02 21:54:45 +01:00
Song Ruo Jing
2557e24a28 ci: Enable esp32c6 example, test_apps, and unit tests CI build stage 2022-11-01 11:23:21 +08:00
wuzhenghui
62f9ddcb82 esp32c6: add newlib support 2022-09-26 20:32:13 +08:00
Ivan Grokhotkov
512b59f388 Merge branch 'test/newlib_blksize' into 'master'
newlib: add test for st_blksize and FILE buffer size

See merge request espressif/esp-idf!19366
2022-08-16 23:02:59 +08:00
Ivan Grokhotkov
401c10ecfb build system: re-add -Wno-format as private flag for some components 2022-08-03 16:42:47 +04:00
Ivan Grokhotkov
cd70631f13
newlib: add test for st_blksize and FILE buffer size
Inspired by https://github.com/joltwallet/esp_littlefs/pull/91/files#r935872478
2022-08-02 20:42:45 +02:00
Guillaume Souchere
6005cc9163 hal: Deprecate interrupt_controller_hal.h, cpu_hal.h and cpu_ll.h interfaces
This commit marks all functions in interrupt_controller_hal.h, cpu_ll.h and cpu_hal.h as deprecated.
Users should use functions from esp_cpu.h instead.
2022-07-22 00:06:06 +08:00
Armando (Dou Yiwen)
9f6f61345b Merge branch 'feature/adc_driver_ng' into 'master'
ADC Driver NG

Closes IDF-4560, IDF-3908, IDF-4225, IDF-2482, IDF-4111, IDF-3610, IDF-4058, IDF-3801, IDF-3636, IDF-2537, IDF-4310, IDF-5150, IDF-5151, and IDF-4979

See merge request espressif/esp-idf!17960
2022-07-19 21:28:31 +08:00
Armando
5b523a3313 esp_adc: new esp_adc component and adc drivers 2022-07-15 18:31:00 +08:00
David Čermák
1a7dfa42e6 Merge branch 'bugfix/cpp_include_fix_newlib_net_if_h' into 'master'
Add C++ include guard to if.h (to fix linker errors in asio) (GitHub PR)

Closes IDFGH-7718

See merge request espressif/esp-idf!18850
2022-07-15 13:16:47 +08:00
David Cermak
adb79a4852 newlib: Fix header issues with C++ guards and implicit inclusion
* Added C++ sentinels if missed
* Used #pragma once, removed macro's with leading underscores
* Updated copyright checker to allow "BSD-2-Clause-FreeBSD AND
Apache-2.0" for newlib files
* Fixed minor compilation issues/implicit inclusions
2022-07-14 08:32:04 +02:00
0xFEEDC0DE64
48c5b45e99 Add C++ include guard to if.h (to fix linker errors in asio) 2022-07-14 07:48:58 +02:00
Fu Hanxi
c0568611dd docs: changes docs supported targets tables 2022-07-14 08:26:32 +08:00
Cao Sen Miao
a690a87829 spi_flash: Remove legacy spi_flash drivers 2022-07-01 11:01:34 +08:00
simon.chupin
45482bd1c0 components: Change copyright in components files 2022-06-17 16:59:56 +02:00
morris
6eb450fa87 newlib: ROM library is build with time_t 64bit on esp32c2 2022-06-09 10:48:31 +08:00
morris
aa3ddbc3c6 Merge branch 'test/enable_c2_target_tests' into 'master'
ci: enable target tests for ESP32-C2

Closes IDF-4989

See merge request espressif/esp-idf!18182
2022-06-03 16:41:24 +08:00
Anton Maklakov
bc932c646e Merge branch 'bugfix/dirent-definition' into 'master'
newlib: dirent d_ino type fix

See merge request espressif/esp-idf!18336
2022-06-02 19:48:53 +08:00
Michael (XIAO Xufeng)
6a8aed12ee ci: partially enable ut tests for esp32c2
Disabled test cases are tracked in:

 IDF-4465, IDF-5045, IDF-5057, IDF-5058, IDF-5059, IDF-5060, IDF-5061, IDF-5131

- test_fatfs: IDF-5136

- test_pm: IDF-5053

- test_cache_mmu: IDF-5138

- test_partitions: IDF-5137

- test_vfs: IDF-5139

- test_freertos: IDF-5140

- test_wpa_supplicant: IDF-5046

- test_mbedtls: IDF-5141

- test_pthread: IDF-5142

- test_protocomm: IDF-5143

- test_lightsleep: IDF-5053

- test_taskwdt: IDF-5055

- test_tcp_transport: IDF-5144

- test_app_update: IDF-5145

- test_timer: IDF-5052

- test_spi: IDF-5146

- test_rtc_clk: IDF-5060

- test_heap: IDF-5167

ci: fixed issues for tests of libgcc, ets_timer, newlib

test_pm: support on C2
2022-06-02 14:23:35 +08:00
Scott Mabin
c947585ee4 newlib: dirent d_ino type fix
As per the posix spec, `d_ino` should be defined as `ino_t`. See the
reference:
http://pubs.opengroup.org/onlinepubs/7908799/xsh/dirent.h.html.
2022-06-01 13:49:32 +01:00
Djordje Nedic
facab8c5a7 tools: Increase the minimal supported CMake version to 3.16
This updates the minimal supported version of CMake to 3.16, which in turn enables us to use more CMake features and have a cleaner build system.
This is the version that provides most new features and also the one we use in our latest docker image for CI.
2022-06-01 06:35:02 +00:00
Ivan Grokhotkov
0c10b937f5 Merge branch 'bugfix/freertos_smp_disable_interrupt_usage' into 'master'
FreeRTOS: Replace portSET_INTERRUPT_MASK_FROM_ISR() call for SMP

Closes IDF-5062 and IDF-5066

See merge request espressif/esp-idf!18301
2022-06-01 00:18:26 +08:00
Anton Maklakov
bf3892acee newlib: stdatomic: fix conflicting types for __atomic_load/__atomic_store 2022-05-30 14:48:12 +07:00
Darian Leung
daa950d9ed freertos: Replace portSET_INTERRUPT_MASK_FROM_ISR() call for SMP
The behavior of portSET_INTERRUPT_MASK_FROM_ISR() has changed in SMP FreeRTOS. It's
previous behavior is now implemented in portDISABLE_INTERRUPTS() and portRESTORE_INTERRUPTS().

This commit replaces all portSET_INTERRUPT_MASK_FROM_ISR() and portCLEAR_INTERRUPT_MASK_FROM_ISR()
calls with portDISABLE_INTERRUPTS() and portRESTORE_INTERRUPTS() respectively
2022-05-30 06:11:24 +08:00
jiangguangming
c7beae1d6a newlib: 64-bits time_t test pass
please keep in mind that don't use nano-foramt printf for 64-bits
2022-05-28 08:52:55 +00:00
jiangguangming
4302e28698 newlib: use newlib nano format default 2022-05-28 08:52:55 +00:00
Andrei Safronov
3d9814bf8b newlib: implement __atomic_load/__atomic_store functions 2022-05-11 17:00:14 +03:00
Ivan Grokhotkov
77b754b47f
newlib: fix return value of no-VFS _read_r if nothing received
'read' function should return 0 when encountering an end of file. When
newlib calls read and sees EOF returned, it assumes that this
condition is permanent and never calls 'read' for this file again
(unless the read pointer is moved using fseek).
The correct behavior in case no characters were received over UART is
to return -1. In this case newlib will retry reading from file on next
call to fread, fgetc or another function which calls __srefill_r.
2022-05-02 20:47:18 +02:00
Ivan Grokhotkov
47659be5b8
build system: remove lwip from common requirements
lwip was added to common requirements list to provide "sys/socket.h"
header to all components without additional requirements specified.

However, lwip pulls in a lot of dependencies on other components.
This commit removes lwip from common requirements to reduce the number
of components in G1-only apps.

To compensate for this removal, the following changes are made:
- newlib (which is a common requirement) has a public dependency on
  lwip if lwip is present in the build. This ensures that sys/socket.h
  is available as long as lwip component is included into the build.
- lwip is now a public requirement of esp-tls since esp_tls.h includes
  sys/socket.h header.
- lwip is now a public requirement o esp_http_client because
  sys/socket.h is included from esp_http_client.h
- lwip is now a private requirement of esp_wifi for "smartconfig_ack"
- lwip is now a private requirement of mqtt for socket functions
- lwip is now a public requirement of tcp_transport because
  esp_transport_tcp.h includes sys/socket.h header.
- mbedtls checks if lwip component is present in the build. If yes,
  net_sockets.c is added to the build, along with the dependency on
  lwip. Previously lwip was a public requirement of mbedtls
  unconditionally.

system/g1_components test app is updated to reflect the changes

Default public dependencies of a component before and after this
change, except common requirements:

- esp_timer (public dependency of freertos)
- bootloader_support (public dependency of esp_hw_support)
- vfs (public dependency of lwip)
- esp_wifi (public dependency of lwip)
- esp_event (public dependency of esp_wifi)
- esp_netif (public dependency of esp_event)
- esp_eth (public dependency of esp_netif)
- esp_phy (public dependency of esp_wifi)

After:

- esp_timer (public dependency of freertos)
- bootloader_support (public dependency of esp_hw_support)

Altogether, the following components have been always added as
public requirements to all other components, and are not added now
([breaking-change]):

- lwip
- vfs
- esp_wifi
- esp_event
- esp_netif
- esp_eth
- esp_phy

Application components now need to explicitly declare dependencies on
these components.
2022-05-02 20:47:17 +02:00
Ivan Grokhotkov
708e99497b
global: add dependency on esp_timer component and include esp_timer.h
Some components were including esp_timer.h without declaring a
dependency on esp_timer component. This used to work due to a
transitive public dependency on esp_timer from freertos component.
Add explicit dependencies where needed.
Also some source files were using esp_timer functions without
including the header file. This used to work because esp_timer.h was
included from freertos port header file. This commit adds esp_timer.h
includes where needed.
2022-04-25 18:39:23 +02:00
Marius Vikhammer
45c1d1cba2 Merge branch 'feature/move_target_kconfig_2' into 'master'
system: move kconfig options out of target component

See merge request espressif/esp-idf!17321
2022-04-24 13:29:43 +08:00
Marius Vikhammer
d2872095f9 soc: moved kconfig options out of the target component.
Moved the following kconfig options out of the target component:
 * CONFIG_ESP*_DEFAULT_CPU_FREQ* -> esp_system
 * ESP*_REV_MIN -> esp_hw_support
 * ESP*_TIME_SYSCALL -> newlib
 * ESP*_RTC_* -> esp_hw_support

Where applicable these target specific konfig names were merged into
a single common config, e.g;
CONFIG_ESP*_DEFAULT_CPU_FREQ -> CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ
2022-04-21 12:09:43 +08:00
Ivan Grokhotkov
71bab1078f
newlib: fix ESHUTDOWN and ENOTSOCK having the same numerical value 2022-04-18 12:10:30 +02:00
Anton Maklakov
6200d2328d Merge branch 'bugfix/printf-placeholder-for-time_t' into 'master'
components: correct printf() placeholder for time_t

See merge request espressif/esp-idf!17439
2022-03-17 16:08:08 +08:00
Ivan Grokhotkov
d1abdbae88 Merge branch 'bugfix/stdatomic_builtin-declaration-mismatch' into 'master'
newlib: stdatomic: fix builtin-declaration-mismatch

See merge request espressif/esp-idf!16954
2022-03-17 03:36:18 +08:00
Ivan Grokhotkov
4aa2719e13
spi_flash, newlib: fix NULL pointer dereference on OOM
https://pvs-studio.com/en/blog/posts/cpp/0790/#ID88049D3FA2
Reported in https://github.com/espressif/esp-idf/issues/6440
2022-03-14 18:16:42 +01:00
Anton Maklakov
e27f1331e4 components: correct printf() placeholder for time_t
Using C99 %jd, https://en.cppreference.com/w/c/chrono/time_t
2022-03-14 14:05:47 +07:00
Sudeep Mohanty
a9fda54d39 esp_hw_support/esp_system: Re-evaluate header inclusions and include directories
This commit updates the visibility of various header files and cleans up
some unnecessary inclusions. Also, this commit removes certain header
include paths which were maintained for backward compatibility.
2022-03-07 11:18:08 +05:30
Anton Maklakov
3ab9acddc1 newlib: stdatomic: fix conflicting types for atomic built-in functions
Also use `unsigned int`, `short unsigned int`,`long long unsigned int` etc types
instead of uintN_t. Because some platforms have uintN_t types that don't
conrrespont to built-in prototypes.
2022-03-02 16:22:45 +07:00
Marius Vikhammer
edb76f14d6 esp_timer: remove legacy ESP32 FRC timer implementation. 2022-02-10 15:17:49 +08:00
Darian Leung
57fd78f5ba freertos: Remove legacy data types
This commit removes the usage of all legacy FreeRTOS data types that
are exposed via configENABLE_BACKWARD_COMPATIBILITY. Legacy types can
still be used by enabling CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY.
2022-02-09 23:05:45 +08:00
Fu Hanxi
a801555299 ci: replace all component ut with pytest-embedded 2022-01-24 16:37:23 +08:00
laokaiyao
cf049e15ed esp8684: rename target to esp32c2 2022-01-19 11:08:57 +08:00
Ivan Grokhotkov
d2b894862c newlib: auto-detect sizeof(time_t)
To make the transition from 32-bit time_t to 64-bit time_t smoother,
detect the size of this type in CMake and remove the manual option in
Kconfig.
The information about 64-bit time_t support is moved from Kconfig help
string into the "system time" section of the API reference.
2022-01-11 19:01:21 +01:00
Sudeep Mohanty
e22b4007d3 esp_hw_support: Removed deprecated CPU util functions
The following files were deleted:
- components/esp_hw_support/include/soc/cpu.h
- components/soc/esp32s3/include/soc/cpu.h

The following functions are deprecated:
- get_sp()

The following functions declared in soc/cpu.h are now moved to esp_cpu.h:
- esp_cpu_configure_region_protection()

The following functions declared in soc/cpu.h are now moved to components/xtensa/include/esp_cpu_utils.h:
- esp_cpu_process_stack_pc()

All files with soc/cpu.h inclusion are updated to include esp_cpu.h instead.

Signed-off-by: Sudeep Mohanty <sudeep.mohanty@espressif.com>
2021-12-28 16:58:37 +05:30
Ivan Grokhotkov
01033a3a60 newlib: stdatomic: implement missing "op_fetch", "nand" builtins
* Adds implementations of __{atomic,sync}_nand_fetch_n. These builtins
  were implemented for other operations but were not defined for NAND.
* Adds implementation of __atomic_OP_fetch_n for all OPs.
* Adds implementation of __sync_OP_and_fetch_n for all OPs.

Reported in https://github.com/espressif/arduino-esp32/issues/5948
2021-12-14 16:06:12 +01:00
Ivan Grokhotkov
d83ce227aa newlib: implement posix_memalign, sysconf, realpath
Closes https://github.com/espressif/esp-idf/issues/6119
Closes https://github.com/espressif/esp-idf/issues/7798
2021-12-13 14:40:21 +01:00
Cao Sen Miao
eddc196081 esp_clk: refactor target/clk.h to private/esp_clk.h 2021-11-26 14:56:30 +08:00
Roland Dobai
766aa57084 Build & config: Remove leftover files from the unsupported "make" build system 2021-11-11 15:32:36 +01:00
Cao Sen Miao
36f6d16b8d ESP8684: add soc, riscv, newlib support 2021-11-06 17:33:44 +08:00