mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
7b1f083cd8
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/ ```
24 lines
1.1 KiB
Makefile
24 lines
1.1 KiB
Makefile
# Directory with the SDK source checkout. Some modules in the cpu/esp8266 use
|
|
# internal parts of the SDK and for that they need access to the
|
|
# ESP8266_RTOS_SDK_DIR path.
|
|
export ESP8266_RTOS_SDK_DIR = $(PKGDIRBASE)/esp8266_sdk
|
|
|
|
# Directory where we built the modified libraries and headers.
|
|
ESP8266_SDK_BUILD_DIR ?= $(ESP8266_RTOS_SDK_DIR)/build-libs
|
|
|
|
INCLUDES += -I$(ESP8266_RTOS_SDK_DIR)/components/
|
|
INCLUDES += -I$(ESP8266_RTOS_SDK_DIR)/components/bootloader_support/include/
|
|
INCLUDES += -I$(ESP8266_RTOS_SDK_DIR)/components/esp8266/include
|
|
INCLUDES += -I$(ESP8266_RTOS_SDK_DIR)/components/esp8266/include/esp8266
|
|
INCLUDES += -I$(ESP8266_RTOS_SDK_DIR)/components/heap/include
|
|
INCLUDES += -I$(ESP8266_RTOS_SDK_DIR)/components/heap/port/esp8266/include
|
|
INCLUDES += -I$(ESP8266_RTOS_SDK_DIR)/components/nvs_flash/include
|
|
INCLUDES += -I$(ESP8266_RTOS_SDK_DIR)/components/spi_flash/include
|
|
INCLUDES += -I$(ESP8266_SDK_BUILD_DIR)
|
|
|
|
# Modified binary libraries are built here in the Makefile.
|
|
LINKFLAGS += -L$(ESP8266_SDK_BUILD_DIR)
|
|
|
|
# esp8266_sdk doesn't generate any .a
|
|
PSEUDOMODULES += esp8266_sdk
|