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

392 Commits

Author SHA1 Message Date
Gunar Schorcht
aa3f1329bf pkg/lwip: remove TCPIP_THREAD_PRIO for ESP32
This definition is platform dependent and should be therefore done with CFLAGS in ESP332's Makefile.
2019-12-15 23:50:45 +01:00
Gunar Schorcht
f92c083528 cpu/esp32: fix compile error 2019-12-15 11:17:23 +01:00
Gunar Schorcht
2e4e3507bd cpu/esp32: change netopt in esp_eth for lwIP 2019-12-14 16:59:21 +01:00
Gunar Schorcht
be688f51c6 cpu/esp32: expose esp_eth_setup for lwIP 2019-12-14 16:59:21 +01:00
Gunar Schorcht
3235f18b22 cpu/esp32: expose eps_eth netdev for lwIP 2019-12-14 16:59:21 +01:00
Gunar Schorcht
e6db92567e cpu/esp32: esp_wifi send buffer should not be on stack
The buffer[EHTHERNET_MAX_LEN] used in _esp_wifi_send to convert the iolist of the given packet to a plain buffer for the WiFi interface should not be on the stack to prevent the sending thread's stack from overflowing.
2019-12-14 10:21:05 +01:00
855e249d8c
Merge pull request #12890 from gschorcht/cpu/esp/fix_tests_spiffs
cpu/esp*: fixes for tests/pkg_spiffs and tests/pkg_littlefs
2019-12-06 12:42:14 +01:00
Gunar Schorcht
35357b86a8 cpu/esp*: reduce test timeouts for spiffs/littlefs
To avoid that murdock times out before tests/pkg_spiffs and tests/pkg_littlefs time out, the configured test timeouts for these tests is reduced to 200 seconds which should be enough. An ESP32 needs an average of 60 seconds for these tests, while an ESP8266 needs in average 100 seconds.
2019-12-06 11:44:15 +01:00
Gunar Schorcht
95c6d1859c cpu/esp32: fix for crashes of tests/pkg_spiffs
ESP32 nodes can crash during SPI Flash write operations if required parts of the code are not in the IRAM but in the cached SPI Flash memory, which is disabled during the SPI Flash write operations. Therefore, the code of the SPIFFS package and the VFS module are now stored in the IRAM.
2019-12-06 11:44:15 +01:00
Gunar Schorcht
eb73358284 cpu/esp32: enable esp_log_startup on LOG_LEVL=4 2019-11-28 18:59:09 +01:00
Gunar Schorcht
91496b3cba cpu/esp32: add bootloaders without startup info
To reduce the information that are printed at the console during the startup, special bootloaders are required that suppress the outputs which are only informational. The according bootloader has to be selected during the make process.
2019-11-28 18:59:09 +01:00
Gunar Schorcht
8d25e6909e cpu/esp32: module to print startup info
Startup information, including board configuration, is only printed when module esp_log_startup is used. This reduces the amount of information that is printed by default to the console during the startup. The user can enable module esp_log_startup to get the additional startup information.
2019-11-28 18:59:09 +01:00
Gunar Schorcht
e3bb708e4d cpu/esp32/periph: flush UART TX FIFO before a baudrate change 2019-11-28 08:57:26 +01:00
Gunar Schorcht
83892aa184 cpu/esp32/periph: workaround for UART clock problems
The UART peripheral clock seems to be sporadically set to wrong value when the CPU clock is changed. In this case, the UART clock is not set to 115.200 kbps but to 96 kbps, so that the output in the console seems like garbage. This can also cause automatic tests to fail. Therefore, the CPU clock is only changed if CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ defines a different default CPU clock than the one already used at boot time.
2019-11-28 08:22:30 +01:00
benpicco
63e4d8ffa5
Merge pull request #12803 from gschorcht/cpu/esp32/fix_little_fs
cpu/esp32: fix to be able to use SPI flash drive with pkg_littlefs
2019-11-25 15:49:13 +01:00
Gunar Schorcht
4fe35efe2b cpu/esp32: mtd has to be in IRAM to work correctly 2019-11-25 07:24:17 +01:00
Gunar Schorcht
5f9e3b1a4b cpu/esp32: change order for spi_flash_drive_init
To see debug or error messages during SPI flash drive initialization, spi_flash_drive_init has to be called after stdio_init.
2019-11-25 07:23:47 +01:00
a8c3c6ab68 cpu/esp32: fix typos 2019-11-23 22:39:36 +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
71d6a71364 cpu/esp32: defines esp_now as default netdev
If the user or the board definition doesn't enable `esp_wifi` or `esp_eth`, `esp_now` is defined as default netdev.
fixup! cpu/esp32: defines esp_now as default netdev
2019-11-23 14:26:07 +01:00
Gunar Schorcht
72967f8fc3 cpu/esp32: GNRC_NETIF_NUMOF is handled in CPU makefile
Since Makefile.dep files are included as last files multiple times to resolve all module dependencies, GNRC_NETIF_NUMOF is handled here.
2019-11-22 17:38:35 +01:00
Gunar Schorcht
afff683696 cpu/esp32: number of thread priorities for esp_eth
The number of thread priority levels has to be 32 if esp_eth is used.
2019-11-22 17:32:37 +01:00
f04df728cb
Merge pull request #12044 from gschorcht/cpu/esp32/log_module_fix
cpu/esp32: improvements and cleanup of log_module
2019-11-22 14:33:33 +01:00
Gunar Schorcht
43d989b4d5 cpu/esp32: break on core_panic
To be able to catch a core panic in debugger and to get the last output from asynchronous UART , e.g., if the stack is smashed, the system is not rebooted immediately anymore but breaks, which stops the execution in debugger or reboots the system after WDT timeout.
2019-11-22 13:56:41 +01:00
faac10f593
Merge pull request #11994 from gschorcht/cpu/esp32/esp_wifi/crypto-fix
cpu/esp32: esp_wifi and crypto module fix
2019-11-22 11:16:33 +01:00
Gunar Schorcht
6fb7c50d48 cpu/esp32: colored output modifications
For compatibility with module log_color and the esp8266 esp_log_colored implementation.
2019-11-22 11:11:19 +01:00
Gunar Schorcht
4af78c31ef cpu/esp32: enable colored output with log_color 2019-11-22 11:11:19 +01:00
Gunar Schorcht
f500dcbf02 cpu/esp32: colored and tagged log output docu 2019-11-22 11:11:19 +01:00
Schorcht
4503f45abb cpu/esp32: esp_log_color renamed to esp_log_colored 2019-11-22 11:11:19 +01:00
Gunar Schorcht
5d51c03af9 cpu/esp32: replace ets_printf by printf
Wherever possible, ets_printf is replaced by newlib printf.
2019-11-22 11:11:19 +01:00
Gunar Schorcht
1f940b0728 cpu/esp32: map log outputs from SDK libraries
Log outputs generated by binary ESP32 SDK libraries are mapped to the ESP32's log module which supports colored and tagged log outpus. Tagged log outputs from SDK libraries are handled accordingly.
2019-11-22 11:11:19 +01:00
Gunar Schorcht
9a4cdc7e93 cpu/esp32: log_module implementation
The implementation of `log_module` for ESP32 was changed from functions to a macro-based implementation to be able to use the bunch of macros for colored and tagget log output generation.
2019-11-22 11:11:19 +01:00
Gunar Schorcht
d55225eb29 cpu/esp32: remove SDK crypto dependency from doc 2019-11-21 18:34:08 +01:00
Gunar Schorcht
5f01d0a88f cpu/esp32: remove SDK crypto function dependency
Modules `crypto` and `hashes` have not be disabled any longer when module `esp_wifi` is used.
2019-11-21 18:34:08 +01:00
Gunar Schorcht
1a12f56fbd cpu/esp32: use renamed SDK crypto functions 2019-11-21 18:32:28 +01:00
Gunar Schorcht
d8f0399eaa cpu/esp32: rename SDK crypto function
Renames crypto functions of ESP32 SDK in vendor code to resolve the conflicts between `wpa-supplicant` crypto functions and RIOT's `crypto` and `hashes` modules.
2019-11-21 18:32:28 +01:00
Gunar Schorcht
f8c740c190 cpu/esp32: use SDK crypto headers from vendor code
Changes the include path for ESP32 SDK crypto function headers to find their modified version in vendor codefirst.
2019-11-21 18:32:28 +01:00
Gunar Schorcht
ee349edf3b cpu/esp32: add SDK crypto headers and rename
To resolve the conflicts between `wpa-supplicant` crypto functions (part of the ESP32 SDK) and RIOT's `crypto` and `hashes` modules, the crypto function headers from ESP32 SDK are added to vendor code and the crypto functions are renamed using the prefix `wpa_`.
2019-11-21 18:32:28 +01:00
c7825aa92e
Merge pull request #12508 from gschorcht/cpu/esp32/doc_adc2_and_wifi
cpu/esp32: note on using ADC2 and WiFi in documentation
2019-11-21 18:27:06 +01:00
178d0aace2
Merge pull request #12758 from gschorcht/cpu/esp32/fix_fs_tests
cpu/esp32: increase timeout for spiffs and littlefs tests
2019-11-21 17:10:16 +01:00
fe255a26d5
Merge pull request #12750 from gschorcht/cpu/esp32/esptools
cpu/esp32: use esptool.py from riot tools
2019-11-21 17:09:54 +01:00
Gunar Schorcht
fe165738e7 cpu/esp32: doc changes for esptool.py 2019-11-21 10:18:56 +01:00
Gunar Schorcht
9080893f06 cpu/esp32: use esptool.py from riot tools
Use esptool.py from riot tools instead from ESP-IDF SDK to avoid that the SDK has to be installed to flash an image.
2019-11-21 10:18:56 +01:00
Gunar Schorcht
47a4ff05c0 cpu/esp32: increase timeout for spiffs and littlefs tests
The time it takes to erase the entire flash memory of an esp32 card requires increasing the timeout for tests/pkg_spiffs and tests/pkg_littlefs.
2019-11-21 10:15:38 +01:00
6cdf656d62
Merge pull request #12753 from gschorcht/cpu/esp32/fix_sched_prio
cpu/esp32: fix of thread priorities levels
2019-11-21 09:28:58 +01:00
bef34d400e
Merge pull request #12757 from gschorcht/cpu/esp32/fix_xtimer_deps
cpu/esp32: fix xtimer dependency
2019-11-21 09:23:19 +01:00
Gunar Schorcht
7b1ef78054 cpu/esp32: fix of thread priorities levels
A number of tests insist that the number of thread priority levels is 16. However, when using the WiFi interface, a number of high priority threads are required to handle the WiFi hardware. In this case, the number of thread priority levels must be 32. Solves the problem of tests `tests/shell`.
2019-11-21 06:55:41 +01:00
Gunar Schorcht
9a1742074a cpu/esp32: fix xtimer dependency
Removes the dependency of the module riot_freertos from module xtimer. This avoids that xtimer is used even if it is not really needed which in turn occupies the first timer device and tests/periph_timer fails.
2019-11-21 06:38:58 +01:00
Gunar Schorcht
3ab5e3ad66 cpu/esp32: fix heap command output
The heap command output has to have an output format that is compatible with the test.
2019-11-20 08:44:45 +01:00
Gunar Schorcht
327b9fd32e cpu/esp32: introduce module esp_log_tagged
ESP32 log output was always tagged with additional information by default. The tag consists the type of the log message, the system time in ms, and the module or function in which the log message is generated. By introducing module `esp_log_tagged`, these additional information are disabled by default and can be enabled by using module `esp_log_tagged`.
2019-11-20 08:42:27 +01:00
Gunar Schorcht
a3058291b7 cpu/esp32: colored log output
Log module of ESP32 supports colored log outputs when module `esp_log_color` is enabled. The generation of colored log outputs is realized by a extending the bunch of macros with an additional letter indicating the type of log message,
2019-11-20 08:42:22 +01:00
Gunar Schorcht
f2f07252fe cpu/esp32: bootloader versions with and w/o colors
For the implementation of the colored log output, two versions of the bootloader are introduced, one version with colored log output and one version without colors.
2019-11-20 08:42:14 +01:00
Kevin "Tristate Tom" Weiss
be39169bd4
Merge pull request #11108 from gschorcht/cpu/esp8266/esp-idf/pr
cpu/esp8266: complete reimplementation based on ESP8266 RTOS SDK
2019-11-18 09:34:49 +01:00
Yegor Yefremov
df7e760588 doxygen/I2C: don't include overridden typedefs
Add missing #ifndefs to overridden I2C typedefs.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-11-15 10:35:33 +01:00
Yegor Yefremov
cf65070b06 doxygen/GPIO: don't include overridden typedefs
Add missing #ifndefs to overridden GPIO typedefs.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-11-15 10:35:33 +01:00
Yegor Yefremov
5b0252b150 doxygen/ADC: don't include overridden typedefs
Add missing #ifndefs to overridden ADC resolution typedefs.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-11-15 10:35:32 +01:00
Gunar Schorcht
4f4d882f68 cpu/esp32: changes for RTOS SDK 2019-11-14 13:58:25 +01:00
Gunar Schorcht
e38d3e24ec
Merge pull request #12548 from maribu/c11_atomcis_cpp_compat
sys: Basic C++ compatibility with C11 atomcis
2019-10-25 11:48:58 +02: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
Francisco Molina
1ae0873769 boards: change PORT used for flash/debug/reset to PROG_DEV 2019-10-24 12:58:12 +02:00
Gunar Schorcht
db945bdd86 cpu/esp32: fix CS handling in spi_transfer_bytes
If `SPI_CS_UNDEF` is given as the `cs` parameter, CS pin must not be handled by the driver. Furthermore, if `cont` parameter is true, CS pin must not be disabled at the end of one transfer.
2019-10-22 08:14:49 +02:00
Gunar Schorcht
1cf163833b cpu/esp32: note on using ADC2 and WiFi in doc
The ADC2 controller of the ESP32 is used by the WiFi module. The GPIOs connected to the ADC2 controller cannot be used as ADC channels if the WiFi module is enabled. This is clarified by a note in the documentation.
2019-10-19 16:31:04 +02:00
ebf43616b7 cpu: add arch_* features 2019-10-13 21:03:41 +02:00
Kevin "Tristate Tom" Weiss
4b7c5915ec
Merge pull request #10953 from gschorcht/sys/shell/heap_cmd/pr
sys/shell: add heap command
2019-10-04 13:49:57 +02:00
Gunar Schorcht
5521a6c39d cpu/esp: fix conflicts after rebase 2019-10-02 14:21:35 +02:00
Gunar Schorcht
3c47cc571f cpu/esp32: fix conflicts after rebase 2019-10-02 14:21:35 +02:00
Gunar Schorcht
02d81b717e
Merge pull request #12063 from maribu/i2c_release
drivers/periph/i2c: Updated i2c_release() to return void
2019-10-01 19:50:38 +02:00
Gunar Schorcht
5009959610
Merge pull request #12346 from benpicco/esp32-thin_archives
cpu/esp32: unconditionally disable thin archives
2019-10-01 10:34:04 +02:00
benpicco
52bf448a3b
Merge pull request #12035 from gschorcht/cpu/esp32/fix_periph_flash
cpu/esp32: fix and improve periph/flash
2019-10-01 10:22:06 +02:00
Benjamin Valentin
0ca2ce0214 cpu/esp32: unconditionally disable thin archives
Thin archives also cause a boot loop when using the flash module.
To prevent further surprises, disable thin archives unconditionally
until the cause for this behaviour is known.
2019-10-01 09:28:33 +02:00
Benjamin Valentin
111fe80eb9 cpu/esp: disable thin archives if esp_wifi is used
For a yet unknown reason, both esp8266 and esp32 get stuck in a
reboot loop when thin archives are used.

As a workaround, disable thin archives for now if esp_wifi is used.

fixes #12258
2019-09-25 07:48:07 +02:00
Martine Lenders
1598c8c6f8
Merge pull request #11950 from gschorcht/cpu/esp32/periph-gpio_read-fix
cpu/esp32: fix of gpio_read for output ports
2019-09-24 20:20:40 +02:00
Francisco
5ab2db71a4
Merge pull request #12282 from LordTy/esp32_build_fix
cpu/esp32: Use awk/printf instead of echo -n when flashing esp32
2019-09-24 18:38:35 +02:00
benpicco
3833e42426
Merge pull request #12092 from cladmi/pr/cpu_model/minor_changes_included
boards with side-effect: move CPU/CPU_MODEL definition to Makefile.features
2019-09-24 18:36:58 +02:00
Gaëtan Harter
8cebed6792
boards/common/esp: harmonize CPU/CPU_MODEL to other boards
* CPU files should already have 'CPU' defined by the board.
* Do not conditionally define CPU as it is not needed.

This is part of cleanup prior to moving the CPU/CPU_MODEL to
Makefile.features.
2019-09-24 17:29:37 +02:00
Tim Broenink
35aa642e8a cpu/common/esp32: use 'awk/printf' instead of 'echo'
- replaces 'echo -n' and 'awk' with 'printf' and 'awk'
  - replaces rest of 'echo' statements with printf
2019-09-24 15:34:54 +02:00
Gunar Schorcht
d5bf41dba1 cpu/esp32: doc update for periph_can 2019-09-20 19:39:23 +02:00
Gunar Schorcht
fc5692d67c cpu/esp32: driver for ESP32 CAN as periph_can 2019-09-20 19:39:23 +02:00
Gunar Schorcht
c498ebd388 cpu/esp32: default device config for periph_can 2019-09-20 19:35:02 +02:00
Gunar Schorcht
49ecce9b81 cpu/esp32: periph_can device/conf type definitions 2019-09-20 19:35:02 +02:00
Gunar Schorcht
e0f1ab0a16 cpu/esp32: module esp_can removed
CAN controller driver for ESP32 is no longer realized as separate module.
2019-09-20 19:35:02 +02:00
Marian Buschsieweke
2750dc2000
cpu/esp32: Moved stdio_init() before periph_init()
- This guarantees that DEBUG() is available early in boot process
- Forgotten in https://github.com/RIOT-OS/RIOT/pull/11367, fixes broken stdio
2019-09-14 11:12:32 +02:00
Gunar Schorcht
4469dadb7f cpu/esp32: _esp_wifi_dev exposed for lwIP
To be able to access the single esp_wifi network device from lwIP adaptation layer, static keyword was removed from esp_wifi_dev variable.
2019-09-12 18:39:46 +02:00
benpicco
e589cfbf6c
Merge pull request #10760 from gschorcht/esp32_esp_eth_link_opt
cpu/esp32: support of NETOPT_LINK_CONNECTED in esp_eth_netdev
2019-09-12 18:14:44 +02:00
Juan I Carrano
c50d8fada1
Merge pull request #11646 from cladmi/pr/esp/programmer_update
esp*: updates to the programmer configuration
2019-09-10 17:58:20 +02:00
benpicco
3aa8bc0d70
Merge pull request #12150 from jcarrano/compress-debuginfo
toolchain/cflags: enable dwarf compression (save 50% HDD)
2019-09-10 10:31:45 +02:00
benpicco
999fffdc59
Merge pull request #11997 from gschorcht/cpu/esp32/esp_wifi/cleanups
cpu/esp32: esp_wifi improvements and cleanups
2019-09-05 13:51:10 +02:00
Gunar Schorcht
b3737715e5
Merge pull request #12170 from benpicco/esp32-fix_doc
cpu/esp32: fix documentation about toolchain installation
2019-09-05 12:58:32 +02:00
Gunar Schorcht
6d77529c83 cpu/esp32: cleaning up left overs in esp_wifi 2019-09-05 12:49:43 +02:00
Gunar Schorcht
3d5ef14650 cpu/esp32: local buffer in send of esp_wifi
Instead of having a send buffer as member `esp_wifi` netdev, a local variable is used now as send buffer. This avoids the need for a locking mechanism and reduces the risk of deadlocks.
2019-09-05 12:49:43 +02:00
Gunar Schorcht
74cbc410b7 cpu/esp32: ringbuffer introduced in esp_wifi
Receive call back function `_esp_wifi_rx_cb` is called from WiFi hardware driver with a pointer to a frame buffer that is allocated in the WiFi hardware driver. This frame buffer was freed immediately after copying its content to a single local receive buffer of the `esp_wifi` netdev. The local receive buffer remained occupied until the protocol stack had processed it. Further incoming packets were dropped.  However, very often a number of subsequent WiFi frames are received at the same time before the first one is processed completely. Having the single local receive buffer to hold only one received frame, led to a number of lost packets, even at low network load. Therefore, a ringbuffer of rx_buf elements was introduced which doesn't store the frames directly but only references to the frame buffers allocated in WiFi hardware driver. Since there is enough memory to hold several frames, the frames buffers allocated in WiFi hardware driver aren't freed immediatly any longer but are kept until the frame is processed by the protocol stack. This results in a much less loss rate of packets.
2019-09-05 12:49:02 +02:00
Gunar Schorcht
0e4ab63735 cpu/esp32: uniform debug output in esp_wifi 2019-09-05 12:49:02 +02:00
Gunar Schorcht
1ed09492a4 cpu/esp32: param checks replaced by asserts in esp_wifi 2019-09-05 12:49:02 +02:00
Gunar Schorcht
28ce17e64c cpu/esp32: event handling changed in esp_wifi
Events of different type can be pending at the same time. Therefore it is not possible to use ascending identifiers for the presence of a pending event. Rather, each event type has to be represented by one bit. Thes bits ORed identify all types of pending events. In the esp_wifi_isr function all pending events are then handled in one call. Otherwise, some events might be lost.
2019-09-05 12:49:02 +02:00
Gunar Schorcht
5cc990fb7c cpu/esp32: cleanup of includes in esp_wifi 2019-09-05 12:49:02 +02:00
benpicco
dbd97b7588
Merge pull request #11947 from gschorcht/cpu/esp32/freertos-critcial-sections
cpu/esp32: critcial section handling changed in FreeRTOS adaptation layer
2019-09-05 12:40:45 +02:00
Sebastian Meiling
c4dbdb7626
Merge pull request #12134 from gschorcht/cpu/esp/fix_i2c_ack_err_errno
cpu/esp*: fix of the error code for I2C address ACK errors
2019-09-05 12:23:24 +03:00
Gunar Schorcht
cb8b1b12c1 cpu/esp32: fix errno for I2C addr ack error
fixup! cpu/esp32: fix errno for I2C addr ack error
2019-09-05 10:35:02 +02:00
Gunar Schorcht
e9e6b7f31a cpu/esp32: changes for common heap command 2019-09-05 09:20:55 +02:00
Benjamin Valentin
7fc7272394 cpu/esp32: fix documentation about toolchain installation
Checking out the submodules first and then the commit makes a mess.
Doing it the other way round results in a working toolchain.
2019-09-05 01:01:09 +02:00
Juan Carrano
63c475cd4d toolchain/cflags: enable dwarf compression.
Use the -gz option to compress ELF sections containing DWARF information.
This saves around 50% of disk space, without any side effects.

See https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Debugging-Options.html#Debugging-Options
for more infomation on this option.

Some platforms have an outdated toolchain that does not support -gz so
the flag is blacklisted there. Even then, the results are quite impressive.

I used @cladmi's `buildtest` branch (https://github.com/cladmi/RIOT/tree/wip/du/buildtest)
with this change and compiled the `examples/default` application:

```
$ BUILD_IN_DOCKER=1 DOCKER="sudo docker" make -C examples/default buildtest-indocker
```

The size was obtained with:

```
$ find output -name "*.bin.bindirsize" -type f -exec tail  -n1 '{}' \; | cut -f 1 | awk '{s+=$1} END {printf "%.0f", s}'
```

Results:

- Vanilla: 10328112 KB (~10GB).
- with -gz: 4982788 KB (~5GB).

This was inspired by #8496.
2019-09-02 14:43:26 +02:00
Gaëtan Harter
e4331e8391
cpu/arch: blacklist incompatible CFLAGS
Blacklist incompatible CFLAGS that are currently "optionally" included
in 'cflags.inc.mk'.

This prepares for the migration to 'OPTIONAL_CFLAGS'.
2019-08-29 17:43:54 +02:00
Juan I Carrano
5ece3dc323
Merge pull request #12050 from gschorcht/cpu/esp32/fix_ctor_initialization
cpu/esp32: fix of global ctor initialization
2019-08-27 11:38:00 +02:00
Gunar Schorcht
7b160a7dd3 cpu/esp32: workaround for static object init 2019-08-27 09:41:41 +02:00
Marian Buschsieweke
a4810f3276
cpu/esp32: Updated i2c_release() 2019-08-22 12:03:08 +02:00
Gunar Schorcht
328813ce12 cpu/esp32: fix of ctor and newlib initialization
Module `newlib` is now used by default. Therefore, the separation of initialization of ctors and the newlibc is not needed any longer. Instead of calling `do_global_ctors` and `_init` separately, `__libc_init_array` is called. Explicit function `do_global_ctors` is removed.
2019-08-21 16:31:06 +02:00
Gunar Schorcht
5fc015e31b cpu/esp32: fix periph_flash param checks for mtd 2019-08-21 01:16:47 +02:00
Gunar Schorcht
c6d33cf5de cpu/esp32: erase improvement for periph_flash
Performance of erasing the whole flash is drastically improved by erasing blocks of 64 kbyte, if possible, instead of erasing sectors of 4 kByte.
2019-08-20 01:56:38 +02:00
Gunar Schorcht
1c60e175ca cpu/esp32: fix periph_flash timing problems
While deleting multiple sectors in flash, interrupts were disabled over the whole time. Thus, deleting the entire flash led to the triggering of the watchdog timer and thus to a restart. Therefore, the interrupts and the cache are disabled only for the time of deleting a single sector. The same problem occurred for read and write large data sets.
2019-08-20 01:51:05 +02:00
Gunar Schorcht
bf331bd54b cpu/esp32: use printf/puts from newlib
Initializing the stdio file descriptors in global reent structure with newlib fake stdio file descriptors led to the problem that newlib stdio functions printf and puts were not working since they can't operate on these fake stdio file descriptors. Therefore, this initialization was removed. Now, the real stdio file descriptors as created automatically by newlib are used. Specific functions `printf`, `puts`, `getchar`and `putchar` are not required any longer and are removed now.
2019-08-19 15:14:32 +02:00
Gunar Schorcht
87cd181f56 cpu/esp32: use always newlib_syscalls_default
Modules newlib and newlib_syscalls_default are now used by default. Conditional compilations for MODULE_NEWLIB_SYSCALLS_DEFAULT as well as alternative code are removed completely.
2019-08-19 15:13:53 +02:00
Gunar Schorcht
6a378f71a0 cpu/esp32: fixes printf and puts
printf and puts used ets_printf before. Unfortunately, ets_printf adds an additional \r for each \n which is not consistent with other RIOT platforms. As a result some automatic tests failed. Therefore, both functions write now character-wise directly to the UART interface.
2019-08-17 11:34:20 +02:00
Gunar Schorcht
8c5de9b714 cpu/esp32: module riot_freertos is always required 2019-08-12 16:51:50 +02:00
Gunar Schorcht
d2de4858e2 cpu/esp32: compile riot_freertos only if required 2019-08-12 16:51:50 +02:00
Gunar Schorcht
1b041083ab cpu/esp32: change of critical section handling in freertos
Using a mutex for critical section handling with portENTER_CRITICAL and portEXIT_CRITICAL does not work for RIOT, as this function can also be called in the interrupt context. Therefore, the given mutex is not used. Instead, the basic default FreeRTOS mechanism for critical sections is used by simply disabling interrupts. Since context switches for the ESP32 are also based on interrupts, there is no possibility that another thread will enter the critical section once the interrupts are disabled.
2019-08-12 16:51:50 +02:00
Gunar Schorcht
26b71a3f14 cpu/esp32: removes additional spaces in freertos 2019-08-12 16:51:50 +02:00
Martine Lenders
1dc6bded04
Merge pull request #11946 from gschorcht/cpu/esp32/lwip_netdev
cpu/esp32: lwIP netdev
2019-08-07 08:10:03 +02:00
Benjamin Valentin
b8c4ab5b69 cpu: make use of ARRAY_SIZE macro 2019-08-06 19:43:54 +02:00
Gunar Schorcht
73552b2c11 cpu/esp32: _esp_wifi_dev exposed for lwIP
To be able to access the single esp_wifi network device from lwIP adaptation layer, static keyword was removed from esp_wifi_dev variable.
2019-08-06 19:12:29 +02:00
Gunar Schorcht
33a6f42fa5 cpu/esp32: lwIP Ethernet address option length
The option value length of Ethernet addresses can be more than 6 byte in lwIP. Therefore, the max_len parameter is check to be greater than or equal to ETHERNET_ADDR_LEN.
2019-08-06 19:12:29 +02:00
Gunar Schorcht
b2b17c5912 cpu/esp32: fix conditional linker options for esp_idf_heap
Module esp_idf_heap is enabled in cpu/esp32/Makefile.dep depending on other modules. Since cpu/esp32/Makefile.dep is read after cpu/esp32/Makefile.include, the conditional  definition of the linker options for the wrapper functions had to be moved from cpu/esp32/Makefile.include to cpu/esp32/Makefile.dep.
2019-08-06 18:17:59 +02:00
Gunar Schorcht
e4198542d1 cpu/esp32: fix multiple definitions with esp_idf_heap
If module esp_idf_heap is used, the memory management functions _malloc_r, _realloc_r, _calloc_r and _free_r have to be overridden by wrapper functions to use the heap_* functions of module _esp_idf_heap. However, this can lead to multiple symbol errors for these functions for some applications. To solve this symbol conflict, _malloc_r, _realloc_r, _calloc_r and _free_r functions are renamed to __wrap_* and the linker options are extended by -Wl,-wrap option when module esp_idf_heap is used.
2019-08-06 14:21:17 +02:00
Gunar Schorcht
7f30bf2aef cpu/esp32: optimizing compilation of subdirs
A number of subdirectories in cpu/esp32/vendor/esp-idf have to be compiled ony, when according modules are required by the application.
2019-08-06 08:05:28 +02:00
Gunar Schorcht
9e47872a59 cpu/esp32: fix multiple definition of putchar
When standard C libraries are added to BASELIBS to group them together with all other modules, there are multiple definitions for the putchar function. The one that is defined writing to the UART as standard output and the one that is provided by the standard C libraries. To solve this symbol conflict, putchar and getchar functions that use the UART as standard output/input are renamed to __wrap_putchar and __wrap_getchar and the linker options are extended by -Wl,-wrap option.
2019-08-06 08:05:22 +02:00
Gunar Schorcht
4972d5bd67 cpu/esp32: fix pthread_setcancelstate symbol problem
When linking an application, symbol pthread_setcancelstate is not known in standard C libraries, even if the pthread module is linked. This is because the pthread module is grouped with all other modules, but not with the default C libraries when they are added to LINK_FLAGS. Therefore, standard C libraries have to be added also to BASELIBS to group them with all other modules.
2019-08-06 08:05:18 +02:00
Gunar Schorcht
e9ecca2c62 cpu/esp32: fix unknown symbols for unused functions
Fixes the problem that the compilation of an applications can throw unknown symbol errors for functions that aren't use at all. Thus, it is possible to remove the warning for unknown symbols and the compilation can abort if there are real unknown symbols.
2019-08-06 08:04:57 +02:00
Gunar Schorcht
b571757bcd cpu/esp32: fix of the return code in esp_wifi_send 2019-08-05 17:38:03 +02:00
Gunar Schorcht
9772562359 cpu/esp32: fix of gpio_read for output ports
Although it isn't explicitly specified in API, gpio_read should return the last written output value for output ports. Since the handling of inputs and outputs is strictly separated by several registers in ESP32, gpio_read returned always the initial value of the input register. Therefore, a case distinction had to make. While for input ports the real value has to be read from the input register, the last written value for the output port has to be read from the output register.
2019-08-01 15:22:02 +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
96a9949bf9 cpu/esp32: set WiFi config storage type 2019-07-31 13:53:48 +02:00
Gunar Schorcht
9981d2b05c cpu/esp32: cleanup comments/messages in esp_wifi 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
1492f00690 cpu/esp32: esp_wifi compile configuration tuned
Downsized numbers of dynamic send and receive buffers.
2019-07-31 13:53:48 +02:00
Gunar Schorcht
dd6a5cde5c
Merge pull request #11239 from JulianHolzwarth/esp32/freertos/fix/semaphoreTake
cpu/esp32/freertos: fix semaphore take
2019-07-31 11:01:41 +02:00
Gunar Schorcht
7962a0c179 cpu/esp32: activate cpp feature
Adds module pthread and the libstdc++ to linked libraries to solve the problem with unresolved symbols when feature cpp is required.
2019-07-29 16:06:04 +02:00
3da6593a54 esp32: define PERIPH_TIMER_PROVIDES_SET 2019-07-19 22:28:27 +02:00
Gaëtan Harter
90a9adbbda
cpu/esp*: append to FLASHDEPS
Append to FLASHDEPS instead of overwriting/lazy setting it.
2019-06-14 15:58:36 +02:00
Gunar Schorcht
98d64dafef
cpu/esp32: use FLASHFILE variable
Use ELFFILE as FLASHFILE as all files are created from this
one using esptool.
2019-06-06 14:59:24 +02:00
smlng
2de4b3011b periph_common: add as dependency to periph drivers
Rational: the periph_common module is required by (most) other periph drivers
and also during startup of the CPU/MCU to run periph_init. The latter is only
required if other periph drivers are used, hence periph_common should be a
depency of periph_* modules and *not* of the CPU/MCU. This PR fixes that
by making periph_common a depency of periph_* and removing the explicit
include in the CPU/MCU implementation.
2019-06-03 13:44:10 +02:00
Gaëtan Harter
79280eb12e
boards/tools: remove exporting PREFLASH/FLASHDEPS
PREFLASHER/PREFFLAGS/FLASHDEPS are evaluated by the main Makefile.include.
Their value does not need to be exported.

Testing
-------

`git diff --word-diff` only reports `export` being removed.

`git show --stat` reports `16 insertions(+), 16 deletions(-)`
Which is the same amount as lines that where matching
`export[[:blank::]]\+VARIABLE` plus the newline that is said to have
changed.
2019-05-28 09:58:40 +02:00
Gaëtan Harter
ac113ca2f8
boards/tools: remove exporting FLASHER/FFLAGS
FLASHER and FFLAGS are evaluated by the main Makefile.include or by file
included by it. Their value does not need to be exported.

This will also prevent evaluating 'PORT' for FFLAGS when not needed.

Testing
-------

`git diff --word-diff` only reports `export` being removed.

`git show --stat` reports `84 insertions(+), 84 deletions(-)`
Which is the same amount as lines that where matching
`export[[:blank::]]\+VARIABLE`.
2019-05-28 09:56:00 +02:00
Kevin "Bear Puncher" Weiss
e40f483acf
Merge pull request #11261 from gschorcht/cpu/esp32/doc_fix/rom
boards/cpu/esp32: doc fix of built-in ROM size
2019-05-14 13:07:50 +02:00
Leandro Lanzieri
44d981947d
Merge pull request #11293 from gschorcht/cpu/esp32/periph/conf/spi
boards/esp32: changes the approach for configurations of SPI interfaces in board definitions
2019-05-14 12:07:19 +02:00
Leandro Lanzieri
ab6d0fe08c
Merge pull request #11292 from gschorcht/cpu/esp32/periph/conf/pwm
boards/esp32: changes the approach for configurations of PWM channels in board definitions
2019-05-13 16:11:05 +02:00
Kevin "Bear Puncher" Weiss
6afb0603aa
Merge pull request #11291 from gschorcht/cpu/esp32/periph/conf/i2c
boards/esp32: changes the approach for configurations of I2C in board definitions
2019-05-09 08:26:01 -07:00
Kevin "Bear Puncher" Weiss
795ad18f2e
Merge pull request #11294 from gschorcht/cpu/esp32/periph/conf/uart
boards/esp32: changes the approach for configurations of UART interfaces in board definitions
2019-05-09 08:25:40 -07:00
Gunar Schorcht
3cb08e9e99 cpu/esp32: fixup after rebase 2019-05-06 13:34:59 +02:00
Gunar Schorcht
3e79787bcc cpu/esp32: UART configuration approach changed
UART devices are now configured using static array in header files instead of static variables in implementation to be able to define UART_NUMOF using the size of the array instead of a variable.
2019-05-06 13:34:59 +02:00
Gunar Schorcht
26613ee9e7 cpu/esp32: SPI configuration approach changed
SPI devices are now configured using static array in header files instead of static variables in implementation to be able to define SPI_NUMOF using the size of the array instead of a variable.
2019-05-06 13:33:48 +02:00
Gunar Schorcht
e8828aded8 cpu/esp32: PWM configuration approach changed
PWM channels are now configured using static array in header files instead of static variables in implementation.
2019-05-06 13:32:52 +02:00
Gunar Schorcht
748164ad6a cpu/esp32: I2C configuration approach changed
I2C devices are now configured using static array in header files instead of static variables in implementation to be able to define I2C_NUMOF using the size of the array instead of a variable.
2019-05-06 13:32:06 +02:00
Gunar Schorcht
0510f0c049 cpu/esp32: DAC config approach changed
DAC pins are now configured using static arrays in header files instead of static variables in implementation to be able to define DAC_NUMOF using the size of these arrays instead of a variable.
2019-05-06 13:29:38 +02:00
Gunar Schorcht
32d6c046ac cpu/esp32: ADC config approach changed
ADC pins are now configured using static arrays in header files instead of static variables in implementation to be able to define ADC_NUMOF using the size of these arrays instead of a variable.
2019-05-02 16:38:52 +02:00
Gunar Schorcht
e2abe00fad cpu/esp32: GPIO defs required for periph conf
The GPIO definitions defined here are required in this file to be able to use them in peripheral configurations.
2019-05-02 16:38:24 +02:00
Leandro Lanzieri
7c14ff4153
Merge pull request #11337 from gschorcht/cpu/esp32/periph/submodules
cpu/esp32: fix of periph_* submodule compilation
2019-05-01 23:51:03 +02:00
Gunar Schorcht
94a1af3001 cpu/esp32: additional module dependencies 2019-05-01 09:40:17 +02:00
Gunar Schorcht
6b76e64759 cpu/esp32: periph submodules enabled by default 2019-05-01 09:40:17 +02:00
Gunar Schorcht
4fa1d6bf2c cpu/esp32: dac_* moved to separate DAC submodule 2019-05-01 09:40:17 +02:00
Gunar Schorcht
5f79744aa4 cpu/esp32: rtcio_* moved to new submodule adc_ctrl 2019-05-01 09:40:17 +02:00
Gunar Schorcht
6a652513c1 cpu/esp32: new module for ADC controller functions
Functions that are used by ADC and DAC peripherals are moved to a new submodule periph_adc_ctrl. This is necessary to compile separate submodules for ADC and DAC.
2019-05-01 09:40:17 +02:00
Gunar Schorcht
09a2a11dd7 cpu/esp: fix computation of coprocessor save area
`top_of_stack` isn't aligned down to the previous 16 byte aligned address. Furthermore, `top_of_stack` as well as `XT_CP_SIZE` are used unaligned in `cpu/esp_common/vendor/xtensa/portasm.S` in the address computation for the coprocessor save area, .

Aligning pointer `p` down to the previous 16 byte aligned address results in a wrong address of the coprocessor save area during the initialization of the thread context. This leads to wrong values and wrong positions of these values in the coprocessor save area in inital thread context.

Since ESP8266 doesn't have a coprocessor, this bug affects only ESP32.
2019-04-27 13:23:04 +02:00
Gunar Schorcht
0911ddfe07
Merge pull request #11412 from yegorich/pr/esp32/documentation-fixes
esp32: documentation fixes
2019-04-25 17:39:07 +02:00
Yegor Yefremov
9fed14879a cpu/esp32: resolve esptool.py warning
During the flash step esptool.py gives the following warning:

WARNING: Flash size arguments in megabits like '16m' are deprecated.
Please use the equivalent size '2MB'.
Megabit arguments may be removed in a future release.
esptool.py v2.7-dev

This patch replaces '16m' with '2MB' to enable future compatibility.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-04-18 09:56:29 +02:00
Yegor Yefremov
29a3b25379 cpu/esp32: revise CAN support
CAN interface is now supported in RIOT. Change feature table
accordingly.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-04-17 16:59:39 +02:00
Gunar Schorcht
b17070fbf1 cpu/esp_common: doc fixes 2019-04-15 12:50:44 +02:00
Gunar Schorcht
18ebfdf059 cpu/esp32: move xtensa lib to esp_common 2019-04-15 11:45:59 +02:00
Gunar Schorcht
fe3d325fd9 cpu/esp32: remove temporary code 2019-04-15 11:45:59 +02:00
Gunar Schorcht
28d9599d52 cpu/esp32: fix coprocessor stack alignment 2019-04-15 11:45:59 +02:00
Gunar Schorcht
950dfba7de cpu/esp32: SDK_USED replace by MODULE_ESP_SDK 2019-04-15 11:45:59 +02:00
Gunar Schorcht
ec1980a438 cpu/esp32: RIOT_OS macro replaced by RIOT_VERSION 2019-04-15 11:45:59 +02:00
Gunar Schorcht
7cc1ee3f6d cpu/esp32: SDK_INT_HANDLING definition removed 2019-04-15 11:45:59 +02:00
Gunar Schorcht
dc4565fdfc cpu/esp32: use newlib_syscalls_default by default
Fix of #11354: Function '_write_r' of ESP32's newlibc does not write the output of function 'write(STDIO_FILENO, ...)' to the UART interface. To fix this problem, module 'newlib_syscalls_default' is now used by default. Function '_write_r' of module 'newlib_syscalls_default' uses 'stdio_write' which in turn uses 'uart_write' if module 'stdio_uart' is used which is now the default case for ESP32.
2019-04-11 16:22:47 +02:00
Gunar Schorcht
3bad3e6199 cpu/esp32: use periph.mk in perpih Makefile
Includes now $(RIOTMAKE)/periph.mk instead of $(RIOTBASE)/Makefile.include to control compilation of periph submodules.
2019-04-04 00:48:33 +02:00
Martine Lenders
af65d2da59
Merge pull request #11184 from gschorcht/cpu/esp32/esp_wifi/iol_len
cpu/esp32: esp_wifi doesn't call memcpy if iol_len is 0
2019-04-02 19:08:15 +02:00
Martine Lenders
2d906de873
Merge pull request #11186 from gschorcht/cpu/esp32/esp_eth/iol_len
cpu/esp32: esp_eth doesn't call memcpy if iol_len is 0
2019-04-02 17:51:26 +02:00
Gunar Schorcht
217ccbe1c4 cpu/esp32: add new uart_mode API function
The internal _uart_set_mode function is exposed if module periph_uart_modecfg is enabled.
2019-03-28 16:36:04 +01:00
Gunar Schorcht
ec013f74a7 cpu/esp32: add internal _uart_set_mode function
Configuration of UART mode is realized by an internal function which is also used by UART initialization function.
2019-03-28 16:36:04 +01:00
Gunar Schorcht
b9a8b98a9b cpu/esp32: add config member values for uart_mode
Set default values for additional data members of UART device configuration data structure that are needed by uart_mode API function.
2019-03-28 16:36:04 +01:00
Gunar Schorcht
6132c08a90 cpu/esp32: add config members for uart_mode
Add data members to the UART device configuration data structure that are needed by uart_mode API function.
2019-03-28 16:36:04 +01:00
JulianHolzwarth
e1d4551459 cpu/esp32/freertos/semphr.c::xSemaphoreTakeRecursive() return value fix
xSemaphoreTakeRecursive() returned before the fix: pdFALSE(equal to pdFAIL) when the call was successful in obtaining the semaphore
and pdTRUE(equal to pdPASS) when the call did not successfully obtain the semaphore.
According to freertos documentation:
"pdPASS Returned only if the call to xSemaphoreTakeRecursive() was successful in obtaining the semaphore"
"pdFAIL Returned if the call to xSemaphoreTakeRecursive() did not successfully obtain the semaphore."
Fixed it to return the correct value.
2019-03-27 15:54:30 +01:00
JulianHolzwarth
1b42d3ff86 cpu/esp32/freertos/semphr.c::xSemaphoreTake() return value fix
xSemaphoreTake() returned before the fix: pdFALSE(equal to pdFAIL) when the call was successful in obtaining the semaphore
and pdTRUE(equal to pdPASS) when the call did not successfully obtain the semaphore.
According to freertos documentation:
"pdPASS Returned only if the call to xSemaphoreTake() was successful in obtaining the semaphore"
"pdFAIL Returned if the call to xSemaphoreTake() did not successfully obtain the semaphore."
Fixed it to return the correct value.
2019-03-27 15:54:30 +01:00
Gunar Schorcht
c0f50104b9 cpu/esp32: GPIO init order for UART RX/TX changed
The GPIO for RX has to be initialized as input before the GPIO for TX can be initialized as output. Otherwise it could lead to creash if RX GPIO was used as output before.
2019-03-26 16:16:49 +01:00
Gunar Schorcht
b42106e738 cpu/esp32: required uart_set_baudrate changes
Function uart_set_baudrate which is only used internally was made static and renamed to _uart_set_baudrate to indicate that it is an internal function. Furthermore, an additional waiting for flushed TX FIFO added. The reconfiguration is now handled as critical section.
2019-03-26 09:57:44 +01:00
Gunar Schorcht
f5da4a1c9f cpu/esp32: internal uart int handler made static
The interrupt handler is only used internally and declared to be static.
2019-03-26 09:57:44 +01:00
Gunar Schorcht
9378888be6 cpu/esp32: some uart_* funcs moved inside the file
For consistency reasons, external functions were moved to the section of external functions.
2019-03-26 09:57:44 +01:00
Gunar Schorcht
de64d2e384 cpu/esp32: _uart_config function moved
For consistency reasons, internal function _uart_config was moved to the section of internal functions.
2019-03-26 09:57:44 +01:00
Gunar Schorcht
ec44ee7fb8 cpu/esp32: additional _ removed from __uart_*
An additional _ for static symbols has been added by mistake and should be removed. This will make future merging with the reimplementation of ESP8266 easier.
2019-03-26 08:14:00 +01:00
Gunar Schorcht
01d17793eb boards/cpu/esp32*: doc fix of built-in ROM size 2019-03-25 14:00:59 +01:00
Juan Carrano
6b766c3cd3 sys/posix: make posix module provide only headers.
The build system contains several instances of
 INCLUDES += -I$(RIOTBASE)/sys/posix/include

This is bypassing the module management system, by directly accesing
headers without depending on a module. The module is the posix module.

That line is also added when one of the posix_* modules is requested.

According to the docs, the posix module provides headers only, but in
reality there is also inet.c.

This patch:

- Moves `inet.c` into `posix_inet`, leaving `posix` as a headers-only
  module.
- Rename `posix` as `posix_headers` to make it clear the module only
  includes headers.
- Makes `posix_*` modules depend on `posix_headers`, thus removing the
  explicit `INCLUDES+=...` in `sys/Makefile.include`.
- Ocurrences of `INCLUDES+=...` are replaced by an explicit dependency
  on `posix_headers`.
2019-03-20 12:57:13 +01:00
Gunar Schorcht
06c59784b5 cpu/esp32: esp_eth doesn't call memcpy if iol_len is 0 2019-03-14 16:57:26 +01:00
Gunar Schorcht
ad57337c4e cpu/esp32: esp_wifi doesn't call memcpy if iol_len is 0 2019-03-14 16:11:24 +01:00
Gunar Schorcht
d9706d1cd5 cpu/esp32: GPIO macro cleanup in periph_cpu.h
The default macros GPIO_PIN and GPIO_UNDEF do not have to be overridden. The GPIO_PIN macro definition was even wrong for 40 GPIOs without splitting into ports, even if that did not lead to erroneous behavior.
2019-02-04 14:31:53 +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
5020c30970 cpu/esp32: fix of maximum frame length in esp_wifi
Since complete MAC frames are handled, ETHERNET_MAX_LEN has to be used instead of ETHERNET_DATA_LEN for buffer sizes and length checks.
2019-01-21 15:26:18 +01:00
Gunar Schorcht
676a615996 cpu/esp32: fix of maximum frame length in esp_eth
Since complete MAC frames are handled, ETHERNET_MAX_LEN has to be used instead of ETHERNET_DATA_LEN for buffer sizes and length checks.
2019-01-21 15:25:43 +01:00
Martine Lenders
f91f62155d
Merge pull request #10801 from gschorcht/esp32_fix_memset_opt
cpu/esp32: fixes the memset optimization problem in esp_wifi/wpa_supplicant
2019-01-18 22:31:42 +01:00
Gunar Schorcht
5bb05f0911 cpu/esp32: esp-wifi related doc changes 2019-01-17 17:10:43 +01:00
Gunar Schorcht
6a99e86b2f cpu/esp32: fix stability issues of esp_wifi
ESP-IDF heap handling has to be used for esp_wifi for stability reasons. Otherwise, heap is corrupted sporadically
2019-01-17 17:10:43 +01:00
Gunar Schorcht
f788928b27 cpu/esp32: fix esp_wifi stability issues
Fixes sporadic blocking of the wifi thread in esp_wifi_recv_cb function under heavy network load conditions when frames are coming in faster than they can be processed. Since esp_wifi_recv_cb function is not executed in interrupt context, the msg_send function used for ISR event can block when the message queue is full. With this change esp_wifi can be flooded with icmpv6 packets of maximum size without any problems over hours.
2019-01-17 17:10:43 +01:00
Gunar Schorcht
6caead7bbc cpu/esp32: esp-wifi related doc changes 2019-01-17 17:10:43 +01:00