1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

81 Commits

Author SHA1 Message Date
Marian Buschsieweke
9187d16c78
features.yaml: s/esp_eth/periph_eth/
Use periph_eth instead of esp_eth for the Ethernet peripheral on ESP
MCUs for consistency
2024-05-28 20:59:29 +02:00
Gunar Schorcht
92657f5fd2 cpu/esp32: add SDMMC support 2024-01-05 07:22:27 +01:00
Gunar Schorcht
70053c5284 cpu/esp32: add LCD low-level parallel interface suppport 2023-11-13 13:01:57 +01:00
MrKevinWeiss
92794c0eca
boards/*: Model usb and stdio in Kconfig 2023-05-31 13:04:42 +02:00
Benjamin Valentin
7607b9c0f5 cpu/esp32: add esp-bootloader-reset 2023-02-02 10:56:40 +01:00
bors[bot]
7855aad7e4
Merge #19079
19079: cpu/esp32: add periph_flashpage support r=kaspar030 a=gschorcht

### Contribution description

This PR provides the `periph_flashpage` support for ESP32x SoCs.

For byte-aligned read access to constant data in the flash, the MMU of all ESP32x SoCs allows to map a certain number of 64 kByte pages of the flash into the data address space of the CPU. This address space is called DROM. Normally the whole DROM address space is assigned to the section `.rodata`. The default flash layout used by all ESP32x SoCs is:
| Address in Flash | Content |
|:-----------------------|:-----------|
| `0x0000` or `0x1000` | bootloader |
| `0x8000` | parition table |
| `0x9000` | `nvs` parition with WiFi data |
| `0xf000`  | `phy_init` partition with RF data |
| `0x10000` | `factory` partition with the app image |

The factory partition consists of a number of 64 kByte pages for the sections `.text`, `.rodata`, `.bss` and others. The `.text` and `rodata` sections are page-aligned and are simply mapped into the instruction address space (IROM) and the data address space (DROM), respectively. All other sections are loaded into RAM.

If the `periph_flashpage` module is used, the `periph_flashpage` driver
- decreases the size of the `.rodata` section in DROM address space by `CONFIG_ESP_FLASHPAGE_CAPACITY`,
- adds a section `.flashpage.writable` of size `CONFIG_ESP_FLASHPAGE_CAPACITY` at the end of DROM address space that is mapped into data address space of the CPU,
- reserves a region of size `CONFIG_ESP_FLASHPAGE_CAPACITY` starting from `0x10000` in front of the image partition `factory` and
- moves the image partition `factory` by  `CONFIG_ESP_FLASHPAGE_CAPACITY` to address `0x10000 + CONFIG_ESP_FLASHPAGE_CAPACITY`. 

The new flash layout is then:
| Address in Flash | Content |
|:-----------------------|:-----------|
| `0x0000` or `0x1000` | bootloader |
| `0x8000` | parition table |
| `0x9000` | `nvs` parition with WiFi data |
| `0xf000`  | `phy_init` partition with RF data |
| `0x10000` | flashpage region |
| `0x10000 + CONFIG_ESP_FLASHPAGE_CAPACITY` | `factory` partition with the app image |

This guarantees that the flash pages are not overwritten if a new app image with changed size is flashed. `CONFIG_ESP_FLASHPAGE_CAPACITY` has to be a multiple of 64 kBytes.

~The PR includes PR #19077 and PR #19078 for the moment to be compilable.~

### Testing procedure

The following tests should pass.
```
USEMODULE='esp_log_startup ps shell_cmds_default' BOARD=esp32-wroom-32 make -j8 -C tests/periph_flashpage flash term
```
```
USEMODULE='esp_log_startup ps shell_cmds_default' BOARD=esp32-wroom-32 make -j8 -C tests/mtd_flashpage flash term
```

### Issues/PRs references

Depends on PR #19077
Depends on PR #19078 


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-01-18 17:48:29 +00:00
Benjamin Valentin
55b5c47bc8 cpu/esp32: add stdio_usb_serial_jtag 2023-01-09 00:51:27 +01:00
Gunar Schorcht
32168da8d6 cpu/esp32: add flashpage support
f
2023-01-07 14:49:36 +01:00
Gunar Schorcht
a7bf2d74ba cpu/esp32: fix usbdev_synopsys_dwc2 on ztimer_msec
The `usbdev_synopsys_dwc2 driver` requires the `ztimer_msec` module and is therefore responsible for pulling it in. Therefore, the dependency on `ztimer_msec` can be removed here.
2022-10-17 20:03:04 +02:00
Gunar Schorcht
8696783853 cpu/esp32: enable tinyUSB package for ESP32-S2 and ESP32-S3 2022-09-30 19:05:51 +02:00
Gunar Schorcht
9d5a7ac083 cpu/esp32: use usbdev_synopsys_dwc2 driver as periph_usbdev 2022-09-27 01:00:57 +02:00
Gunar Schorcht
1eb8012de9 cpu/esp32: add feature periph_usbdev for ESP32-S2 and ESP32-S3 2022-09-27 01:00:57 +02:00
Gunar Schorcht
2092c35ef6 cpu/esp32: module malloc_thread_safe not needed any longer
With the improvements of the locking mechanism, thread safety of malloc/realloc/calloc/free is guaranteed. Module malloc_thread_safe is not needed any longer.
2022-09-01 15:08:09 +02:00
Gunar Schorcht
5e0b1d665b cpu/esp32: add BLE support for ESP32-S3 2022-08-26 21:16:09 +02:00
Gunar Schorcht
aba5e35ac4 cpu/esp32: add BLE support for ESP32-C3 2022-08-26 17:10:42 +02:00
Gunar Schorcht
56e59eb036 cpu/esp32: add NimBLE support for ESP32 2022-08-24 09:05:25 +02:00
Gunar Schorcht
abccc41db7 cpu/esp32: add BLE support for ESP32 2022-08-24 09:05:25 +02:00
Gunar Schorcht
f0b619bed2 cpu/esp32: add ESP32-S3 support in makefiles 2022-08-09 15:57:18 +02:00
Gunar Schorcht
1c28fa8928 cpu/esp32: replace feature periph_eth by esp_eth
In fact the ESP32 has no peripheral driver for the ETH interface. Instead, the `esp_eth` netdev driver directly uses the ESP-IDF Ethernet API. This caused compilation problems with Kconfig. Therefore the required feature `periph_eth` is replaced by the feature `esp_eth`.
2022-08-03 06:38:44 +02:00
Leandro Lanzieri
575e58dc5b
cpu/esp32/esp-eth: model in Kconfig 2022-07-25 11:08:32 +02:00
Gunar Schorcht
63cc84ac25 cpu/esp32: fix dependency for module esp_rtc_timer_32k 2022-07-20 08:05:44 +02:00
Gunar Schorcht
11c9703675 cpu/esp32: port periph/adc to ESP-IDF interface API 2022-07-17 17:16:49 +02:00
Gunar Schorcht
d6eef52766 cpu/esp32: port periph/gpio to ESP-IDF gpio HAL 2022-07-15 11:03:32 +02:00
benpicco
dd574a45f2
Merge pull request #18253 from gschorcht/cpu/esp32/add_esp_idf_api
cpu/esp32: add ESP-IDF API
2022-06-26 15:36:28 +02:00
Gunar Schorcht
de96a31e1f cpu/esp32: add ESP-IDF interface API
Implements an interface for ESP-IDF types and functions that are required by RIOT-OS but cannot be included directly due to name conflicts.
f
2022-06-23 16:12:13 +02:00
Gunar Schorcht
1f25ac8893 cpu/esp32: ESP32 variant independent makefiles 2022-06-23 13:19:40 +02:00
benpicco
5350927111
Merge pull request #18239 from gschorcht/cpu/esp32/split_wpa_supplicant
cpu/esp32: split modul esp_wpa supplicant into several modules
2022-06-22 13:54:11 +02:00
Gunar Schorcht
ee9f2e439d cpu/esp32: split esp_idf_wpa_supplicant into several modules 2022-06-21 16:28:28 +02:00
Gunar Schorcht
780fd9a815 cpu/esp_common/freertos: add timeout handling to xQueue 2022-06-20 21:23:47 +02:00
Gunar Schorcht
4dc5e86b2a cpu/esp32: remove libc_gettimeofday dependency 2022-06-18 16:35:11 +02:00
Gunar Schorcht
041fe58209 cpu/esp32: add malloc_thread_safe if esp_idf_heap not used 2022-06-15 07:31:02 +02:00
Gunar Schorcht
e8b4a4feb2 cpu/esp32: changes for ESP-IDF v4.4 2022-06-01 13:28:49 +02:00
Gunar Schorcht
b424633016 cpu/esp32: use pthread module if module cpp is used 2022-05-13 18:56:17 +02:00
Francisco Molina
a4bbb74371 cpu/esp32: always include libc_gettimeofday 2022-04-28 09:51:19 +02:00
Gunar Schorcht
92b7b8a3d7 cpu/esp32: disable the use of newlib's pthread headers 2022-03-10 05:31:04 +01:00
Gunar Schorcht
81727fb1f1 pkg/esp32_sdk_libs: add ESP SDK libraries as package
The vendor binary libraries of ESP-IDF are provided as a separate GIT repository. These libraries are defined as separate package for two reasons: 1. RIOT packages don't support to clone GIT repositories recursively; 2. ESP-IDF pulls a lot of other GIT repositories that are not needed when it is cloned recursively.
2022-01-04 16:34:31 +01:00
Gunar Schorcht
d6c2926933 pkg/esp32_sdk: add ESP32 SDK without libraries as package
The vendor binary libraries of ESP-IDF are provided as a separate GIT repository. These libraries are defined as separate package for two reasons: 1. RIOT packages don't support to clone GIT repositories recursively; 2. ESP-IDF pulls a lot of other GIT repositories that are not needed when it is cloned recursively.
2022-01-04 16:34:31 +01:00
Francisco Molina
4e6151bd7d cpu/esp*: migrate from xtimer to ztimer 2021-12-14 18:14:35 +01:00
Leandro Lanzieri
281519881e
cpu/esp32: fix esp_jtag dependency
In order to work properly dependencies should be placed on the
Makefile.dep files, not on Makefile.include.
2021-12-10 18:54:27 +01:00
Leandro Lanzieri
53134d0474
cpu/esp32: require esp_spi_ram feature to use the module 2021-12-10 18:54:27 +01:00
Leandro Lanzieri
59d3f0bcc6
cpu/esp32: remove unneeded crypto dependencies 2021-12-10 17:34:19 +01:00
Leandro Lanzieri
252c3886b0
cpu/esp32: do not expand USEMODULE 2021-12-10 17:34:16 +01:00
Benjamin Valentin
6d42c9fcfe cpu: make newlib_nano a DEFAULT_MODULE
This allows to disable nanospecs with

    DISABLE_MODULE += newlib_nano

if a full-features version of newlib is desired.
2021-05-04 12:12:36 +02:00
Benjamin Valentin
9c1455d55f cpu: make pm_layered a DEFAULT_MODULE
Allow to disable pm_layered in the bootloader to save some ROM.
2021-01-27 13:21:20 +01:00
Francisco Molina
63a2a6ce1b
treewide: model newlib as a FEATURE 2021-01-27 09:24:25 +01:00
Gunar Schorcht
2ed4486f21 cpu/esp32: cleanup of C++ hacks
Since former ESP32 toolchain versions used POSIX threads, module `pthread` was required. The built-in `cxa_ctor_guards` had to be replaced since they used the `pthread_once` function for singleton objects initialization where the parameter `once` was of incompatible type with that provided by RIOT's `pthread` module. The current ESP32 toolchain version no longer uses POSIX threads. The dependency on module `pthread` as well as according C++ hacks can be removed.
2020-07-29 10:14:57 +02:00
benpicco
99e8b04921
Merge pull request #13812 from gschorcht/cpu/esp32/fix_newlib_nano
cpu/esp32: use module newlib_nano
2020-05-01 14:40:02 +02:00
Gunar Schorcht
ce431b2343 cpu/esp32: use RTT based RTC implementation 2020-04-07 09:12:44 +02:00
Gunar Schorcht
0e7eb48d6a cpu/esp32: use RTT instead of RTC in pm_layered 2020-04-07 09:12:44 +02:00
Gunar Schorcht
f67cb48f6d cpu/esp32: add RTT counter implementation
fixup! cpu/esp32: add RTT counter implementation
2020-04-07 09:12:44 +02:00