[riot-notifications] [RIOT-OS/RIOT] esp8266: Download Espressif RTOS SDK as a new RIOT PKG (#16425)

Gunar Schorcht notifications at github.com
Sun May 2 10:34:09 CEST 2021


@gschorcht commented on this pull request.

In a second step, the SDK should then also be removed from `riotdocker` as soon as this PR is part of the official release. However, the question then is how do we deal with older RIOT releases. As far as I know, we still don`t have a riotdocker versioning that is compatible with RIOT versioning.

> @@ -0,0 +1,40 @@
+PKG_NAME=esp8266_sdk
+PKG_URL=https://github.com/espressif/ESP8266_RTOS_SDK
+# This is a version in the v3.1 release branch, between 3.1 and 3.1.1.
+PKG_VERSION=913a06a9ac3b2f18009e8fee8f092ca9ffeccd38
+PKG_LICENSE=Apache-2.0
+
+include $(RIOTBASE)/pkg/pkg.mk
+
+ifneq ($(CPU),esp8266)
+  $(error This package can only be used with the ESP8266 CPU)
+endif
+
+# This directory is shared across all apps since there's no need to replicate
+# these libraries on each app.
+ESP_SDK_BUILD_DIR = $(PKG_SOURCE_DIR)/build-libs

I'm wondering whether it would make sense to keep this variable overridable.
```suggestion
ESP_SDK_BUILD_DIR ?= $(PKG_SOURCE_DIR)/build-libs
```
This might be helpful during development work when upgrading the RIOT port to a newer SDK version.

> +  libcore.a libespnow.a libgcc.a libhal.a libnet80211.a libphy.a libpp.a \
+  libsmartconfig.a libssc.a libwpa.a libwps.a
+
+ESP_SDK_LIBS = $(addprefix $(ESP_SDK_BUILD_DIR)/, $(ESP_SDK_COMPONENT_LIBS))
+
+all: $(ESP_SDK_LIBS) $(ESP_SDK_BUILD_DIR)/esp8266_idf_version.h
+
+$(ESP_SDK_BUILD_DIR):
+	$(Q)mkdir -p $(ESP_SDK_BUILD_DIR)
+
+# Set the SDK version from the SDK hash/tag. For example "v3.1-51-g913a06a9".
+$(ESP_SDK_BUILD_DIR)/esp8266_idf_version.h: | $(ESP_SDK_BUILD_DIR)
+	$(Q)echo "#define IDF_VER \"$(shell git -C $(PKG_SOURCE_DIR) describe --tags)\"" \
+	  > $@
+
+$(ESP_SDK_BUILD_DIR)/lib%.a: $(PKG_SOURCE_DIR)/components/esp8266/lib/lib%.a | $(ESP_SDK_BUILD_DIR)

:+1: nice solution

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16425#pullrequestreview-649891025
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210502/cdedbe54/attachment.htm>


More information about the notifications mailing list