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

pkg/esp32_sdk_libs: add ESP SDK 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.
This commit is contained in:
Gunar Schorcht 2021-12-30 10:27:28 +01:00
parent f9105c3cc1
commit 81727fb1f1
8 changed files with 77 additions and 0 deletions

View File

@ -19,6 +19,7 @@ config CPU_FAM_ESP32
select HAS_PERIPH_ADC_CTRL
select PACKAGE_ESP32_SDK if TEST_KCONFIG
select PACKAGE_ESP32_SDK_LIBS if TEST_KCONFIG
select MODULE_PERIPH_RTT if HAS_PERIPH_RTT && MODULE_PM_LAYERED
select MODULE_RTT_RTC if HAS_PERIPH_RTT && MODULE_PERIPH_RTC
select MODULE_PS if MODULE_SHELL

View File

@ -3,6 +3,8 @@
include $(RIOTCPU)/esp_common/Makefile.dep
USEPKG += esp32_sdk
USEPKG += esp32_sdk_libs
USEMODULE += esp_idf_driver
USEMODULE += esp_idf_esp32
USEMODULE += esp_idf_soc

View File

@ -18,6 +18,7 @@ rsource "driver_sx126x/Kconfig"
rsource "elk/Kconfig"
rsource "emlearn/Kconfig"
rsource "esp32_sdk/Kconfig"
rsource "esp32_sdk_libs/Kconfig"
rsource "esp8266_sdk/Kconfig"
rsource "fff/Kconfig"
rsource "gecko_sdk/Kconfig"

View File

@ -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_LIBS
bool "ESP32 SDK libraries for the ESP32 MCU support"
depends on TEST_KCONFIG
depends on HAS_ARCH_ESP32
help
Vendor SDK libraries for ESP32 MCU support by Espressif

View File

@ -0,0 +1,39 @@
PKG_NAME=esp32_sdk_libs
PKG_URL=https://github.com/espressif/esp32-wifi-lib
# This is a version in the v3.1 beta1 release branch
PKG_VERSION=534a9b14101af90231d40a4f94924d67bc848d5f
PKG_LICENSE=Apache-2.0
include $(RIOTBASE)/pkg/pkg.mk
ESP32_SDK_DIR = $(PKGDIRBASE)/esp32_sdk
# Directory where we place the libraries and headers.
ESP32_SDK_BUILD_DIR = $(ESP32_SDK_DIR)/build-libs
# We need to place all binary libraries shipped with the SDK in a common
# directory.
ESP32_SDK_COMPONENT_LIBS = \
libcoexist.a \
libcore.a \
libespnow.a \
libmesh.a \
libnet80211.a \
libphy.a \
libpp.a \
librtc.a \
libsmartconfig.a \
libwpa.a \
libwpa2.a \
libwps.a
ESP32_SDK_LIBS = $(addprefix $(ESP32_SDK_BUILD_DIR)/, $(ESP32_SDK_COMPONENT_LIBS))
all: $(ESP32_SDK_LIBS)
$(ESP32_SDK_BUILD_DIR):
$(Q)mkdir -p $(ESP32_SDK_BUILD_DIR)
$(ESP32_SDK_BUILD_DIR)/lib%.a: \
$(PKG_SOURCE_DIR)/lib%.a | $(ESP32_SDK_BUILD_DIR)
$(Q)cp $? $(ESP32_SDK_BUILD_DIR)

View File

@ -0,0 +1,2 @@
# This package can only be used with the ESP32 CPU
FEATURES_REQUIRED += arch_esp32

View File

@ -0,0 +1,13 @@
# 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
# Modified binary libraries are built here in the Makefile.
LINKFLAGS += -L$(ESP32_SDK_BUILD_DIR)
# esp32_sdk_libs doesn't generate any .a
PSEUDOMODULES += esp32_sdk_libs

View File

@ -0,0 +1,6 @@
/**
* @defgroup pkg_esp32_sdk_libs ESP32 SDK libraries for the ESP32 MCU support
* @ingroup pkg_esp32_sdk
* @brief Vendor SDK libraries for ESP32 MCU support by Espressif
* @see https://github.com/espressif/esp32-wifi-lib
*/