1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 14:33:52 +01:00
bors[bot] 4f1bb12720
Merge #18752 #19100 #19104
18752: nanocoap_sock: deprecate nanocoap_get() r=benpicco a=benpicco





19100: cpu/esp_common: allow configuration of UART0 r=benpicco a=gschorcht

### Contribution description

This PR
- fixes the issue for ESP32 SoCs that UART0 signals can't be routed to arbitrary GPIOs and
- allows the configuration of the UART device used by the bootloader.

The UART interface and its configuration used by the STDIO are defined in RIOT using the define `STDIO_UART_DEV` and the configuration of the corresponding UART device in `periph_conf.h`. 

However, the bootloader compiled directly in ESP-IDF uses its own definitions `CONFIG_ESP_CONSOLE_UART_*` for the UART configuration. To be able to use a consistent UART configuration in RIOT and the bootloader, e.g. to see the output of the 2nd stage bootloader, these `CONFIG_ESP_CONSOLE_UART_*` can be defined via a set of KConfig variables in RIOT (not yet implemented in Kconfig):
- `CONSOLE_CONFIG_UART_NUM` defines the UART device to be used by the bootloader and by `STDIO_UART_DEV`
- `CONSOLE_CONFIG_UART_RX` and `CONSOLE_CONFIG_UART_TX` define the GPIOs to be used by the bootloader and should be the GPIOs as defined in `periph_conf.h` for the corresponding UART device.

### Testing procedure

Any ESP32 node should still work with `stdio_uart` and the default configuration. To test an alternative configuration, use
```
CFLAGS='-DUART1_TXD=5 -DUART1_RXD=4 -DCONFIG_CONSOLE_UART_NUM=1 -DCONFIG_CONSOLE_UART_TX=5 -DCONFIG_CONSOLE_UART_RX=4' USEMODULE=esp_log_startup BOARD=esp32-wroom-32 make -C tests/shell flash
```
The bootloader output and the STDIO should be routed to UART1 at GPIO4 and GPIO5.

### Issues/PRs references

Prerequisite for PR ##18863

19104: tests/periph_uart: only exclude STDIO_UART_DEV if stdio_uart is used r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
2023-01-06 21:15:36 +00:00
..
2022-09-14 15:05:25 +02:00
2020-11-23 16:56:34 +01:00
2022-12-13 00:24:44 +01:00
2022-06-06 20:46:48 +02:00
2021-08-13 19:50:38 +02:00
2022-04-14 09:23:27 +02:00
2023-01-06 01:07:57 +00:00
2022-09-14 15:05:25 +02:00
2021-08-13 19:50:38 +02:00
2020-09-30 11:18:36 +02:00
2021-08-13 19:50:38 +02:00
2022-09-26 20:20:14 +02:00
2021-08-13 19:50:38 +02:00
2021-08-13 19:50:38 +02:00
2021-08-13 19:50:38 +02:00
2020-07-22 00:26:09 +05:30
2021-08-13 19:50:38 +02:00
2023-01-06 21:15:36 +00:00
2021-06-18 00:13:08 +02:00
2021-07-05 10:32:50 +02:00
2021-08-13 19:50:38 +02:00
2021-08-13 19:50:38 +02:00
2022-09-14 15:05:25 +02:00
2021-07-08 09:40:02 +02:00
2020-11-09 11:45:28 +01:00