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

41 Commits

Author SHA1 Message Date
Marian Buschsieweke
d31b1f4854
cpu/esp32: disable -Wcast-align for vendor code 2021-12-03 10:12:32 +01:00
Gunar Schorcht
09c0341442 cpu/esp32: fix esp_wifi_enterprise compilation problem
With the change from using archive files to using object files in PR #14754, the module `esp_wifi_enterprise` was no longer compilable. The reason for this was that the file `bignum.c` was present in two different vendor sub-directories and created two identical object files, which then led to a symbol conflict when linking. This commit removes one of these identical files. The one that is used in all `esp_wifi` variants is kept, the one that is only used in `esp_wifi_enterprise` is dropped.
2021-12-01 11:25:57 +01: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
Erik Ekman
1d6aa2e865 cpu/esp32: Add newline to emac_main debug prints 2021-01-21 20:55:02 +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
22243aec7a cpu/*: realign ENABLE_DEBUG 2020-10-23 00:46:26 +02:00
Gunar Schorcht
d19a1f5af5 cpu/esp32: remove the dependency of vendor code on BOARDDIR 2020-08-07 16:09:12 +02:00
Benjamin Valentin
9d836888c2 treewide: fix file permissions
C files should not be executable.
2020-07-08 17:32:36 +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
Gunar Schorcht
0e7eb48d6a cpu/esp32: use RTT instead of RTC in pm_layered 2020-04-07 09:12:44 +02: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
a7652df499 cpu/esp32: function to set gpio drive strength 2020-03-23 12:25:47 +01:00
Gunar Schorcht
3faf99a894 cpu/esp32: add vendor files for light/deep sleep 2020-03-23 12:25:47 +01:00
Gunar Schorcht
ae647ed95f cpu/esp32/esp_wifi: Makefile integration for WPA2 Enterprise mode 2020-03-17 17:51:29 +01:00
Gunar Schorcht
817446ae54 cpu/esp32/esp_wifi: enable crypto functions for WPA2 Enterprise 2020-02-23 10:09:48 +01:00
Gunar Schorcht
3d1a895c5b cpu/esp32/esp_wifi: wpa_supplicant files for WPA2 Enterprise mode
Add all files of wpa_supplicant from ESP32 SDK that are required for WPA2 Enterprise mode.
2020-02-23 10:09:48 +01:00
Gunar Schorcht
202758f400 cpu/esp32/esp_wifi: changes for wpa_supplicant in WPA2 Enterprise mode
`nvs_flash` functions have to be set to 0 if module `esp_idf_nvs_flash` is not enabled. Otherwise wpa_supplicant will crash in WPA2 Enterprise mode.
2020-02-23 10:09:48 +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
20835aecd9 cpu/esp32: fix compilation when esp_gdb is enabled 2020-01-16 14:27:18 +01:00
Gunar Schorcht
53139c067c cpu/esp32: make the level for wifi log outputs settable 2019-12-20 17:58:58 +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
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
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
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
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
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
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
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
6c61b69164 cpu/esp32: os_memset redefinition
os_memset uses system_secure_memset.
2019-01-17 13:52:22 +01:00
Schorcht
16f0bf4fdc cpu/esp32: fixes compile problems 2018-11-10 14:14:49 +01:00
Jens Alfke
ce1fe776cf cpu/esp32: allow explicit ESP32 crystal freq configuration
Some ESP32 boards (like my SparkFun ESP32 Thing) have a main clock
crystal that runs at 26MHz, not 40MHz. RIOT appears to assume 40MHz.
The mismatch causes the UART to not sync properly, resulting in
garbage written to the terminal instead of log output.

I’ve added:

* A new board configuration constant ESP32_XTAL_FREQ that defaults
  to 40, but can be overridden by a board def or at build time to
  force a specific value (i.e. 26).
* Some code spliced into system_clk_init() to check this constant and
  call rtc_clk_init() to set the correct frequency.
* A copy of the rtf_clk_init() function from the ESP-IDF sources.

Fixes #10272
2018-10-30 16:42:07 -07:00
Schorcht
32e602680b cpu: add esp32 vendor files 2018-10-08 12:20:49 +02:00