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

iosabi notifications at github.com
Sun May 2 15:40:17 CEST 2021


@iosabi commented on this pull request.



> @@ -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

This being a pkg Makefile means that you can't override it with a `ESP_SDK_BUILD_DIR = /some/path/` in your app Makefile unless that's also `export`ed to the submake. However, if this is for development you can call `make ESP_SDK_BUILD_DIR=/some/path` (with the assignment as a make parameter) and that would override this anyway everywhere.

I renamed this to `ESP8266_SDK_BUILD_DIR` and made it a bit more public adding it to the Makefile.include file with a `?=` there. So:

 *  calling `make ESP8266_SDK_BUILD_DIR=$(pwd)/mytestdir` builds the libraries into `mytestdir` instead of the default `build/pkg/esp8266_sdk/build-libs` and also uses that directory as the source.
 * If instead you call `ESP8266_SDK_BUILD_DIR=$(pwd)/mytestdir make` (with the value in ENV instead of a make arg) this will be ignored by the submake because of the `=` but it won't be ignored by the top level make which uses `?=` from the `Makefile.include`.
 
Does this fit your use case? I'm assuming you want to play with symbol renaming in new libs manually and feed those to the link stage of the app. I would personally do that by adding entries to the `symbol_renames.txt` file but that works too.


-- 
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#discussion_r624696935
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210502/010b35fc/attachment.htm>


More information about the notifications mailing list