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
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
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
Benjamin Valentin
aac2855c7c esp-wifi: allow connecting to open networks
Allow connecting to unecnrypted WiFis if `ESP_WIFI_PASS` is not set.
2020-02-22 13:45:15 +01:00
Gunar Schorcht
3230326652 cpu/esp32: fix esp_spi_ram dependency and flash mode setting 2020-02-21 10:14:03 +01:00
Gunar Schorcht
ccae24c8b6 cpu/esp_common: enable esp_wifi as default for lwip 2020-02-21 09:09:34 +01:00
Gunar Schorcht
98ca108be5 cpu/esp8266: move esp_wifi to cpu/esp_common 2020-02-21 09:09:34 +01:00
Gunar Schorcht
9723e3e3cf cpu/esp*: move freertos/task to cpu/esp_common 2020-02-21 09:09:34 +01:00
Gunar Schorcht
61339001e7 cpu/esp*: move common freertos code to cpu/esp_common 2020-02-21 09:09:34 +01:00
Gunar Schorcht
922429bc3b cpu/esp_common: add module esp_freertos_common 2020-02-21 09:09:34 +01:00
Gunar Schorcht
18659bdf26 cpu/esp*: move FreeRTOS headers to cpu/esp_common 2020-02-21 09:09:34 +01:00
Gunar Schorcht
05faec7cf8 cpu/esp*: move periph/i2c_sw to 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
d90164b19a cpu/esp*: move perioph/spi to cpu/esp_common 2020-02-21 09:09:34 +01:00
Gunar Schorcht
66ee155562 cpu/esp*: move periph/flash to cpu/esp_common 2020-02-21 09:09:34 +01:00
Gunar Schorcht
b0517c6733 cpu/esp*: move periph/uart to cpu/esp_common
tmp
2020-02-21 09:09:34 +01:00
Gunar Schorcht
0ef723c6f7 cpu/esp_common: add module esp_periph_common 2020-02-21 09:09:34 +01:00
Gunar Schorcht
39ee806d3c cpu/esp*: move some vendor/esp code to cpu/esp_common 2020-02-21 09:09:34 +01:00
Gunar Schorcht
75d23e8458 cpu/esp*: common exception handling 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
45c71f1a31 esp/esp*: move common code 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
53a3756e0c cpu/esp*: common Makfile* added 2020-02-21 09:09:34 +01:00
Gunar Schorcht
208174a006 cpu/esp_common/esp_now: consistent netif thread naming 2020-01-31 09:32:23 +01:00
Gunar Schorcht
1899c257b7 cpu/esp_common: functions for SDK log outputs
To control the log level and the format of the log output of SDK libraries, a bunch of library-specific printf functions are realized which map the log output from SDK libraries to RIOT's log macros.
2019-12-20 17:58:58 +01:00
Gunar Schorcht
649bce4a46 cpu/esp*: cleanup the log level for init functions
The log level for normal information should be LOG_DEBUG.
2019-12-20 16:25:41 +01:00
Francois Berder
4a31f94cfc many typo fixes
Signed-off-by: Francois Berder <18538310+francois-berder@users.noreply.github.com>
2019-11-23 22:39:07 +01:00
Gunar Schorcht
dca6d59b60 cpu/esp_common: vendor files changed for RTOS SDK 2019-11-08 13:22:50 +01:00
Martine Lenders
14a2f6bc18 gnrc: use gnrc_netif_default_init() for all implementations 2019-11-07 11:00:36 +01:00
Benjamin Valentin
9129ea7399 esp_now: fix unused variable warning
esp_now_pkt_hdr_t *hdr is only used if gnrc_sixlowpan is used,
so move it into the according #ifdef

fixes #12257
2019-09-17 19:02:47 +02:00
Martine Lenders
50a3238ee0 esp-now: use gnrc_netif_hdr_set_netif() 2019-09-10 12:37:32 +02:00
Gunar Schorcht
97bb33788b cpu/esp*: changes to use esp_wifi and esp_now 2019-07-31 13:53:48 +02:00
Gunar Schorcht
760168e403 cpu/esp_common: doc fixes 2019-07-31 13:53:48 +02:00
Gunar Schorcht
636c0847be cpu/esp_common: set WiFi config storage type 2019-07-31 13:53:48 +02:00
Gunar Schorcht
8f0f8f5993 cpu/esp_common: add/fix comments and messages 2019-07-31 13:53:48 +02:00
Gunar Schorcht
9db62bd401 cpu/esp_common: cleanup of compile time config 2019-07-31 13:53:48 +02:00
Gunar Schorcht
f34a1a3eef cpu/esp*: shorter netdev task names 2019-07-31 13:53:48 +02:00
Gunar Schorcht
de91b8dc88 cpu/esp8266: add LoadStoreError exception handler
Usually, the access to the IROM (flash) memory requires 32-bit word aligned reads. Attempts to access data in the IROM (flash) memory less than 32 bits in size triggers a LoadStoreError exception. With the exception handler from esp-open-rtos it becomes possible to access data in IROM (flash) with a size of less than 32 bits and thus to place .rodata sections in the IROM (flash).
2019-04-15 12:50:44 +02:00
Gunar Schorcht
5f1383c27d cpu/esp_common: xtensa vendor files added 2019-04-15 11:45:59 +02:00
Gunar Schorcht
9cc39133e4 cpu/esp_common: check iol_base in esp_now before using it 2019-03-30 15:10:34 +01:00
Gunar Schorcht
5a782fe3b5 cpu/esp_common: esp_now doesn't call memcpy if iol_len is 0 2019-03-14 17:08:18 +01:00
Sebastian Meiling
b98fdac01e
Merge pull request #9917 from gschorcht/esp8266
cpu/esp8266: esp-now network device support
2019-03-06 20:28:39 +01:00
Gunar Schorcht
0ffc26919f cpu/esp_common: fix multicast version of esp_now 2019-03-05 16:43:45 +01:00
Gunar Schorcht
7c5e3a5ca2 cpu/esp: doc of esp_now_netdev changed for esp8266 2019-03-05 16:43:45 +01:00
Gunar Schorcht
84c23a1695 cpu/esp: support of esp_now_netdev for esp8266 2019-03-05 16:43:45 +01:00
Gunar Schorcht
0ddddcb13e cpu/esp: esp_now_params style fixes 2019-03-05 16:43:45 +01:00
Marian Buschsieweke
7a05fc09f3
cpu/esp_common: Use NETOPT_MAX_PDU_SIZE
Updated esp_now to use NETOPT_MAX_PDU_SIZE instead of the deprecated
NETOPT_MAX_PACKET_SIZE.
2019-02-18 20:18:50 +01:00
smlng
6183d5f5c5 netdev: remove layer2 netstats from netdev drivers
Removing usage of netdev->stats in all net drivers, as it is
handled by gnrc_netif.
2019-02-01 11:25:27 +02:00
Gunar Schorcht
7754a3416c cpu/esp_common: doc fixes related to esp_wifi 2019-01-17 17:10:43 +01:00
Gunar Schorcht
68a02fd1c6 cpu/esp: comment about non-existing mutex removed 2019-01-11 12:38:04 +01:00
Gunar Schorcht
0b1ef9abbb cpu/esp: assert removed in esp_now_recv_cb
assert was added intentionally for debugging purposes. For released version it is enough that function returns.
2019-01-10 11:38:03 +01:00
Gunar Schorcht
3bb28c989b cpu/esp: esp_now timer restart for peer-scan moved
Timer restart was moved from esp_now_scan_peers_done to esp_now_scan_peers_start to avoid that the scan for peers isn't triggered anymore if the esp_now_scan_peers_done callback isn't called because of errors.
2019-01-07 18:36:35 +01:00
Gunar Schorcht
26cec66be5 cpu/esp: _get_iid removed in esp_now_netdev 2019-01-07 18:27:24 +01:00
Gunar Schorcht
56b3643ad6 cpu/esp: buffer in esp_now_netdev removed
Since it is not possible to reenter the function `esp_now_recv_cb`, and the functions netif::_ recv and esp_now_netdev::_ recv are called directly in the same thread context we can read directly from the `buf` and don't need a receive buffer anymmore.
2019-01-03 17:22:19 +01:00
Gunar Schorcht
3888c62f61 cpu/esp: ringbuffer removed from esp_now_netdev
Since it is not possible to reenter the function `esp_now_recv_cb`, and the functions netif::_ recv and esp_now_netdev::_ recv are called directly in the same thread context we only need a buffer which contains one frame and its source mac address.
2019-01-03 16:01:02 +01:00
Gunar Schorcht
d8ee8020c6 cpu/esp: remove rx_lock mutex in esp_now_netdev
Since it is not possible to reenter the function `esp_now_recv_cb`, and the functions netif::_ recv and esp_now_netdev::_ recv are called directly in the same thread context, neither a mutual exclusion has to be realized nor have the interrupts to be deactivated.
2019-01-03 14:52:57 +01:00
Gunar Schorcht
00730b41e0 cpu/esp: direct call _recv in esp_now_recv_cb
Since the esp_now_recv_cb function is not called directly as an ISR through interrupts, it is not executed in the interrupt context. _recv can therefore be called directly. The treatment of the recv_event is no longer necessary.
2019-01-03 14:39:27 +01:00
Gunar Schorcht
a2f5c9d02f cpu/esp: avoid reentrance of esp_now_recv_cb
Although it should not be possible to reenter the function esp_now_recv_cb, this is avoided by an additional boolean variable. It can not be realized by mutex because it would reenter from same thread context.  If macro NDEBUG is not defined, an assertion is used.
2019-01-03 14:01:51 +01:00
Gunar Schorcht
9b5a77f1c4 cpu/esp: fix of lost esp_now_netdev ISR events 2019-01-03 13:36:21 +01:00
Gunar Schorcht
a36366f9a9 cpu/esp: api change in esp_now_netdev::_recv
Newest version of API requires to drop the frame when if parameter len is smaller than the received packet.
2019-01-03 13:35:09 +01:00
Gunar Schorcht
49c64c01a8 cpu/esp: simplified esp_now_netdev::_recv function
Simplifies the _recv receive function structure of esp_now_netdev according to the possible parameter values.
2019-01-03 13:33:25 +01:00
Timo Rothenpieler
6be81fbd93 esp_now: use custom netif instead of raw one
Avoids parsing IPv6 packets to determine destination address.
Allows using 6Lo over ESP-NOW, which is required due to the low MTU of
ESP-NOW.

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2018-12-29 13:15:44 +01:00
Timo Rothenpieler
34c42cbcc2 esp_now: code style amendments 2018-12-28 13:35:46 +01:00
Timo Rothenpieler
a46023a523 esp_now: remove unnecessary ifdef 2018-12-28 13:35:46 +01:00
Martine Lenders
9f0dfb5222 esp_now: fix doxygen groups 2018-12-28 12:14:16 +01:00
Gunar Schorcht
797a894e40 cpu/esp32: esp_now netdev moved to esp_common 2018-12-27 17:31:34 +01:00
Gunar Schorcht
a352500476 cpu/esp_common: added for common files for ESP SoC 2018-12-27 17:28:46 +01:00