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
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