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

31 lines
704 B
Makefile
Raw Normal View History

2018-09-05 02:39:50 +02:00
# additional modules dependencies
2019-12-12 13:46:20 +01:00
include $(RIOTCPU)/esp_common/Makefile.dep
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-05-01 15:39:25 +02:00
# Include ESP8266 RTOS SDK vendor package.
USEPKG += esp8266_sdk
USEMODULE += esp_idf_esp8266
USEMODULE += esp_idf_nvs_flash
USEMODULE += esp_idf_spi_flash
USEMODULE += esp_idf_util
USEMODULE += esp_idf_wpa_supplicant_crypto
USEMODULE += esp_sdk
USEMODULE += mtd
USEMODULE += periph_common
USEMODULE += ps
ifneq (,$(filter periph_i2c,$(USEMODULE)))
USEMODULE += esp_i2c_sw
USEMODULE += periph_i2c_sw
endif
ifneq (,$(filter periph_rtc,$(USEMODULE)))
USEMODULE += rtt_rtc
endif
ifneq (,$(filter esp_wifi_any,$(USEMODULE)))
# avoid that ztimer_periph_rtt is used as backend
USEMODULE += ztimer_no_periph_rtt
endif