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

400 Commits

Author SHA1 Message Date
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
Benjamin Valentin
6d42c9fcfe cpu: make newlib_nano a DEFAULT_MODULE
This allows to disable nanospecs with

    DISABLE_MODULE += newlib_nano

if a full-features version of newlib is desired.
2021-05-04 12:12:36 +02:00
Benjamin Valentin
d47a880915 cpu: add periph_rtt_overflow feature
The RTT overflow callback is not available on all RTT implementations.
This means it is either a no-op or `rtt_set_overflow_cb()` is a no-op
or it will overwrite the alarm set with `rtt_set_alarm()`.

This adds a feature to indicate that proper overflow reporting is available.
2021-04-30 11:58:00 +02:00
Francisco Molina
5ae5c40f26
cpu/esp*: add CLOCK_CORECLOCK 2021-04-21 08:54:43 +02:00
Marian Buschsieweke
ab89234040
drivers/periph/rtt: add periph_rtt_set_counter feature
Some periph_rtt implementations do not provide `rtt_set_counter()`. This
adds `periph_rtt_set_counter` as feature to allow testing for its
availability. The feature is provided at CPU level if periph_rtt is
provided by the board for all CPUs implementing `rtt_set_counter()`.
2021-03-08 14:16:46 +01:00
Marian Buschsieweke
b9cb75fedf
drivers/periph/rtt: add periph_rtt_set_counter feature
Some periph_rtt implementations do not provide `rtt_set_counter()`. This
adds `periph_rtt_set_counter` as feature to allow testing for its
availability. The feature is provided at CPU level if periph_rtt is
provided by the board for all CPUs implementing `rtt_set_counter()`.
2021-03-04 18:05:06 +01:00
Erik Ekman
95196fb7e4 esp32/eth: Don't overwrite queued event with RX packet
If there is an event to be handled by _esp_eth_isr(), don't
overwrite it if a new packet has been received.

In my testing, all SYSTEM_EVENT_ETH_CONNECTED events except the first
are immediately followed by at least one SYSTEM_EVENT_ETH_RX_DONE event.
This causes the SYSTEM_EVENT_ETH_CONNECTED to not get handled, and the
IP stack will not be notified of the new link state.

Protect the other events by dropping the packet instead. If an earlier
unhandled SYSTEM_EVENT_ETH_RX_DONE event exists, overwrite it with the
newer packet.

I only saw this happen with lwIP and not with GNRC - I am not sure why.
But it still is a race waiting to happen. The nice long term solution
is probably to have a queue of unhandled events, allowing them all to
be processed once there is time.
2021-02-24 01:20:43 +01:00
430770886b
make/esptool: fix FFLAGS inclusion order for qemu 2021-02-22 10:35:38 +01:00
858b5ca6ed xfa: remove obsolete empty xfa.ld 2021-02-18 10:46:08 +01:00
2474fa7af5 cpu/esp32: add XFA support 2021-02-18 10:46:08 +01:00
Benjamin Valentin
9c1455d55f cpu: make pm_layered a DEFAULT_MODULE
Allow to disable pm_layered in the bootloader to save some ROM.
2021-01-27 13:21:20 +01:00
Francisco Molina
63a2a6ce1b
treewide: model newlib as a FEATURE 2021-01-27 09:24:25 +01:00
Erik Ekman
1d6aa2e865 cpu/esp32: Add newline to emac_main debug prints 2021-01-21 20:55:02 +01:00
189f7d862d
cpu/esp32: fix typo in timer documentation 2021-01-08 12:04:24 +01:00
b4458e73f2
cpu/esp32: fix typo in Doxygen comment
depenend => depend
2021-01-08 10:15:32 +01:00
Erik Ekman
2afa93c9f7 boards/esp32-ethernet-kit: Setup Kconfig to match makefiles 2020-11-28 10:18:54 +01:00
Erik Ekman
064f58e7aa boards/esp32: add ESP32-Ethernet-Kit v1.2 board 2020-11-28 10:18:54 +01:00
Erik Ekman
db91be6ef8 cpu/esp32: add esp_jtag pseudomodule and feature
Available on esp32-wrover-kit and esp32-ethernet-kit boards.
2020-11-28 10:18:54 +01:00
Erik Ekman
e3142c39f0 boards/esp32: add ESP32-Ethernet-Kit board
Mostly copied from esp32-wroom-kit and Ethernet part from
esp32-olimex-evb.

Ethernet and serial port has been tested (on v1.2 board).
2020-11-28 10:18:54 +01:00
Erik Ekman
f28de6a544 cpu/esp32: add support for IP101G Ethernet phy
As used in ESP32-Ethernet-Kit board:
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/esp32/get-started-ethernet-kit.html

Inspired by existing code for lan8720 PHY as well as latest ESP32 code:
https://github.com/espressif/esp-idf/blob/master/components/esp_eth/src/esp_eth_phy_ip101.c

Phy datasheet available: http://www.bdtic.com/ICplus/IP101G.html
2020-11-28 10:15:14 +01:00
Bas Stottelaar
94171b7389 cpu/*: replace #if ENABLE_DEBUG with IS_ACTIVE 2020-11-02 21:34:12 +01:00
Marian Buschsieweke
125c892c03
drivers/periph/timer: Use uint32_t for frequency
For all currently supported platforms `unsigned long` is 32 bit in width. But
better use `uint32_t` to be safe.
2020-10-30 22:02: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
ab6188cea3 cpu/*: add missing include of assert.h 2020-10-22 11:13:08 +02:00
Leandro Lanzieri
837ddf6d8c
cpu/esp32/ld: use folder name instead of archive for module objects 2020-10-09 13:29:51 +02:00
Vincent Dupont
c498bbdc83 esp32/can: include can_esp.h from periph_cpu.h 2020-09-30 12:59:03 +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
Cenk Gündoğan
0d0bc91553
Merge pull request #14754 from leandrolanzieri/pr/no_archives
build system: link object files
2020-09-10 09:36:29 +02:00
Marian Buschsieweke
7c1949341e
build system: Overwrite TARGET_ARCH per arch
Add `TARGET_ARCH_<ARCH>` for each architecture (e.g. `TARGET_ARCH_CORTEX` for
Cortex M) to allow users to overwrite the target triple for a specific arch
from ~/.profile or ~/.bashrc (or the like) without overwriting it for all others
as well.
2020-09-08 22:28:41 +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
benpicco
a455d74621
Merge pull request #14729 from gschorcht/cpu/esp32/vendor_dependeny_boarddir
cpu/esp32: remove the dependency of vendor code on BOARDDIR
2020-08-07 17:03:40 +02:00
Gunar Schorcht
d19a1f5af5 cpu/esp32: remove the dependency of vendor code on BOARDDIR 2020-08-07 16:09:12 +02:00
Gunar Schorcht
2ed4486f21 cpu/esp32: cleanup of C++ hacks
Since former ESP32 toolchain versions used POSIX threads, module `pthread` was required. The built-in `cxa_ctor_guards` had to be replaced since they used the `pthread_once` function for singleton objects initialization where the parameter `once` was of incompatible type with that provided by RIOT's `pthread` module. The current ESP32 toolchain version no longer uses POSIX threads. The dependency on module `pthread` as well as according C++ hacks can be removed.
2020-07-29 10:14:57 +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
benpicco
63a0014456
Merge pull request #14467 from benpicco/fix_file_permission
treewide: fix file permissions
2020-07-08 18:30:01 +02:00
Benjamin Valentin
9d836888c2 treewide: fix file permissions
C files should not be executable.
2020-07-08 17:32:36 +02:00
Leandro Lanzieri
0b0a03bef9
cpu/esp32: Add Kconfig symbols 2020-07-07 16:27:35 +02:00
Francisco Molina
e98341da93
Makefile: use normal conditionals 2020-06-29 22:40:29 +02:00
Benjamin Valentin
5da1a9e577 cpu/esp*: use TIMER_CHANNEL_NUMOF 2020-06-24 00:45:35 +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
3b0510f9bc
Merge pull request #14077 from maribu/esp32-external-board
cpu/esp*: Allow compilation with external boards
2020-05-14 21:16:54 +02:00
Francisco
1f9d299492
Merge pull request #13196 from HendrikVE/shell-readline-refactor
sys/shell: refactor readline function
2020-05-14 15:32:45 +02:00
Marian Buschsieweke
1dbcdd3d4b
cpu/esp32: Allow compilation with external boards
Replace `$(RIOTBOARD)/$(BOARD)` with `$(BOARDDIR)`, which also works for
external boards.
2020-05-14 13:32:19 +02:00
Francisco Molina
bd3eff3537 cpu/esp32: switch from O2 to Os
In #12955 optimization was switched to O2 because with the '-Os'
option, the ESP32 hangs sporadically in 'tests/bench*' if
interrupts where disabled too early by benchmark tests.

Since it hasn't been reproduced since and in #13196 O2 was causing
un-explained hardfaults, since the aforementioned issue could not
be reproduced we switch back to Os by removing O2, as Os will be
used by default.
2020-05-06 18:46:43 +02:00
Martine Lenders
ad89680c40
Merge pull request #14004 from gschorcht/cpu/esp32/fix_newlib_nano_printf_float
cpu/esp32: fix printf for float with newlib-nano
2020-05-02 20:43:00 +02:00
Gunar Schorcht
5fbf74b203 cpu/esp32: fix printf for float with newlib-nano 2020-05-02 16:56:29 +02:00