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

47 Commits

Author SHA1 Message Date
krzysztof-cabaj
2f0a78640f cpu/esp8266: fix issue found by static tests 2024-04-11 19:19:58 +02:00
krzysztof-cabaj
569b4b5294 cpu/esp8266: fix doxygen unbalanced grouping 2024-04-11 19:04:06 +02:00
Benjamin Valentin
75bf0e33e0 cpu/esp8266: allow arbitrary SPI clocks 2024-02-21 23:15:21 +01:00
Benjamin Valentin
8bcfe7b7b6 cpu/esp8266: ESP8266 needs 5 cycles per busy loop 2024-01-10 22:43:31 +01:00
Gunar Schorcht
f1830294c0 cpu/esp8266: adjust THREAD_STACKSIZE_{SMALL/TINY} 2022-09-02 08:57:09 +02:00
Gunar Schorcht
61bf3d2384 cpu/esp*: update/cleanup stack sizes 2022-06-01 13:27:31 +02:00
Gunar Schorcht
881a92fe47 cpu/esp32: remove types.h in sys include 2022-01-25 00:36:51 +01:00
Gunar Schorcht
4d19b77fce cpu/esp8266: add CPU frequency selection to Kconfig 2021-12-19 12:20:43 +01:00
c9207e81a3
cpu/esp8266: include cpu_conf.h in periph_cpu.h 2021-12-15 13:14:19 +01:00
iosabi
7b1f083cd8 esp8266: Download Espressif RTOS SDK as a new RIOT PKG
RIOT-OS uses part of Espressif ESP8266 RTOS SDK to build support for
this CPU. The SDK includes some vendor-provided closed source
pre-compiled libraries that we need to modify to adapt to RIOT-OS
usage. This library modifications was done once and uploaded to a fork
of the vendor repository and was provided as an environment variable.

This patch changes two things:

1. It installs the SDK as a RIOT PKG from the new pkg/esp8266_sdk
directory instead of requiring the user to download it separately.

2. It performs the library modifications (symbol renames) on the pkg
Makefile removing the need to use a fork with the modifications applied
and simplifying the SDK update and future modifications.

This change sets the SDK package version (git SHA) to the same one that
our fork was using as a parent in the vendor repository, meaning that
the output libraries are exactly the same as before.

Tested with
```
ESP8266_RTOS_SDK_DIR=/dev/null USEMODULE=esp_log_startup make -C tests/shell BOARD=esp8266-esp-12x flash
```

and verified that the program works. The boot message now includes:
```
ESP8266-RTOS-SDK Version v3.1-51-g913a06a9
```
confirming the SDK version used.

`/dev/null` in the test is just to make sure that no evaluation of
`ESP8266_RTOS_SDK_DIR` in make is affected by the environment variable
value which would be set to the SDK for people who followed the set up
instructions before this change.

Tested the checkout size:
```bash
$ du -hs build/pkg/esp8266_sdk/
124M	build/pkg/esp8266_sdk/
```
2021-10-23 11:13:38 +00:00
Jean-Pierre De Jesus DIAZ
35d1a2fc02 cpu/esp*: fix doxygen grouping warnings
Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2021-09-11 12:45:15 +02:00
iosabi
52107b2416 esp8266: Support UART1 and other UART0 pins.
The esp8266 CPU has actually two hardware UART peripherals. UART0 is
used by the boot ROM for flashing and serial output during boot,
typically at a baudrate of 74880 bps until the bootloader or application
sets the more standard 115200 baudrate. This UART0 device has two
possible pins for TXD, GPIO1 and GPIO2, which are both set to TXD by the
boot ROM. esp8266 modules will typically have GPIO1 labeled as the TX
pin, but it is possible to use GPIO2 for that purpose even while
flashing the device with esptool.py.

The second device, UART1, also has two options for TXD, GPIO2 and GPIO7,
and only one option for RXD, GPIO8. However, GPIO7 and GPIO8 are used
by the flash internally so those options are not very useful unless
maybe while running from IRAM with the flash disabled, for example for
a debugger over UART1.

This patch allows boards to override UART{0,1}_{R,T}XD in their
periph_conf.h to configure the uart selection. Defining UART1_TX will
make the UART_DEV(1) device available.

Tested with:

```CFLAGS='-DUART1_TXD=GPIO2' make -C tests/periph_uart BOARD=esp8266-esp-12x flash term```

* Connected one USB-UART to the standard GPIO1 and GPIO3 for flashing
  and console. After flashing we see the manual test output at 115200
  bps

* Connected a second USB-UART with RX to GPIO2 running at 74880.

Then run on the first console:
```
> init 1 74880
> send 1 hello
```

The word "hello" appears on the second UART connection.

Note that GPIO2 is used during boot for UART0's TX until the application
or bootloader set it to a regular GPIO, so some boot ROM messages at
74880 bps are visible. After running `init 1 74880` it is set to UART1's
TX.
2021-05-02 12:27:27 +00:00
Francisco Molina
5ae5c40f26
cpu/esp*: add CLOCK_CORECLOCK 2021-04-21 08:54:43 +02:00
Gunar Schorcht
6cd9896ac0 cpu/esp: move BACKUP* attributes to esp_common 2020-04-03 18:07:12 +02:00
Gunar Schorcht
464e3a8741 cpu/esp8266: add RTT implementation 2020-03-19 13:59:58 +01:00
Gunar Schorcht
ef248b392d cpu/esp_comomon: rename cpu_conf.h to cpu_conf_common.h
To be able to define common configurations for all ESP CPUs, the CPU specific configuration cpu_conf.h has to include a common configuration. For that purpose cpu_conf.h in cpu/esp_common is renamed to cpu_conf_common.h and included in CPU specific configurations.
2020-02-29 12:07:12 +01:00
Gunar Schorcht
18659bdf26 cpu/esp*: move FreeRTOS headers to cpu/esp_common 2020-02-21 09:09:34 +01:00
Gunar Schorcht
0292f8b6a3 cpu/esp*: move periph/hwrng to cpu/esp_common 2020-02-21 09:09:34 +01:00
Gunar Schorcht
90dc2ce846 cpu/esp*: common parts of syscalls in cpu/esp_common 2020-02-21 09:09:34 +01:00
Gunar Schorcht
4c466e54ec cpu/esp*: common irq_arch in cpu/esp_common 2020-02-21 09:09:34 +01:00
Gunar Schorcht
43b89a61eb cpu/esp*: move common parts of gpio_arch to cpu/esp_common 2020-02-21 09:09:34 +01:00
Gunar Schorcht
7d701f6fa8 cpu/esp*: move common headers to cpu/esp_common 2020-02-21 09:09:34 +01:00
Gunar Schorcht
7bf5bba564 cpu/esp_common: LOG_TAG macro for DEBUG_ALL
LOG_TAG macro is required for LOG_VERBOSE level in ESP SDK log output handling.
2019-12-20 16:25:41 +01:00
Gunar Schorcht
dcb6673024 cpu/esp8266: platform dependent settings for lwIP 2019-12-17 08:28:33 +01:00
Gunar Schorcht
a3de59fec3 cpu/esp8266: log outputs from esp vendor code
Log outputs from the Espressif vendor code are completely controlled by LOG_LEVEL and should not be controlled by ENABLE_DEBUG by file.
2019-12-12 08:16:54 +01:00
MrKevinWeiss
d218b77ff7 cpu/esp8266: Suppress cpu specific i2c_speed_t in doxygen 2019-11-18 11:43:45 +01:00
MrKevinWeiss
02bd107722 cpu/esp8266: Suppress cpu specific gpio_flank_t in doxygen
The enumeration takes both the cpu and the driver, it should only show the driver enum
2019-11-18 11:43:12 +01:00
Gunar Schorcht
ddc91df4ca cpu/esp8266: changes for RTOS SDK 2019-11-14 13:58:22 +01:00
Gunar Schorcht
a212228147 cpu/esp8266: files that are not needed any longer removed 2019-11-14 12:04:29 +01:00
Gunar Schorcht
f397a74948 cpu/esp8266: FreeRTOS adaption layer added for RTOS SDK 2019-11-13 19:00:39 +01:00
Marian Buschsieweke
314184adb5
cpu: Platform specific C11 atomics compat headers
Added headers to define platform specific sizes and types for the C11 atomics
compatibility module for C++.
2019-10-24 23:08:36 +02:00
Gunar Schorcht
2c555a72ec cpu/esp8266: print_meminfo function added 2019-05-24 00:28:57 +02:00
Gunar Schorcht
501d679f67 cpu/esp8266: fix of printf format identifiers
Format identifier `h` and `hh` removed since `esp_printf` does not support them.
2019-05-24 00:28:24 +02:00
Gunar Schorcht
b17070fbf1 cpu/esp_common: doc fixes 2019-04-15 12:50:44 +02:00
Gunar Schorcht
dc7f979201 cpu/esp8266: SDK interrupt handling removed 2019-04-15 11:45:59 +02:00
Gunar Schorcht
b6d15565be cpu/esp8266: macros required by esp_now_netdev 2019-03-05 16:43:45 +01:00
Gunar Schorcht
04de1e75aa cpu/esp8266: stack sizes tuned for esp_wifi 2019-01-24 09:21:17 +01:00
Gunar Schorcht
e4b0ace841 cpu/esp8266: inc ets_task stack size for esp_now 2019-01-21 16:30:33 +01:00
Gunar Schorcht
0c12206503 cpu/esp8266: cpu configuration tuned
With the new ETS task handling thread, the stack sizes could be down sized.
2019-01-21 16:30:33 +01:00
Gunar Schorcht
2cb7b4c6df cpu/esp8266: add compile-time configurations group 2019-01-14 12:19:04 +01:00
Gunar Schorcht
fa0b4b801f cpu/esp8266: doc fixes 2019-01-09 16:55:21 +01:00
Schorcht
0230d077d4 cpu/esp8266: doxygen problem fix 2019-01-09 16:03:00 +01:00
Gunar Schorcht
1865ee9359 cpu/esp8266: fix of adc_res_t
cpu/esp8266/include/periph_cpu.h overrides the default definition of adc_res_t from periph/adc with a definition which contains only one resolution. This gives compilation errorss if an application uses other resolutions. According to the documentation, adc_sample should return -1 if the resolution is not supported. All other CPUs override adc_res_t either to add new resolutions or to mark resolutions as unsupported. But they all allow to use them at the interface. Therefore, esp8266 uses now the default definition of adc_res_t and returns -1 if a solution is used in adc_sample that is not supported.
2018-11-30 17:56:33 +01:00
Gunar Schorcht
ffd69868c6 cpu/esp8266: doxygen fix
Removes architecture specific includes from documentation of module  Peripheral Driver Interface / GPIO.
2018-11-05 11:23:40 +01:00
Schorcht
0d796d6eec cpu/esp8266: cpu frequency settings 2018-10-19 13:08:32 +02:00
smlng
9468feeaaf cpu/esp8266: add missing PERIPH_TIMER_PROVIDES_SET 2018-09-07 22:14:32 +02:00
Schorcht
e4ca897661 cpu: add esp8266 2018-09-05 02:39:50 +02:00