mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #17455 from gschorcht/cpu/esp32/sdk-as-package
cpu/esp32: download Espressif SDK ESP-IDF as package
This commit is contained in:
commit
c18f1c2a9b
@ -18,6 +18,8 @@ config CPU_FAM_ESP32
|
||||
select HAS_ESP_WIFI_ENTERPRISE
|
||||
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
|
||||
|
@ -2,6 +2,9 @@
|
||||
|
||||
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
|
||||
|
@ -1,12 +1,3 @@
|
||||
# check some environment variables first
|
||||
ifndef ESP32_SDK_DIR
|
||||
$(info ESP32_SDK_DIR should be defined as /path/to/esp-idf directory)
|
||||
$(info ESP32_SDK_DIR is set by default to /opt/esp/esp-idf)
|
||||
export ESP32_SDK_DIR=/opt/esp/esp-idf
|
||||
endif
|
||||
|
||||
ESP_SDK_DIR = $(ESP32_SDK_DIR)
|
||||
|
||||
# ESP32 specific flashing options
|
||||
FLASH_CHIP = esp32
|
||||
FLASH_MODE ?= dout
|
||||
@ -35,17 +26,10 @@ INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/esp32
|
||||
INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/heap
|
||||
INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/spi_flash
|
||||
INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/tcpip_adapter
|
||||
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
|
||||
INCLUDES += -I$(RIOTCPU)/$(CPU)
|
||||
|
||||
ifneq (,$(filter esp_eth,$(USEMODULE)))
|
||||
INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/ethernet
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/ethernet/include
|
||||
endif
|
||||
|
||||
CFLAGS += -DSDK_NOT_USED -DCONFIG_FREERTOS_UNICORE=1 -DESP_PLATFORM
|
||||
|
@ -408,31 +408,13 @@ export PATH=$PATH:$HOME/esp/xtensa-esp32-elf/bin
|
||||
|
||||
[Back to table of contents](#esp32_toc)
|
||||
|
||||
### Installation of ESP-IDF (Espressif IoT Development Framework) {#esp32_installation_of_esp_idf}
|
||||
### ESP-IDF (Espressif IoT Development Framework) {#esp32_installation_of_esp_idf}
|
||||
|
||||
ESP-IDF, the official SDK from Espressif, can be downloaded and installed as GIT repository.
|
||||
RIOT-OS uses the ESP-IDF, the official SDK from Espressif, as part of the
|
||||
build. It is downloaded as a package at build-time and there is no need to
|
||||
install it separately.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
cd $HOME/esp
|
||||
git clone https://github.com/espressif/esp-idf.git
|
||||
cd esp-idf
|
||||
git checkout f198339ec09e90666150672884535802304d23ec
|
||||
git submodule init
|
||||
git submodule update
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@note Please take care to checkout correct branches which were used for the port. Newer versions
|
||||
might also work but were not tested.
|
||||
|
||||
Since we only use a few header files, ESP-IDF does not need to be compiled in any way. To use the
|
||||
installed ESP-IDF, just set the variable `ESP32_SDK_DIR` accordingly.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
export ESP32_SDK_DIR=$HOME/esp/esp-idf
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
[Back to table of contents](#esp32_toc)
|
||||
|
||||
### Installation of esptool.py (ESP flash programmer tool) {#esp32_installation_of_esptool}
|
||||
### Installation of `esptool.py` (ESP flash programmer tool) {#esp32_installation_of_esptool}
|
||||
|
||||
The RIOT port does not work with the `esptool.py` ESP flasher program
|
||||
available on [GitHub](https://github.com/espressif/esptool) or
|
||||
|
@ -28,6 +28,15 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief SDK version number
|
||||
*
|
||||
* Determined with `git describe --tags` in `$ESP32_SDK_DIR`
|
||||
*/
|
||||
#if !defined(IDF_VER) || DOXYGEN
|
||||
#include "esp32_idf_version.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @name Clock configuration
|
||||
* @{
|
||||
|
@ -156,6 +156,9 @@ NORETURN void IRAM call_start_cpu0 (void)
|
||||
ets_printf("%02x", cpu_id[i]);
|
||||
}
|
||||
ets_printf("\n");
|
||||
|
||||
extern char* esp_get_idf_version(void);
|
||||
LOG_STARTUP("ESP-IDF SDK Version %s\n\n", esp_get_idf_version());
|
||||
#endif
|
||||
|
||||
if (reset_reason == DEEPSLEEP_RESET) {
|
||||
|
5
cpu/esp32/vendor/esp-idf/esp_funcs.c
vendored
5
cpu/esp32/vendor/esp-idf/esp_funcs.c
vendored
@ -482,6 +482,11 @@ void IRAM_ATTR esp_restart_noos(void)
|
||||
}
|
||||
}
|
||||
|
||||
const char* esp_get_idf_version(void)
|
||||
{
|
||||
return IDF_VER;
|
||||
}
|
||||
|
||||
/*
|
||||
* source: /path/to/esp-idf/components/wpa_supplicant/port/os_xtensa.c
|
||||
*/
|
||||
|
@ -4,13 +4,13 @@ include $(RIOTBASE)/Makefile.base
|
||||
|
||||
# we have to do it in that way to avoid that $(RIOTBASE)/sys/include/crypto
|
||||
# is found first
|
||||
INCLUDES = -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/port/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/port/include
|
||||
PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/port/include
|
||||
PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/include
|
||||
PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/port/include
|
||||
CFLAGS += -D__ets__
|
||||
|
||||
include $(RIOTCPU)/$(CPU)/Makefile.include
|
||||
|
||||
INCLUDES += -I$(RIOTBASE)/core/include
|
||||
INCLUDES += -I$(RIOTBASE)/drivers/include
|
||||
INCLUDES += -I$(RIOTCPU)/$(CPU)/include
|
||||
# This converts INCLUDES to a simply evaluated variable instead of a recursively
|
||||
# one but only for this module.
|
||||
INCLUDES := $(PRE_INCLUDES) $(INCLUDES)
|
||||
|
@ -4,15 +4,16 @@ include $(RIOTBASE)/Makefile.base
|
||||
|
||||
# we have to do it in that way to avoid that $(RIOTBASE)/sys/include/crypto
|
||||
# is found first
|
||||
INCLUDES = -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include
|
||||
INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include/wpa
|
||||
INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/port/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/port/include
|
||||
PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/log
|
||||
PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include
|
||||
PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include/wpa
|
||||
PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/port/include
|
||||
PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/include
|
||||
PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/port/include
|
||||
CFLAGS += -D__ets__ -DESPRESSIF_USE -DESP32_IDF_CODE=1
|
||||
|
||||
include $(RIOTCPU)/$(CPU)/Makefile.include
|
||||
|
||||
INCLUDES += -I$(RIOTBASE)/core/include
|
||||
INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/log
|
||||
INCLUDES += -I$(RIOTCPU)/$(CPU)/include
|
||||
# This converts INCLUDES to a simply evaluated variable instead of a recursively
|
||||
# one but only for this module.
|
||||
INCLUDES := $(PRE_INCLUDES) $(INCLUDES)
|
||||
|
@ -4,16 +4,17 @@ include $(RIOTBASE)/Makefile.base
|
||||
|
||||
# we have to do it in that way to avoid that $(RIOTBASE)/sys/include/crypto
|
||||
# is found first
|
||||
INCLUDES = -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include
|
||||
INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include/wpa
|
||||
INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/port/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/port/include
|
||||
PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/log
|
||||
PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include
|
||||
PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include/wpa
|
||||
PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/port/include
|
||||
PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/include
|
||||
PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/port/include
|
||||
CFLAGS += -D__ets__ -DESPRESSIF_USE -DESP32_IDF_CODE=1
|
||||
CFLAGS += -DEAP_PEER_METHOD -DEAP_TLS -DEAP_PEAP -DEAP_TTLS -DEAP_MSCHAPv2 -DUSE_WPA2_TASK
|
||||
|
||||
include $(RIOTCPU)/$(CPU)/Makefile.include
|
||||
|
||||
INCLUDES += -I$(RIOTBASE)/core/include
|
||||
INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/log
|
||||
INCLUDES += -I$(RIOTCPU)/$(CPU)/include
|
||||
# This converts INCLUDES to a simply evaluated variable instead of a recursively
|
||||
# one but only for this module.
|
||||
INCLUDES := $(PRE_INCLUDES) $(INCLUDES)
|
||||
|
@ -4,15 +4,16 @@ include $(RIOTBASE)/Makefile.base
|
||||
|
||||
# we have to do it in that way to avoid that $(RIOTBASE)/sys/include/crypto
|
||||
# is found first
|
||||
INCLUDES = -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include
|
||||
INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include/wpa
|
||||
INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/port/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/port/include
|
||||
PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/log
|
||||
PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include
|
||||
PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include/wpa
|
||||
PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/port/include
|
||||
PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/include
|
||||
PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/port/include
|
||||
CFLAGS += -D__ets__ -DESPRESSIF_USE -DESP32_IDF_CODE=1
|
||||
|
||||
include $(RIOTCPU)/$(CPU)/Makefile.include
|
||||
|
||||
INCLUDES += -I$(RIOTBASE)/core/include
|
||||
INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/log
|
||||
INCLUDES += -I$(RIOTCPU)/$(CPU)/include
|
||||
# This converts INCLUDES to a simply evaluated variable instead of a recursively
|
||||
# one but only for this module.
|
||||
INCLUDES := $(PRE_INCLUDES) $(INCLUDES)
|
||||
|
@ -4,15 +4,16 @@ include $(RIOTBASE)/Makefile.base
|
||||
|
||||
# we have to do it in that way to avoid that $(RIOTBASE)/sys/include/crypto
|
||||
# is found first
|
||||
INCLUDES = -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include
|
||||
INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include/wpa
|
||||
INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/port/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/include
|
||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/port/include
|
||||
PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/log
|
||||
PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include
|
||||
PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/include/wpa
|
||||
PRE_INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/port/include
|
||||
PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/include
|
||||
PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/port/include
|
||||
CFLAGS += -D__ets__ -DESPRESSIF_USE -DESP32_IDF_CODE=1
|
||||
|
||||
include $(RIOTCPU)/$(CPU)/Makefile.include
|
||||
|
||||
INCLUDES += -I$(RIOTBASE)/core/include
|
||||
INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/log
|
||||
INCLUDES += -I$(RIOTCPU)/$(CPU)/include
|
||||
# This converts INCLUDES to a simply evaluated variable instead of a recursively
|
||||
# one but only for this module.
|
||||
INCLUDES := $(PRE_INCLUDES) $(INCLUDES)
|
||||
|
@ -81,11 +81,11 @@ CFLAGS += $(if $(findstring dout,$(FLASH_MODE)),-DFLASH_MODE_DOUT=1)
|
||||
ARCHIVES += -lhal -lg -lc
|
||||
|
||||
LINKFLAGS += $(CFLAGS_OPT) $(CFLAGS_DBG)
|
||||
ifneq ($(CPU),esp8266)
|
||||
#ifneq ($(CPU),esp8266)
|
||||
# esp8266 flags are added by the SDK pkg in pkg/esp8266_sdk
|
||||
LINKFLAGS += -L$(ESP_SDK_DIR)/components/$(CPU)
|
||||
LINKFLAGS += -L$(ESP_SDK_DIR)/components/$(CPU)/lib
|
||||
endif
|
||||
#LINKFLAGS += -L$(ESP_SDK_DIR)/components/$(CPU)
|
||||
#LINKFLAGS += -L$(ESP_SDK_DIR)/components/$(CPU)/lib
|
||||
#endif
|
||||
LINKFLAGS += -nostdlib -Wl,-gc-sections -Wl,-static
|
||||
|
||||
# use the wrapper functions for calloc to add correct overflow detection missing
|
||||
|
@ -17,6 +17,8 @@ rsource "driver_bme680/Kconfig"
|
||||
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"
|
||||
|
13
pkg/esp32_sdk/Kconfig
Normal file
13
pkg/esp32_sdk/Kconfig
Normal 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
|
||||
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
|
32
pkg/esp32_sdk/Makefile
Normal file
32
pkg/esp32_sdk/Makefile
Normal file
@ -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)
|
2
pkg/esp32_sdk/Makefile.dep
Normal file
2
pkg/esp32_sdk/Makefile.dep
Normal file
@ -0,0 +1,2 @@
|
||||
# This package can only be used with the ESP32 CPU
|
||||
FEATURES_REQUIRED += arch_esp32
|
23
pkg/esp32_sdk/Makefile.include
Normal file
23
pkg/esp32_sdk/Makefile.include
Normal file
@ -0,0 +1,23 @@
|
||||
# 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
|
||||
|
||||
PSEUDOMODULES += esp32_sdk
|
||||
|
||||
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)
|
6
pkg/esp32_sdk/doc.txt
Normal file
6
pkg/esp32_sdk/doc.txt
Normal file
@ -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
|
||||
*/
|
13
pkg/esp32_sdk_libs/Kconfig
Normal file
13
pkg/esp32_sdk_libs/Kconfig
Normal 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
|
39
pkg/esp32_sdk_libs/Makefile
Normal file
39
pkg/esp32_sdk_libs/Makefile
Normal 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)
|
2
pkg/esp32_sdk_libs/Makefile.dep
Normal file
2
pkg/esp32_sdk_libs/Makefile.dep
Normal file
@ -0,0 +1,2 @@
|
||||
# This package can only be used with the ESP32 CPU
|
||||
FEATURES_REQUIRED += arch_esp32
|
13
pkg/esp32_sdk_libs/Makefile.include
Normal file
13
pkg/esp32_sdk_libs/Makefile.include
Normal 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
|
6
pkg/esp32_sdk_libs/doc.txt
Normal file
6
pkg/esp32_sdk_libs/doc.txt
Normal 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
|
||||
*/
|
@ -6,6 +6,8 @@
|
||||
#
|
||||
|
||||
config PACKAGE_ESP8266_SDK
|
||||
bool "Vendor library for the ESP8266 MCU RTOS support"
|
||||
bool "ESP8266 RTOS SDK for the ESP8266 MCU support"
|
||||
depends on TEST_KCONFIG
|
||||
depends on HAS_ARCH_ESP8266
|
||||
help
|
||||
Vendor SDK with libraries for ESP8266 MCU support by Espressif
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @defgroup pkg_esp8266_sdk Vendor library for the ESP8266 MCU RTOS support
|
||||
* @defgroup pkg_esp8266_sdk ESP8266 RTOS SDK for the ESP8266 MCU support
|
||||
* @ingroup pkg
|
||||
* @brief Vendor library for the ESP8266 MCU RTOS support by Espressif
|
||||
* @brief Vendor SDK with libraries for ESP8266 MCU support by Espressif
|
||||
* @see https://github.com/espressif/ESP8266_RTOS_SDK
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user