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

317 Commits

Author SHA1 Message Date
Gunar Schorcht
c8d8e5d3f5 cpu/esp_common/freertos: add required ringbuffer handling 2022-06-20 21:23:47 +02:00
Gunar Schorcht
780fd9a815 cpu/esp_common/freertos: add timeout handling to xQueue 2022-06-20 21:23:47 +02:00
Gunar Schorcht
99fa182fb4 cpu/esp_common/freertos: add required task functions 2022-06-20 21:23:47 +02:00
Gunar Schorcht
ae01985588 cpu/esp_common/freertos: add xSemaphoreGetMutexHolder
The mutex and semaphor handling had to be extended by the thread pid.
2022-06-20 21:23:47 +02:00
Gunar Schorcht
02e52513d1 cpu/esp_common/freertos: add xQueueReset function 2022-06-20 21:23:47 +02:00
Gunar Schorcht
e4f1a94219 cpu/esp_common/freertos: allow platform independent compilation 2022-06-20 21:23:47 +02:00
Benjamin Valentin
344c065e2f cpu/esp_common: use LittleFS2 as default FS 2022-06-02 23:21:22 +02:00
benpicco
e1e2b7c5b6
Merge pull request #17601 from gschorcht/cpu/esp32/upgrade_esp-idf_v4.4
cpu/esp32: Upgrade to ESP-IDF v4.4
2022-06-02 10:18:07 +02:00
Gunar Schorcht
565c2e17a0 cpu/esp32: update log module for ESP-IDF 4.4 2022-06-01 13:31:00 +02:00
Gunar Schorcht
84893c672b cpu/esp_common: fix lock handling
Assertions for uninitialized locks must not be triggered as long as the scheduler is not running. Furthemore, the handling of the __malloc_static_object lock is only necessary for ESP8266.
2022-06-01 13:31:00 +02:00
Gunar Schorcht
d63c116eba cpu/esp_esp8266: move missing _rename_r function to esp_common 2022-06-01 13:31:00 +02:00
Gunar Schorcht
d2a4d6e3d3 cpu/esp32: compile bootloader from ESP-IDF v4.4 source 2022-06-01 13:31:00 +02:00
Gunar Schorcht
443f3b87df cpu/esp_common: missing heap functions for ESP-IDF v4.4 2022-06-01 13:27:31 +02:00
Gunar Schorcht
d1d252cc58 cpu/esp_common: changes in event handling for ESP-IDF v4.4 2022-06-01 13:27:31 +02:00
Gunar Schorcht
0ecbcf6561 cpu/esp_common: changes in esp_now/esp_wifi for ESP-IDF v4.4 2022-06-01 13:27:31 +02:00
Gunar Schorcht
ee4a032a89 cpu/esp_common: fix compilation problems with ESP-IDF v4.4 2022-06-01 13:27:31 +02:00
Gunar Schorcht
9fd056f8ec cpu/esp_common: add missing functions for ESP-EDF v 4.4 2022-06-01 13:27:31 +02:00
Gunar Schorcht
e5adb7ef34 cpu/esp32: cleanup of periph/gpio for ESP-IDF v4.4 2022-06-01 13:27:31 +02:00
Gunar Schorcht
d4e061f635 cpu/esp_common/freertos: missing functions/definitions for ESP-IDF v4.4 2022-06-01 13:21:29 +02:00
benpicco
eb09fe21fd
Merge pull request #18025 from leandrolanzieri/pr/sys/random/change_kconfig_default_backend
sys/random/kconfig: remove HWRNG default in backend choice
2022-05-24 11:35:21 +02:00
Gunar Schorcht
72abc08d14 cpu/esp_common: small fix of lib_printf 2022-05-18 07:27:23 +02:00
Gunar Schorcht
60bbe0fe49 cpu/esp_common/makefile: move linking of libhal.a to esp8266 makefile 2022-05-18 07:27:23 +02:00
chrysn
b458d52e2b cpu/esp_common: Set write size for flash implementation 2022-05-17 15:48:18 +02:00
Leandro Lanzieri
82726a2b2b
sys/random/kconfig: remove HWRNG default in backend choice
For now we match the Makefile.dep default, ignoring if the platform
presents a Hardware RNG.
2022-04-27 15:41:23 +02:00
Gunar Schorcht
cbbd02d520 dist/tools: rename esptool to esptools to use it for several tools
The directory `dist/tools/esptool` already contains a couple of ESP tools and not only esptool.py. As the location for a couple of ESP related tools, it is more clear to call it `esptools` instead of `esptool`.
2022-03-04 08:34:19 +01:00
Francisco Molina
c1238ad4e4 cpu/esp: model missing modules 2022-02-09 16:50:04 +01:00
Gunar Schorcht
e1c6306bf4 cpu/esp32: replace bzero by memset 2022-01-25 00:36:51 +01:00
Gunar Schorcht
e15e18b195 cpu/esp32: fix compilation errors 2022-01-25 00:36:51 +01:00
Gunar Schorcht
839cf4223d cpu/esp32: changes for retagetable locking 2022-01-25 00:36:51 +01:00
Gunar Schorcht
881a92fe47 cpu/esp32: remove types.h in sys include 2022-01-25 00:36:51 +01:00
benpicco
c18f1c2a9b
Merge pull request #17455 from gschorcht/cpu/esp32/sdk-as-package
cpu/esp32: download Espressif SDK ESP-IDF as package
2022-01-24 16:13:04 +01:00
Gunar Schorcht
6c3e7c5db7 cpu/esp*: nfs_flash/cpp dependency cleanup
Module `esp_idf_nvs_flash` uses C++ code. Since  `esp_idf_nvs_flash` module is always enabled on ESP8266, the permanent dependency on `cpp` is correct. But on ESP32, the `esp_idf_nvs_flash` module is only enabled if `esp_wifi_any` is used. Only in that case the compilation should depend on module `cpp`.
2022-01-21 13:32:56 +01:00
8272e4fbd2
Merge pull request #17359 from benpicco/irq_is_in-bool
core: change return type of irq_is_in(), irq_is_enabled() to bool
2022-01-06 18:13:20 +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
Gunar Schorcht
3492a36cf6 cpu/esp_common: common periph features moved to cpu/esp_common 2021-12-23 10:35:07 +01:00
benpicco
2bb2dc35d2
Merge pull request #17420 from gschorcht/cpu/esp/revert_change_for_esp_wifi_passphrase
cpu/esp: revert the change for default definition of ESP_WIFI_PASS
2021-12-20 17:05:45 +01:00
Gunar Schorcht
87a72e4dfe cpu/esp: revert the change for ESP_WIFI_PASS define
Previously, a default value for ESP_WIFI_PASS was intentionally defined only if DOXYGEN was also defined, to allow ESP_WIFI_PASS to be left undefined for using APs without authentication. With PR #17415 the definition was changed to always define a default value for EPS_WIFI_PASS.  This made it impossible to use APs without authentication. The commit reverts this change.
2021-12-19 07:39:46 +01:00
2c3e077bca
Merge pull request #17413 from gschorcht/cpu/esp32/support_clocks_2_and_40_MHz
cpu/esp32: support CPU clocks 2 MHz and 40 MHz
2021-12-18 21:58:34 +01:00
Jean-Pierre De Jesus DIAZ
466fdf5114
Merge pull request #17415 from gschorcht/cpu/esp/wifi_ap_dynamic_ssid_option
cpu/esp: change dynamic SSID option handling
2021-12-17 18:11:38 +01:00
Gunar Schorcht
5d00acc868 cpu/esp32/spi: support 2 MHz and 40 MHz APB clocks 2021-12-17 17:45:25 +01:00
Gunar Schorcht
8ac808e4fd cpu/esp: cleanup for dynamic SoftAP SSID option
The semantics of defining an SSID prefix that overrides the already defined SSID exactly when and only when it is set, and then enabling dynamic SSID generation with that prefix, made handling the parameter definition unnecessarily difficult and hard to understand.

Defining a boolean option that enables dynamic SSID generation, which then simply reuses the defined SSID as a prefix, makes it much more understandable and easier to handle, especially with respect to Kconfig.
2021-12-16 13:17:17 +01:00
Gunar Schorcht
0b4fb5a9ea cpu/esp32/i2c_sw: add delays for 2 and 40 MHz 2021-12-16 10:44:53 +01:00
Francisco Molina
4e6151bd7d cpu/esp*: migrate from xtimer to ztimer 2021-12-14 18:14:35 +01:00
Leandro Lanzieri
01e01c4597
cpu/esp_common: move LINKFLAGS to Makefile.include 2021-12-10 18:54:28 +01:00
Leandro Lanzieri
81b93c9b95
cpu/esp32/kconfig: move esp_wifi_enterprise feature to esp_common 2021-12-10 18:54:28 +01:00
Leandro Lanzieri
7a8f58ac4c
cpu/esp_common: model Kconfig 2021-12-10 18:54:07 +01:00
Leandro Lanzieri
831101eea5
cpu/esp_common/periph_flash: fix dependency 2021-12-10 18:51:27 +01:00
Benjamin Valentin
41a5b7ef7a core: change return type of irq_is_in(), irq_is_enabled() to bool
This only cleans up the API, no change in behavior or users of the API
is expected.
2021-12-08 15:53:15 +01:00
Gunar Schorcht
a66fef5bf5 cpu/esp_common: add bus clear for I2C on ESP32
On the ESP32 it is often not possible with the I2C software implementation to communicate with an AIP31068 based LCD module.  Therefore, the I2C hardware implementation is enabled when the AIP31068 driver is used, but it is more buggy than stable. The timing of the two implementations seems to be almost identical. The only difference is that the hardware implementation clears the bus before each access by sending 10 clock pulses on the SCL line while SDA is LOW. Using the same mechanism during I2C initialization for the software implementation solves the communication problem with the AIP31068.
The same software implementation works reliably with the AIP31068 on the ESP8266.
2021-12-06 22:02:30 +01:00
Gunar Schorcht
007e29ebb5 cpu/periph/i2c: update implementations to new I2C API
Make all `spi_acquire` implementations return `void` and add assertions to check for valid device identifier where missing.
2021-11-29 06:35:25 +01:00
Erik Ekman
e5d60176e4 cpu/esp: Suppress cppcheck errors
cpu/esp_common/syscalls.c💯 error (memleak): Memory leak: mtx
cpu/esp_common/syscalls.c:131: error (memleak): Memory leak: rmtx
cpu/esp_common/syscalls.c:365: error (comparePointers): Subtracting pointers that point to different objects

cpu/esp_common/thread_arch.c:355: error (comparePointers): Comparing pointers that point to different objects

cpu/esp8266/startup.c:59: error (comparePointers): Subtracting pointers that point to different objects
2021-11-25 13:08:51 +01:00
Marian Buschsieweke
cb6525b033
cpu/esp_common: fix unaligned access in periph_flashpage 2021-11-07 22:06:27 +01:00
Martine Lenders
098eeb1a2c
cpu/esp_common: suppress cppcheck false positives 2021-11-05 09:27:00 +01:00
Martine Lenders
f08989a3c8
core: make SCHED_TEST_STACK boolean and default to 1 with DEVELHELP 2021-11-05 09:27:00 +01:00
Gunar Schorcht
697c44811a
Merge pull request #16911 from yarrick/esp_jtag
cpu/esp32: Add openocd programming support
2021-10-26 01:24:27 +02: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
Erik Ekman
3d7d211157 cpu/esp: Always create app.elf.bin and partitions.bin
Even if programmer is not esptool
2021-10-15 09:59:38 +02: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
Francisco
a1cbcc9ede
Merge pull request #15902 from maribu/spi-api-change-1
drivers/periph_spi: let spi_acquire return void
2021-09-02 08:50:56 +02:00
Marian Buschsieweke
f04b522601
cpu/periph_spi: update implementations to new API
Make all spi_acquire() implementations return `void` and add assertions to
check for valid parameters, where missing.
2021-09-01 21:38:40 +02:00
Hauke Petersen
5cdef474c2 cpu/esp_common: implement irq_is_enabled() 2021-08-25 08:01:05 +02:00
Jan Romann
4384795cb9
treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
Marian Buschsieweke
6c4f0da7a7
cpu/esp_common: fix bootloop on ESP8266 2021-07-13 20:48:01 +02:00
Jose Alamos
4340047781
esp-wifi: avoid explicit cast to netdev 2021-07-09 10:38:34 +02:00
Jose Alamos
88dc962c3e
esp-now: avoid explicit cast to netdev 2021-07-09 10:38:34 +02:00
Marian Buschsieweke
a9dea12eb8
cpu/esp_common: add overflow detection to calloc
If esp_idf_heap is not used, implement calloc through a custom wrapper
function on top of malloc to add overflow detection, which is not
present in the newlib forks with xtensa support yet.
2021-05-10 15:29:48 +02:00
Marian Buschsieweke
2f08f676dc
cpu/esp_common: fix possible overflow in calloc implementation 2021-05-05 08:58:34 +02:00
benpicco
0c28ec57f2
Merge pull request #16386 from iosabi/esp8266_i2c
cpu/esp_common: Support disabling I2C clock stretching in ESP8266
2021-05-03 11:31:54 +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
iosabi
b1bd7bed67 cpu/esp_common: Support disabling I2C clock stretching in ESP8266
In I2C, clock stretching occurs when the controller stops driving SCL
down but the peripheral continues to drive SCL down until the value of
SDA that is expected to be set by the peripheral is ready. This allows a
peripheral to communicate at a high speed but introduce a delay in the
response (like an ACK or read) in some specific situations. Not all I2C
peripherals require I2C stretching, and in many cases SCL is only an
input to these peripherals.

Clock stretching is the only situation where a peripheral may drive down
SCL, which technically makes SCL an open-drain with a pull-up like SDA.
However, if clock stretching is not needed, SCL can be configured as an
output removing the need for a pull-up and specially, allowing to use
as SCL GPIO pins that otherwise have a pull-down connected. In
particular, GPIO15 in the ESP8266 requires an external pull-down during
boot for the ESP8266 to boot from the flash.

This patch allows a board to define `I2C_CLOCK_STRETCH` to 0 to disable
clock stretching and allowing to use GPIO15 as SCL.
2021-04-26 00:36:12 +02:00
b5794c2a22
cpu/esp: set esptool as supported programmer 2021-02-24 13:29:56 +01:00
Francisco Molina
63a2a6ce1b
treewide: model newlib as a FEATURE 2021-01-27 09:24:25 +01:00
Jens Wetterich
450ede0da0 cpu/esp_common: Add missing includes and ISO-C++ compatibility 2021-01-10 18:02:39 +01:00
Jens Wetterich
e36a0d883a esp_common/esp_now: use netdev_register() 2020-12-23 19:44:57 +01:00
d527ab6994
cpu: boards: esp: use common esptool makefile 2020-12-01 10:36:42 +01:00
Erik Ekman
2afa93c9f7 boards/esp32-ethernet-kit: Setup Kconfig to match makefiles 2020-11-28 10:18:54 +01:00
575189510d
Merge pull request #15465 from maribu/atomic-utils-volatile
sys/atomic_utils: Use volatile qualifier
2020-11-24 22:05:33 +01:00
Marian Buschsieweke
dd48ced151
cpu/*/atomic_utils_arch.h: Add volatile qualifier 2020-11-24 14:00:52 +01:00
ba28bf849c cpu/esp_common: add missing include for limits.h in freertos/task.h 2020-11-23 16:56:34 +01:00
Marian Buschsieweke
921bc7f6e0
cpu/esp*: Fix cast alignment issues
- Add `WORD_ALIGNED` attribute to potentially unaligned allocations
- Use intermediate cast to `uintptr_t` to silence false positives of
  `-Wcast-align`
2020-11-18 10:19:23 +01:00
792e031a95
Merge pull request #14331 from maribu/atomic_utils
sys/atomic_utils: Functions for atomic access
2020-11-12 21:44:53 +01:00
Marian Buschsieweke
ed6b88d5c4
cpu/esp_common: Add atomic_utils_arch.h 2020-11-10 10:55:13 +01:00
Bas Stottelaar
94171b7389 cpu/*: replace #if ENABLE_DEBUG with IS_ACTIVE 2020-11-02 21:34:12 +01:00
benpicco
b14e7544aa
Merge pull request #14117 from btcven/2020_05_22-esp_wifi_ap
cpu/esp: implement ESP WiFi SoftAP mode
2020-10-26 00:08:22 +01:00
Bas Stottelaar
22243aec7a cpu/*: realign ENABLE_DEBUG 2020-10-23 00:46:26 +02:00
Bas Stottelaar
bd34cf8fc0 cpu/*: reorder ENABLE_DEBUG after last include 2020-10-23 00:45:55 +02:00
Bas Stottelaar
fb61443bbd cpu/*: remove unused assert.h include 2020-10-22 11:13:09 +02:00
Bas Stottelaar
ab6188cea3 cpu/*: add missing include of assert.h 2020-10-22 11:13:08 +02:00
Bas Stottelaar
9d06bffbfb cpu/*: add explicit include of timex.h 2020-10-21 21:42:47 +02:00
Martine Lenders
45144fb4a4
treewide: use new gnrc_pkt API functions instead of utlist.h macros 2020-10-13 13:32:53 +02:00
c458bbceca
cpu/esp_common: fix typo 'implementd' -> 'implemented' 2020-10-02 07:57:00 +02:00
Marian Buschsieweke
bf13dc99fb
cpu/esp_common: Add architecture_arch.h 2020-09-29 12:34:00 +02:00
Jean Pierre Dudey
295a3665d2 cpu/esp: implement ESP SoftAP mode
This is an implementation of the ESP32 SoftAP mode using the
`esp_wifi_ap` pseudomodule.

Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2020-09-27 18:29:24 -05:00
Francisco
64f6b7ffa4
Merge pull request #14702 from maribu/sched_active_thread
treewide: Fix direct access to scheduler internals
2020-09-21 09:09:59 +02:00
Marian Buschsieweke
c5c62e93d3
cpu/esp_common: Declare sched_active_{thread,pid}
Declare sched_active_thread and sched_active_pid locally in the ESP code for
now. Once the code is cleaned up to no longer tap into scheduler internals but
use the API instead, those can be dropped again.
2020-09-07 12:59:55 +02:00
Leandro Lanzieri
81cb769cad
makefiles: avoid building archives when compiling 2020-09-04 15:01:10 +02:00
benpicco
b6a542668b
Merge pull request #14845 from fjmolinas/pr_driver_netdev_common
tests/driver_netdev_common: add netdev_default
2020-08-27 17:01:50 +02:00
Francisco Molina
c05dd9e6d3
treewide: change netdev driver dependencies against netdev_default
- gnrc_netdev_default depends on netdev_default, no need for checking
against both modules.
- fix documentation mentions of the double check
2020-08-27 11:46:25 +02:00
9b2aa40e03
Merge pull request #14038 from benpicco/mtd_pagewise
mtd: add page addressed operations to allow access > 4GiB on SD cards
2020-08-25 13:10:20 +02:00
benpicco
157705c0c6
Merge pull request #14772 from maribu/esp_sched_cleanup
cpu/esp: Use API to access sched internals
2020-08-20 00:09:35 +02:00
Leandro Lanzieri
a64461cdad
cpu/esp_common: stdio_uart by default if there is no other 2020-08-19 10:00:35 +02:00
Benjamin Valentin
277452807b cpu/esp_common: flash: implement write_page() 2020-08-18 17:25:40 +02:00
Marian Buschsieweke
35d46e6dc3
cpu/esp: Use API to access sched internals
Replace access to `sched_active_task` and `sched_active_pid` with calls to
`thread_getpid()` and `thread_get_active()`.
2020-08-17 14:05:05 +02:00
Marian Buschsieweke
f8b7c899f8
cpu/esp_common: Allows use feature cpp
The vendor code uses C++ code, thus, C++ support needs to be enabled in any
case.
2020-07-23 20:18:33 +02:00
Marian Buschsieweke
cf482c5d46
build system: Add libstdcpp feature and doc
- Add libstdcpp feature to indicate a platform is providing a libstdc++
  implementation ready for use
- The existing cpp feature now only indicates a working C++ toolchain without
  libstdc++. (E.g. still useful for the Arduino compatibility layer.)
- Added libstdcpp as required feature were needed
- Added some documentation on C++ on RIOT
2020-07-15 11:45:22 +02:00
Gunar Schorcht
fb47f094d3 cpu/esp32: support multiple heaps for newlib
Several unsused DRAM sections are added to the heap.
2020-07-10 08:42:12 +02:00
Leandro Lanzieri
e6b698c69b
cpu/esp_common: Add Kconfig symbols 2020-07-07 16:27:34 +02:00
Jean Pierre Dudey
3003cf737a
boards/common/esp32: move ESP features to cpu/esp_common
>All of them are features of each ESP SoC and have not to be configured by the
board definition.

Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2020-07-07 16:02:23 +02:00
Gunar Schorcht
028c0d4b3c
Merge pull request #14353 from fjmolinas/pr_reorder_makefiles_cleanup
Makefile: use normal conditionals
2020-06-30 09:59:02 +02:00
Francisco Molina
e98341da93
Makefile: use normal conditionals 2020-06-29 22:40:29 +02:00
Gunar Schorcht
e247ced04c cpu/esp: add feature arch_esp for all ESP SoCs
There are common features that can be used by ESP32 as well as ESP8266, for example the `esp_wifi` module. To be able to test for any ESP SoC, feature `arch_esp` is introduced.
2020-06-27 11:30:59 +02:00
benpicco
3a30db4029
Merge pull request #13895 from gschorcht/cpu/esp32/fix_i2c_gpio_32_33
cpu/esp32: fix GPIO32 and GPIO 33 as I2C pins
2020-05-25 22:37:35 +02:00
Gunar Schorcht
fef3c101b7 Revert "cpu/esp_common: fix dependency of flash target on ELF file"
This reverts commit d0cc955394.
2020-05-12 18:07:48 +02:00
benpicco
0bbc86a379
Merge pull request #14041 from gschorcht/cpu/esp/fix_make_flash_dependency
cpu/esp_common: fix the dependency of the flash image on the ELF file
2020-05-08 11:55:14 +02:00
Gunar Schorcht
d0cc955394 cpu/esp_common: fix dependency of flash target on ELF file
Flashing an ESP board first requires the creation of a flash image from the ELF file.  This is realized in the `preflash` target. However, the `preflash` target only depends on the variable `BUILD_BEFORE_FLASH` but on the ELF file. Therefore, the variable `BUILD_BEFORE_FLASH` must be set to the ELF file to ensure that when using multiple make processes, the compilation of the ELF file is completed before the flash image is created.
2020-05-08 11:03:39 +02:00
fabian18
a3a1c160ee mtd: Change API to return 0 on success
Returning the number of bytes written/read could return a negative integer
because a uint32_t is expected for the length in read()/write() operations.
2020-05-06 20:24:27 +02:00
benpicco
4150afea00
Merge pull request #13749 from gschorcht/cpu/esp32/periph_rtt
cpu/esp32: replace RTC implementation by RTT implementation
2020-05-01 14:14:01 +02:00
Francisco Molina
da90407572
cpu/esp_common/include: include common xtstr header 2020-04-21 15:10:55 +02:00
Gunar Schorcht
bb51fbb7ec cpu/esp32: fix GPIO32 and GPIO 33 as I2C pins
GPIO32 and GPIO33 are used during boot to start an 32.768 kHz XTAL if it is connected to these GPIOs. If the 32.768 kHz XTAL is not connected, these pins can be used digital IO. However, the 32.678 kHz XTAL has to be disabled explicitly in this case. Furthermore, the handling of GPIOs greater than GPIO31 had to be fixed in I2C software implementation.
2020-04-17 18:46:15 +02:00
Gunar Schorcht
6cd9896ac0 cpu/esp: move BACKUP* attributes to esp_common 2020-04-03 18:07:12 +02:00
Gunar Schorcht
a0b77de3dc cpu/esp8266: move RTC_BSS_ATTR to cpu/esp_common
Since the attribute is required by EPS8266 as well as ESP32, it is moved to cpu/esp_common.
2020-04-03 18:07:12 +02:00
Gunar Schorcht
579de1a1e7 cpu/esp: deprecated NETOPT_LINK_CONNECTED renamed 2020-03-31 18:11:47 +02:00
Gunar Schorcht
aa3de05601 cpu/esp: fix netopt_enabled_t handling in esp_wifi/esp_eth 2020-03-31 18:11:36 +02:00
benpicco
97acdd94c5
Merge pull request #13677 from gschorcht/cpu/esp/esp_wifi/modem_sleep
cpu/esp_common: allow WiFi modem sleep mode
2020-03-31 14:15:06 +02:00
Gunar Schorcht
1505c105d2 cpu/esp32: allow WiFi modem sleep
Due to stability reasons, the SoftAP interface of the WiFi module was always enabled in former versions even if only the station interface was used. Therefore the WiFi modem had to be always active and the SoC could not enter the modem sleep mode. Therefore, the SoftAP interface is only enabled when ESP-NOW is used.
2020-03-31 13:17:23 +02:00
benpicco
ad81a88bf0
Merge pull request #13676 from gschorcht/cpu/esp/netopt_channel
cpu/esp: add NETOPT_CHANNEL for esp_wifi and esp_now
2020-03-27 16:37:41 +01:00
Gunar Schorcht
42ff700df5
Merge pull request #13728 from maribu/esp32_python3
cpu/esp_common: Use python3 instead python
2020-03-26 21:57:14 +01:00
Marian Buschsieweke
bcaacc8fa5
cpu/esp_common: Use python3 instead python 2020-03-26 15:10:28 +01:00
Gunar Schorcht
f90d230b00 cpu/esp: set NETOPT_CHANNEL for esp_wifi/esp_now 2020-03-26 14:47:41 +01:00
Gunar Schorcht
331313db4f cpu/esp: NETOPT_CHANNEL for esp_wifi and esp_now 2020-03-26 14:46:15 +01:00
Martine S. Lenders
62d48d5bf3
gnrc_netif: document new *_create() out parameter as such 2020-03-26 14:37:44 +01:00
Jose Alamos
67ed9defbe gnrc_netif_xxx_create: use external netif allocation 2020-03-26 11:12:23 +01:00
Leandro Lanzieri
afc0ad4d57
cpu/esp_common: Set RIOT_TEST_TIMEOUT with conditional expansion 2020-03-24 09:27:40 +01:00
Leandro Lanzieri
56972af3b4
cpu/esp_common: Don't increase GNRC_NETIF_NUMOF on Makefile 2020-03-24 09:27:30 +01:00
Leandro Lanzieri
939a10813b
cpu/esp_common: Check for esp_spi_ram with conditional expansion 2020-03-24 09:21:23 +01:00
Leandro Lanzieri
fcfc15e199
cpu/esp: Move dependency resolution of esp_log_startup to Makefile.dep 2020-03-24 09:21:21 +01:00
Leandro Lanzieri
e61532efbe
cpu/esp: Move dependency resolution of esp_log_colored to Makefile.dep 2020-03-24 09:21:21 +01:00
Leandro Lanzieri
f918b97ec3
cpu/esp: Move dependency resolution of esp_gdb to Makefile.dep 2020-03-24 09:21:20 +01:00
Leandro Lanzieri
7a30795a8c
cpu/esp: Move esp_[wifi/now] dependency resolution to Makefile.dep 2020-03-24 09:21:20 +01:00
Leandro Lanzieri
ab1f88c69a
cpu/esp: Evaluate esp_[wifi/now] modules with conditional expansion 2020-03-24 09:21:20 +01:00
Leandro Lanzieri
48a62dcc8f
cpu/esp: Move common dependencies to Makefile.dep 2020-03-24 09:21:19 +01:00
benpicco
45b635f4c5
Merge pull request #13416 from gschorcht/cpu/esp32/pm_layered
cpu/esp32: support for light/deep sleep and pm_layered
2020-03-23 14:11:05 +01:00
Gunar Schorcht
4f977316fe cpu/esp_common: stop WiFi interface before sleep/reboot
The WiFi interface should be stopped before reboot or sleep. But stopping the WiFi interface disconnects an existing connection. Usually, esp_wifi_netdev tries to reconnect on an disconnect event. However, trying reconnect with a stopped WiFi interface may lead to a crash. Therefore, the stop event has to be handled.
2020-03-23 12:38:36 +01:00
Gunar Schorcht
dff74a3278 cpu/esp32: add pm_layered support 2020-03-23 12:38:36 +01:00
benpicco
921a6a663e
Merge pull request #12024 from gschorcht/cpu/esp32/esp_wifi/wpa2_enterprise
cpu/esp32/esp wifi: add WPA2 enterprise mode with IEEE 802.1x/EAP authentication
2020-03-22 17:10:31 +01:00
Gunar Schorcht
c1e6e70015 cpu/esp32/esp_wifi: doc for WPA2 Enterprise mode 2020-03-22 15:47:06 +01:00
Gunar Schorcht
920d54b226 cpu/esp32/esp_wifi: integrate WPA2 Enterprise mode 2020-03-17 17:51:29 +01:00
Gunar Schorcht
ae647ed95f cpu/esp32/esp_wifi: Makefile integration for WPA2 Enterprise mode 2020-03-17 17:51:29 +01:00
Jose Alamos
3ad574a822 drivers/netdev: use netdev_trigger_event_isr function 2020-03-06 14:03:43 +01:00
Gunar Schorcht
33fd259115 cpu/esp: platform heap_stats only used with esp_idf_heap 2020-02-29 12:21:09 +01:00