-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pkg/esp32_sdk: add ESP32 SDK without libraries as package
The vendor binary libraries of ESP-IDF are provided as a separate GIT repository. These libraries are defined as separate package for two reasons: 1. RIOT packages don't support to clone GIT repositories recursively; 2. ESP-IDF pulls a lot of other GIT repositories that are not needed when it is cloned recursively.
- Loading branch information
Showing
11 changed files
with
89 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Copyright (c) 2021 Gunar Schorcht | ||
# | ||
# This file is subject to the terms and conditions of the GNU Lesser | ||
# General Public License v2.1. See the file LICENSE in the top level | ||
# directory for more details. | ||
# | ||
|
||
config PACKAGE_ESP32_SDK | ||
bool "ESP32 SDK for the ESP32 MCU support" | ||
depends on TEST_KCONFIG | ||
depends on HAS_ARCH_ESP32 | ||
help | ||
Vendor SDK without libraries for ESP32 MCU support by Espressif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
PKG_NAME=esp32_sdk | ||
PKG_URL=https://github.com/espressif/esp-idf | ||
# This is a version in the v3.1 beta1 release branch | ||
PKG_VERSION=f198339ec09e90666150672884535802304d23ec | ||
PKG_LICENSE=Apache-2.0 | ||
|
||
include $(RIOTBASE)/pkg/pkg.mk | ||
|
||
# This directory is shared across all apps since there's no need to replicate | ||
# these libraries on each app. | ||
ESP32_SDK_BUILD_DIR = $(PKG_SOURCE_DIR)/build-libs | ||
ESP32_SDK_VER_FILE = $(PKG_SOURCE_DIR)/components/esp32_idf_version.h | ||
ESP32_SDK_VER_CMD = $(shell git -C $(PKG_SOURCE_DIR) describe --tags $(PKG_VERSION)) | ||
|
||
# We need to place all binary libraries shipped with the SDK in a common | ||
# directory. | ||
ESP32_SDK_COMPONENT_LIBS = libhal.a | ||
|
||
ESP32_SDK_LIBS = $(addprefix $(ESP32_SDK_BUILD_DIR)/, $(ESP32_SDK_COMPONENT_LIBS)) | ||
|
||
all: $(ESP32_SDK_LIBS) $(ESP32_SDK_VER_FILE) | ||
|
||
$(ESP32_SDK_BUILD_DIR): | ||
$(Q)mkdir -p $(ESP32_SDK_BUILD_DIR) | ||
|
||
# Set the SDK version from the SDK hash/tag. For example "v3.1-51-g913a06a9". | ||
$(ESP32_SDK_VER_FILE): | ||
$(Q)echo "#define IDF_VER \"$(ESP32_SDK_VER_CMD)\"" > $@ | ||
|
||
$(ESP32_SDK_BUILD_DIR)/lib%.a: \ | ||
$(PKG_SOURCE_DIR)/components/esp32/lib%.a | $(ESP32_SDK_BUILD_DIR) | ||
$(Q)cp $? $(ESP32_SDK_BUILD_DIR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# This package can only be used with the ESP32 CPU | ||
FEATURES_REQUIRED += arch_esp32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Directory with the SDK source checkout. Some modules in the cpu/esp32 use | ||
# internal parts of the SDK and for that they need access to the | ||
# ESP32_SDK_DIR path. | ||
export ESP32_SDK_DIR = $(PKGDIRBASE)/esp32_sdk | ||
|
||
# Directory where we built the modified libraries and headers. | ||
ESP32_SDK_BUILD_DIR ?= $(ESP32_SDK_DIR)/build-libs | ||
|
||
INCLUDES += -I$(ESP32_SDK_DIR)/components | ||
INCLUDES += -I$(ESP32_SDK_DIR)/components/driver/include | ||
INCLUDES += -I$(ESP32_SDK_DIR)/components/esp32/include | ||
INCLUDES += -I$(ESP32_SDK_DIR)/components/heap/include | ||
INCLUDES += -I$(ESP32_SDK_DIR)/components/soc/esp32/include | ||
INCLUDES += -I$(ESP32_SDK_DIR)/components/soc/include | ||
|
||
ifneq (,$(filter esp_eth,$(USEMODULE))) | ||
INCLUDES += -I$(ESP32_SDK_DIR)/components/ethernet/include | ||
endif | ||
|
||
# Modified binary libraries are built here in the Makefile. | ||
LINKFLAGS += -L$(ESP32_SDK_BUILD_DIR) | ||
|
||
# esp32_sdk doesn't generate any .a | ||
PSEUDOMODULES += esp32_sdk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** | ||
* @defgroup pkg_esp32_sdk ESP32 SDK for the ESP32 MCU support | ||
* @ingroup pkg | ||
* @brief Vendor SDK without libraries for ESP32 MCU support by Espressif | ||
* @see https://github.com/espressif/esp-idf | ||
*/ |