xtensa/esp32s2: add WiFi support on ESP32S2

This commit is contained in:
Filipe Cavalcanti
2024-07-29 13:48:11 -03:00
committed by Xiang Xiao
parent 4915338857
commit 2af7037fa1
27 changed files with 12850 additions and 46 deletions
@@ -217,7 +217,7 @@ Timers Yes
Touch Yes
UART Yes
Watchdog Yes
Wifi No
Wifi Yes
========== ======= =====
Memory Map
@@ -364,6 +364,50 @@ audio subsystem and develop specific usages of the I2S peripheral.
Please check for usage examples using the :doc:`ESP32-S2-Saola-1 </platforms/xtensa/esp32s2/boards/esp32s2-saola-1/index>`.
Wi-Fi
======
.. tip:: Boards usually expose a ``wifi`` defconfig which enables Wi-Fi.
A standard network interface will be configured and can be initialized such as::
nsh> ifup wlan0
nsh> wapi psk wlan0 mypasswd 3
nsh> wapi essid wlan0 myssid 1
nsh> renew wlan0
In this case a connection to AP with SSID ``myssid`` is done, using ``mypasswd`` as
password. IP address is obtained via DHCP using ``renew`` command. You can check
the result by running ``ifconfig`` afterwards.
.. tip:: Please refer to :ref:`ESP32 Wi-Fi Station Mode <esp32_wi-fi_sta>`
for more information.
Wi-Fi SoftAP
============
It is possible to use ESP32-S2 as an Access Point (SoftAP).
.. tip:: Boards usually expose a ``sta_softap`` defconfig which enables Wi-Fi
(STA + SoftAP).
If you are using this board config profile you can run these commands to be able
to connect your smartphone or laptop to your board::
nsh> ifup wlan1
nsh> dhcpd_start wlan1
nsh> wapi psk wlan1 mypasswd 3
nsh> wapi essid wlan1 nuttxap 1
In this case, you are creating the access point ``nuttxapp`` in your board and to
connect to it on your smartphone you will be required to type the password ``mypasswd``
using WPA2.
.. tip:: Please refer to :ref:`ESP32 Wi-Fi SoftAP Mode <esp32_wi-fi_softap>`
for more information.
The ``dhcpd_start`` is necessary to let your board to associate an IP to your smartphone.
Secure Boot and Flash Encryption
================================
+9 -1
View File
@@ -59,8 +59,12 @@
* sources.
*/
/* RESERVED interrupts: 0, 1, 3, 4, 5, 6, 7, 8, 9 */
/* RESERVED interrupts: 0, 1, 3, 4, 5, 6, 7, 8, 9
* 0 and 1 are the exception because it is required for WiFi.
*/
#define ESP32S2_PERIPH_MAC 0
#define ESP32S2_PERIPH_MAC_NMI 1
#define ESP32S2_PERIPH_PWR 2
/* RESERVED interrupts: 10, 11, 12, 14 */
@@ -197,6 +201,9 @@
#define ESP32S2_IRQ2PERIPH(irq) ((irq) - XTENSA_IRQ_FIRSTPERIPH)
#define ESP32S2_PERIPH2IRQ(id) ((id) + XTENSA_IRQ_FIRSTPERIPH)
#define ESP32S2_IRQ_MAC (XTENSA_IRQ_FIRSTPERIPH + ESP32S2_PERIPH_MAC)
#define ESP32S2_IRQ_MAC_NMI (XTENSA_IRQ_FIRSTPERIPH + ESP32S2_PERIPH_MAC_NMI)
#define ESP32S2_IRQ_PWR (XTENSA_IRQ_FIRSTPERIPH + ESP32S2_PERIPH_PWR)
#define ESP32S2_IRQ_UHCI0 (XTENSA_IRQ_FIRSTPERIPH + ESP32S2_PERIPH_UHCI0)
@@ -415,6 +422,7 @@
#define ESP32S2_CPUINT_NMISET 0x00004000
#define ESP32S2_CPUINT_MAC 0
#define ESP32S2_CPUINT_PWR 0
#define ESP32S2_CPUINT_TIMER0 6
#define ESP32S2_CPUINT_SOFTWARE0 7
#define ESP32S2_CPUINT_PROFILING 11
+188
View File
@@ -153,3 +153,191 @@ config ESPRESSIF_STORAGE_MTD_DEBUG
endif # ESPRESSIF_SPIFLASH
endmenu # SPI Flash Configuration
config ESPRESSIF_WIRELESS
bool
default n
select NET
select ARCH_PHY_INTERRUPT
select ESP32S2_RNG if ARCH_CHIP_ESP32S2
select ESP32S2_RT_TIMER if ARCH_CHIP_ESP32S2
select ESP32S2_TIMER0 if ARCH_CHIP_ESP32S2
depends on ARCH_CHIP_ESP32S2
---help---
Enable Wireless support
config ESPRESSIF_WIFI
bool "Wi-Fi"
default n
select ESPRESSIF_WIRELESS
---help---
Enable Wi-Fi support
menu "Wi-Fi Configuration"
depends on ESPRESSIF_WIFI
menu "ESP WPA-Supplicant"
config WPA_WAPI_PSK
bool "Enable WAPI PSK support"
default n
---help---
Select this option to enable WAPI-PSK
which is a Chinese National Standard Encryption for Wireless LANs (GB 15629.11-2003).
config WPA_SUITE_B_192
bool "Enable NSA suite B support with 192-bit key"
default n
select ESP_WIFI_GCMP_SUPPORT
select ESP_WIFI_GMAC_SUPPORT
---help---
Select this option to enable 192-bit NSA suite-B.
This is necessary to support WPA3 192-bit security.
config ESP_WPA_DEBUG_PRINT
bool "Print debug messages from Espressif's WPA Supplicant"
default n
---help---
Select this option to print logging information from WPA supplicant,
this includes handshake information and key hex dumps depending
on the project logging level.
Enabling this could increase the build size ~60kb
depending on the project logging level.
endmenu # ESP WPA-Supplicant
choice ESPRESSIF_WIFI_MODE
prompt "ESP Wi-Fi mode"
default ESPRESSIF_WIFI_STATION
config ESPRESSIF_WIFI_STATION
bool "Station mode"
config ESPRESSIF_WIFI_SOFTAP
bool "SoftAP mode"
config ESPRESSIF_WIFI_STATION_SOFTAP
bool "Station + SoftAP"
endchoice # ESP Wi-Fi mode
config ESP_WIFI_ENABLE_SAE_PK
bool "Enable SAE-PK"
default y
---help---
Select this option to enable SAE-PK
config ESP_WIFI_ENABLE_WPA3_OWE_STA
bool "Enable OWE STA"
default y
---help---
Select this option to allow the device to establish OWE connection with eligible AP's.
PMF (Protected Management Frames) is a prerequisite feature for a WPA3 connection, it needs to be
explicitly configured before attempting connection. Please refer to the Wi-Fi Driver API Guide for details.
config ESPRESSIF_WIFI_STATIC_RXBUF_NUM
int "Wi-Fi static RX buffer number"
default 10
config ESPRESSIF_WIFI_DYNAMIC_RXBUF_NUM
int "Wi-Fi dynamic RX buffer number"
default 32
config ESPRESSIF_WIFI_DYNAMIC_TXBUF_NUM
int "Wi-Fi dynamic TX buffer number"
default 32
config ESPRESSIF_WIFI_TX_AMPDU
bool "Wi-Fi TX AMPDU"
default y
config ESPRESSIF_WIFI_RX_AMPDU
bool "Wi-Fi RX AMPDU"
default y
config ESPRESSIF_WIFI_RXBA_AMPDU_WZ
int "Wi-Fi RX BA AMPDU windown size"
default 6
config ESPRESSIF_WLAN_PKTBUF_NUM
int "WLAN netcard packet buffer number per netcard"
default 16
config ESP_WIFI_GCMP_SUPPORT
bool "WiFi GCMP Support(GCMP128 and GCMP256)"
default n
---help---
Select this option to enable GCMP support. GCMP support is compulsory for WiFi Suite-B support.
config ESP_WIFI_GMAC_SUPPORT
bool "WiFi GMAC Support(GMAC128 and GMAC256)"
default n
---help---
Select this option to enable GMAC support. GMAC support is compulsory for WiFi 192-bit certification.
config ESPRESSIF_WIFI_CONNECT_TIMEOUT
int "Connect timeout in second"
default 10
---help---
Max waiting time of connecting to AP.
config ESPRESSIF_WIFI_SCAN_RESULT_SIZE
int "Scan result buffer"
default 4096
---help---
Maximum scan result buffer size.
config ESPRESSIF_WIFI_STA_DISCONNECT_PM
bool "Power Management for station when disconnected"
default y
---help---
Select this option to enable power management for station when disconnected.
Chip will do modem-sleep when RF module is not in use anymore.
choice ESPRESSIF_POWER_SAVE_MODE
prompt "Wi-Fi Power save mode"
default ESPRESSIF_POWER_SAVE_NONE
---help---
Wi-Fi supports the Modem-sleep mode which refers to the legacy power-saving mode in the IEEE 802.11 protocol.
Modem-sleep mode works in station-only mode and the station must connect to the AP first. If the Modem-sleep
mode is enabled, station will switch between active and sleep state periodically. In sleep state, RF, PHY and
BB are turned off in order to reduce power consumption. Station can keep connection with AP in modem-sleep mode.
Modem-sleep mode includes minimum and maximum power-saving modes.
In minimum power-saving mode, station wakes
up every DTIM to receive beacon. Broadcast data will not be lost because it is transmitted after DTIM.
However, it cannot save much more power if DTIM is short for DTIM is determined by AP.
In maximum power-saving mode, station wakes up in every listen interval to receive beacon. This listen interval
can be set to be longer than the AP DTIM period. Broadcast data may be lost because station may be in sleep
state at DTIM time. If listen interval is longer, more power is saved, but broadcast data is more easy to lose.
Listen interval can be configured by setting ESPRESSIF_WIFI_LISTEN_INTERVAL.
ESPRESSIF_POWER_SAVE_NONE disables Modem-sleep mode entirely. Disabling it increases power consumption, but
minimizes the delay in receiving Wi-Fi data in real time. When Modem-sleep mode is enabled, the delay in
receiving Wi-Fi data may be the same as the DTIM cycle (minimum power-saving mode) or the listening interval
(maximum power-saving mode). Setting ESPRESSIF_POWER_SAVE_NONE is suitable when high throughput is required.
config ESPRESSIF_POWER_SAVE_NONE
bool "No power save"
config ESPRESSIF_POWER_SAVE_MIN_MODEM
bool "Minimum modem power saving."
config ESPRESSIF_POWER_SAVE_MAX_MODEM
bool "Maximum modem power saving"
endchoice # ESPRESSIF_POWER_SAVE_MODE
config ESPRESSIF_WIFI_LISTEN_INTERVAL
int "Wi-Fi listen interval"
depends on ESPRESSIF_POWER_SAVE_MAX_MODEM
default 3
---help---
Interval for station to listen to beacon from AP. The unit of listen interval is one beacon interval.
For example, if beacon interval is 100 ms and listen interval is 3, the interval for station to listen
to beacon is 300 ms.
endmenu # ESPRESSIF_WIFI
@@ -47,4 +47,16 @@ CHIP_CSRCS += esp_spiflash_mtd.c
endif
endif
ifeq ($(CONFIG_ESPRESSIF_WIRELESS),y)
CHIP_CSRCS += esp_wireless.c
ifeq ($(CONFIG_ESPRESSIF_WIFI),y)
CHIP_CSRCS += esp_wifi_utils.c
CHIP_CSRCS += esp_wlan.c
endif
endif
ifeq ($(CONFIG_ESPRESSIF_WIRELESS),y)
include common$(DELIM)espressif$(DELIM)Wireless.mk
endif
INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)common$(DELIM)espressif$(DELIM)platform_include
@@ -0,0 +1,242 @@
############################################################################
# arch/xtensa/src/common/espressif/Wireless.mk
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)soc$(DELIM)$(CHIP_SERIES)$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)nuttx$(DELIM)$(CHIP_SERIES)$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)nuttx$(DELIM)include$(DELIM)esp_wifi
EXTRA_LIBPATHS += -L $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_phy$(DELIM)lib$(DELIM)$(CHIP_SERIES)
EXTRA_LIBPATHS += -L $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_wifi$(DELIM)lib$(DELIM)$(CHIP_SERIES)
EXTRA_LIBS += -lphy
ifeq ($(CONFIG_ESPRESSIF_WIFI),y)
EXTRA_LIBS += -lcore -lnet80211 -lpp
ifeq ($(CONFIG_WPA_WAPI_PSK),y)
EXTRA_LIBS += -lwapi
endif
## ESP-IDF's mbedTLS
VPATH += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)mbedtls$(DELIM)mbedtls$(DELIM)library
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)mbedtls$(DELIM)mbedtls$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)mbedtls$(DELIM)mbedtls$(DELIM)library
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)mbedtls$(DELIM)port$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)nuttx$(DELIM)include$(DELIM)mbedtls
### Define Espressif's configs for mbedTLS
CFLAGS += $(DEFINE_PREFIX)MBEDTLS_CONFIG_FILE="<mbedtls/esp_config.h>"
CHIP_CSRCS += aes.c
CHIP_CSRCS += aria.c
CHIP_CSRCS += bignum_core.c
CHIP_CSRCS += bignum.c
CHIP_CSRCS += ccm.c
CHIP_CSRCS += cipher_wrap.c
CHIP_CSRCS += cipher.c
CHIP_CSRCS += cmac.c
CHIP_CSRCS += constant_time.c
CHIP_CSRCS += ctr_drbg.c
CHIP_CSRCS += ecp_curves.c
CHIP_CSRCS += ecp.c
CHIP_CSRCS += entropy.c
CHIP_CSRCS += gcm.c
CHIP_CSRCS += md.c
CHIP_CSRCS += pkcs5.c
CHIP_CSRCS += platform_util.c
CHIP_CSRCS += platform.c
CHIP_CSRCS += sha1.c
CHIP_CSRCS += sha3.c
CHIP_CSRCS += sha256.c
CHIP_CSRCS += sha512.c
CHIP_CSRCS += pk.c
CHIP_CSRCS += pk_wrap.c
CHIP_CSRCS += pkparse.c
CHIP_CSRCS += ecdsa.c
CHIP_CSRCS += asn1parse.c
CHIP_CSRCS += asn1write.c
CHIP_CSRCS += rsa.c
CHIP_CSRCS += md5.c
CHIP_CSRCS += oid.c
CHIP_CSRCS += pem.c
CHIP_CSRCS += hmac_drbg.c
CHIP_CSRCS += rsa_alt_helpers.c
CHIP_CSRCS += ecdh.c
CHIP_CSRCS += pk_ecc.c
VPATH += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)mbedtls$(DELIM)port
CHIP_CSRCS += esp_hardware.c
CHIP_CSRCS += esp_mem.c
CHIP_CSRCS += esp_timing.c
VPATH += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)mbedtls$(DELIM)port$(DELIM)md
CHIP_CSRCS += esp_md.c
## WPA Supplicant
WIFI_WPA_SUPPLICANT = chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)wpa_supplicant
CFLAGS += $(DEFINE_PREFIX)__ets__
CFLAGS += $(DEFINE_PREFIX)CONFIG_CRYPTO_MBEDTLS
CFLAGS += $(DEFINE_PREFIX)CONFIG_ECC
CFLAGS += $(DEFINE_PREFIX)CONFIG_IEEE80211W
CFLAGS += $(DEFINE_PREFIX)CONFIG_WPA3_SAE
CFLAGS += $(DEFINE_PREFIX)EAP_PEER_METHOD
CFLAGS += $(DEFINE_PREFIX)ESP_PLATFORM=1
CFLAGS += $(DEFINE_PREFIX)ESP_SUPPLICANT
CFLAGS += $(DEFINE_PREFIX)ESPRESSIF_USE
CFLAGS += $(DEFINE_PREFIX)IEEE8021X_EAPOL
CFLAGS += $(DEFINE_PREFIX)USE_WPA2_TASK
CFLAGS += $(DEFINE_PREFIX)CONFIG_SHA256
CFLAGS += $(DEFINE_PREFIX)CONFIG_SAE
CFLAGS += $(DEFINE_PREFIX)USE_WPS_TASK
ifeq ($(CONFIG_ESP_WIFI_ENABLE_SAE_PK),y)
CFLAGS += $(DEFINE_PREFIX)CONFIG_SAE_PK
endif
ifeq ($(CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA),y)
CFLAGS += $(DEFINE_PREFIX)CONFIG_OWE_STA
endif
ifeq ($(CONFIG_ESP_WIFI_GCMP_SUPPORT),y)
CFLAGS += $(DEFINE_PREFIX)CONFIG_GCMP
endif
ifeq ($(CONFIG_ESP_WIFI_GMAC_SUPPORT),y)
CFLAGS += $(DEFINE_PREFIX)CONFIG_GMAC
endif
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)$(WIFI_WPA_SUPPLICANT)$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)$(WIFI_WPA_SUPPLICANT)$(DELIM)src
VPATH += $(WIFI_WPA_SUPPLICANT)$(DELIM)src$(DELIM)ap
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)$(WIFI_WPA_SUPPLICANT)$(DELIM)src$(DELIM)ap
CHIP_CSRCS += ap_config.c
CHIP_CSRCS += ieee802_11.c
CHIP_CSRCS += comeback_token.c
CHIP_CSRCS += pmksa_cache_auth.c
CHIP_CSRCS += sta_info.c
CHIP_CSRCS += wpa_auth_ie.c
CHIP_CSRCS += wpa_auth.c
VPATH += $(WIFI_WPA_SUPPLICANT)$(DELIM)src$(DELIM)common
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)$(WIFI_WPA_SUPPLICANT)$(DELIM)src$(DELIM)common
CHIP_CSRCS += dragonfly.c
CHIP_CSRCS += sae.c
CHIP_CSRCS += wpa_common.c
CHIP_CSRCS += sae_pk.c
CHIP_CSRCS += bss.c
CHIP_CSRCS += scan.c
CHIP_CSRCS += ieee802_11_common.c
VPATH += $(WIFI_WPA_SUPPLICANT)$(DELIM)src$(DELIM)crypto
CHIP_CSRCS += aes-ccm.c
CHIP_CSRCS += aes-gcm.c
CHIP_CSRCS += aes-omac1.c
CHIP_CSRCS += aes-unwrap.c
CHIP_CSRCS += aes-wrap.c
CHIP_CSRCS += ccmp.c
CHIP_CSRCS += crypto_ops.c
CHIP_CSRCS += des-internal.c
CHIP_CSRCS += dh_groups.c
CHIP_CSRCS += rc4.c
CHIP_CSRCS += sha1-prf.c
CHIP_CSRCS += sha256-kdf.c
CHIP_CSRCS += sha256-prf.c
VPATH += $(WIFI_WPA_SUPPLICANT)$(DELIM)src$(DELIM)eap_peer
CHIP_CSRCS += chap.c
CHIP_CSRCS += eap_common.c
CHIP_CSRCS += eap_mschapv2.c
CHIP_CSRCS += eap_peap_common.c
CHIP_CSRCS += eap_peap.c
CHIP_CSRCS += eap_tls_common.c
CHIP_CSRCS += eap_tls.c
CHIP_CSRCS += eap_ttls.c
CHIP_CSRCS += eap.c
CHIP_CSRCS += mschapv2.c
VPATH += $(WIFI_WPA_SUPPLICANT)$(DELIM)src$(DELIM)rsn_supp
CHIP_CSRCS += pmksa_cache.c
CHIP_CSRCS += wpa_ie.c
CHIP_CSRCS += wpa.c
VPATH += $(WIFI_WPA_SUPPLICANT)$(DELIM)src$(DELIM)utils
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)$(WIFI_WPA_SUPPLICANT)$(DELIM)src$(DELIM)utils
CHIP_CSRCS += base64.c
CHIP_CSRCS += bitfield.c
CHIP_CSRCS += common.c
CHIP_CSRCS += ext_password.c
CHIP_CSRCS += json.c
CHIP_CSRCS += uuid.c
CHIP_CSRCS += wpa_debug.c
CHIP_CSRCS += wpabuf.c
VPATH += $(WIFI_WPA_SUPPLICANT)$(DELIM)port
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)$(WIFI_WPA_SUPPLICANT)$(DELIM)port$(DELIM)include
CHIP_CSRCS += eloop.c
CHIP_CSRCS += os_xtensa.c
## ESP Supplicant (Espressif's WPA supplicant extension)
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)$(WIFI_WPA_SUPPLICANT)$(DELIM)esp_supplicant$(DELIM)include
VPATH += $(WIFI_WPA_SUPPLICANT)$(DELIM)esp_supplicant$(DELIM)src
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)$(WIFI_WPA_SUPPLICANT)$(DELIM)esp_supplicant$(DELIM)src
CHIP_CSRCS += esp_common.c
CHIP_CSRCS += esp_hostap.c
CHIP_CSRCS += esp_wpa_main.c
CHIP_CSRCS += esp_wpa3.c
CHIP_CSRCS += esp_wpas_glue.c
CHIP_CSRCS += esp_owe.c
CHIP_CSRCS += esp_scan.c
CHIP_CSRCS += esp_wps.c
VPATH += $(WIFI_WPA_SUPPLICANT)$(DELIM)esp_supplicant$(DELIM)src$(DELIM)crypto
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)$(WIFI_WPA_SUPPLICANT)$(DELIM)src$(DELIM)crypto
CHIP_CSRCS += crypto_mbedtls-bignum.c
CHIP_CSRCS += crypto_mbedtls-ec.c
CHIP_CSRCS += crypto_mbedtls-rsa.c
CHIP_CSRCS += crypto_mbedtls.c
CHIP_CSRCS += tls_mbedtls.c
CHIP_CSRCS += aes-siv.c
endif
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,104 @@
/****************************************************************************
* arch/xtensa/src/common/espressif/esp_wifi_utils.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#ifndef __ARCH_XTENSA_SRC_COMMON_ESPRESSIF_ESP_WIFI_UTILS_H
#define __ARCH_XTENSA_SRC_COMMON_ESPRESSIF_ESP_WIFI_UTILS_H
#include <nuttx/config.h>
#include <nuttx/net/netdev.h>
#ifndef __ASSEMBLY__
#include <stdint.h>
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C"
{
#else
#define EXTERN extern
#endif
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
/****************************************************************************
* Name: esp_wifi_start_scan
*
* Description:
* Scan all available APs.
*
* Input Parameters:
* iwr - The argument of the ioctl cmd
*
* Returned Value:
* OK on success (positive non-zero values are cmd-specific)
* Negated errno returned on failure.
*
****************************************************************************/
int esp_wifi_start_scan(struct iwreq *iwr);
/****************************************************************************
* Name: esp_wifi_get_scan_results
*
* Description:
* Get scan result
*
* Input Parameters:
* req The argument of the ioctl cmd
*
* Returned Value:
* OK on success (positive non-zero values are cmd-specific)
* Negated errno returned on failure.
*
****************************************************************************/
int esp_wifi_get_scan_results(struct iwreq *iwr);
/****************************************************************************
* Name: esp_wifi_scan_event_parse
*
* Description:
* Parse scan information
*
* Input Parameters:
* None
*
* Returned Value:
* None
*
****************************************************************************/
void esp_wifi_scan_event_parse(void);
#ifdef __cplusplus
}
#endif
#undef EXTERN
#endif /* __ASSEMBLY__ */
#endif /* __ARCH_XTENSA_SRC_COMMON_ESPRESSIF_ESP_WIFI_UTILS_H */
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,403 @@
/****************************************************************************
* arch/xtensa/src/common/espressif/esp_wireless.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
#ifndef __ARCH_XTENSA_SRC_COMMON_ESPRESSIF_ESP_WIRELESS_H
#define __ARCH_XTENSA_SRC_COMMON_ESPRESSIF_ESP_WIRELESS_H
/****************************************************************************
* Included Files
****************************************************************************/
#include <semaphore.h>
#include <stdbool.h>
#include <stdint.h>
#include <nuttx/config.h>
#include <nuttx/list.h>
#ifdef CONFIG_ARCH_CHIP_ESP32
#include "xtensa_attr.h"
#include "esp32_rt_timer.h"
#elif CONFIG_ARCH_CHIP_ESP32S2
#include "esp_attr.h"
#include "esp32s2_rt_timer.h"
#elif CONFIG_ARCH_CHIP_ESP32S3
#include "esp_attr.h"
#include "esp32s3_rt_timer.h"
#endif
#include "esp_log.h"
#include "esp_mac.h"
#include "esp_private/phy.h"
#include "esp_private/wifi.h"
#include "esp_random.h"
#include "esp_timer.h"
#include "rom/ets_sys.h"
#include "soc/soc_caps.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Note: Don't remove these definitions, they are needed by the 3rdparty IDF
* headers
*/
#ifdef CONFIG_ARCH_CHIP_ESP32
# ifdef CONFIG_ESP32_SUPPORT_MULTIPLE_PHY_INIT_DATA
# undef CONFIG_ESP32_SUPPORT_MULTIPLE_PHY_INIT_DATA_BIN
# define CONFIG_ESP32_SUPPORT_MULTIPLE_PHY_INIT_DATA_BIN 1
# endif
# define SOC_COEX_HW_PTI 0
#endif
#define CONFIG_MAC_BB_PD (0)
#define MAC_LEN (6)
/****************************************************************************
* Public Types
****************************************************************************/
/* Semaphore Cache Data */
struct esp_semcache_s
{
struct list_node node;
sem_t *sem;
uint32_t count;
};
/* Queue Cache Data */
struct esp_queuecache_s
{
struct list_node node;
struct file *mq_ptr;
size_t size;
uint8_t *buffer;
};
/****************************************************************************
* Inline Functions
****************************************************************************/
/****************************************************************************
* Name: nuttx_err_to_freertos
*
* Description:
* Transform from Nuttx OS error code to FreeRTOS's pdTRUE or pdFALSE.
*
* Input Parameters:
* ret - NuttX error code
*
* Returned Value:
* Wi-Fi adapter error code
*
****************************************************************************/
#ifndef CONFIG_ARCH_CHIP_ESP32S2
static inline int32_t nuttx_err_to_freertos(int ret)
{
return ret >= 0;
}
#endif
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
/****************************************************************************
* Name: esp_wifi_to_errno
*
* Description:
* Transform from ESP Wi-Fi error code to NuttX error code
*
* Input Parameters:
* err - ESP Wi-Fi error code
*
* Returned Value:
* NuttX error code defined in errno.h
*
****************************************************************************/
#ifndef CONFIG_ARCH_CHIP_ESP32S2
int32_t esp_wifi_to_errno(int err);
#endif
/****************************************************************************
* Functions needed by libphy.a
****************************************************************************/
/****************************************************************************
* Name: esp_dport_access_reg_read
*
* Description:
* Read register value safely in SMP
*
* Input Parameters:
* reg - Register address
*
* Returned Value:
* Register value
*
****************************************************************************/
uint32_t IRAM_ATTR esp_dport_access_reg_read(uint32_t reg);
/****************************************************************************
* Name: phy_printf
*
* Description:
* Output format string and its arguments
*
* Input Parameters:
* format - format string
*
* Returned Value:
* 0
*
****************************************************************************/
int phy_printf(const char *format, ...) printf_like(1, 2);
/****************************************************************************
* Name: esp_timer_create
*
* Description:
* Create timer with given arguments
*
* Input Parameters:
* create_args - Timer arguments data pointer
* out_handle - Timer handle pointer
*
* Returned Value:
* 0 if success or -1 if fail
*
****************************************************************************/
int32_t esp_timer_create(const esp_timer_create_args_t *create_args,
esp_timer_handle_t *out_handle);
/****************************************************************************
* Name: esp_timer_start_once
*
* Description:
* Start timer with one shot mode
*
* Input Parameters:
* timer - Timer handle pointer
* timeout_us - Timeout value by micro second
*
* Returned Value:
* 0 if success or -1 if fail
*
****************************************************************************/
int32_t esp_timer_start_once(esp_timer_handle_t timer, uint64_t timeout_us);
/****************************************************************************
* Name: esp_timer_start_periodic
*
* Description:
* Start timer with periodic mode
*
* Input Parameters:
* timer - Timer handle pointer
* period - Timeout value by micro second
*
* Returned Value:
* 0 if success or -1 if fail
*
****************************************************************************/
int32_t esp_timer_start_periodic(esp_timer_handle_t timer, uint64_t period);
/****************************************************************************
* Name: esp_timer_stop
*
* Description:
* Stop timer
*
* Input Parameters:
* timer - Timer handle pointer
*
* Returned Value:
* 0 if success or -1 if fail
*
****************************************************************************/
int32_t esp_timer_stop(esp_timer_handle_t timer);
/****************************************************************************
* Name: esp_timer_delete
*
* Description:
* Delete timer and free resource
*
* Input Parameters:
* timer - Timer handle pointer
*
* Returned Value:
* 0 if success or -1 if fail
*
****************************************************************************/
int32_t esp_timer_delete(esp_timer_handle_t timer);
/****************************************************************************
* Name: esp_phy_update_country_info
*
* Description:
* Update PHY init data according to country code
*
* Input Parameters:
* country - PHY init data type
*
* Returned Value:
* OK on success; a negated errno on failure
*
****************************************************************************/
int esp_phy_update_country_info(const char *country);
/****************************************************************************
* Name: esp_init_semcache
*
* Description:
* Initialize semaphore cache.
*
* Parameters:
* sc - Semaphore cache data pointer
* sem - Semaphore data pointer
*
* Returned Value:
* None.
*
****************************************************************************/
void esp_init_semcache(struct esp_semcache_s *sc, sem_t *sem);
/****************************************************************************
* Name: esp_post_semcache
*
* Description:
* Store posting semaphore action into semaphore cache.
*
* Parameters:
* sc - Semaphore cache data pointer
*
* Returned Value:
* None.
*
****************************************************************************/
void esp_post_semcache(struct esp_semcache_s *sc);
/****************************************************************************
* Name: esp_init_queuecache
*
* Description:
* Initialize queue cache.
*
* Parameters:
* qc - Queue cache data pointer
* mq_ptr - Queue data pointer
* buffer - Queue cache buffer pointer
* len - Queue cache max length
* size - Queue cache buffer size
*
* Returned Value:
* None.
*
****************************************************************************/
#ifdef CONFIG_ARCH_CHIP_ESP32
void esp_init_queuecache(struct esp_queuecache_s *qc,
struct file *mq_ptr,
uint8_t *buffer,
size_t len,
size_t size);
#else
void esp_init_queuecache(struct esp_queuecache_s *qc,
struct file *mq_ptr,
uint8_t *buffer,
size_t size);
#endif
/****************************************************************************
* Name: esp_send_queuecache
*
* Description:
* Store posting queue action and data into queue cache.
*
* Parameters:
* qc - Queue cache data pointer
* buffer - Data buffer
* size - Buffer size
*
* Returned Value:
* None.
*
****************************************************************************/
#ifdef CONFIG_ARCH_CHIP_ESP32
void esp_send_queuecache(void *qc, uint8_t *buffer, int size);
#else
void esp_send_queuecache(struct esp_queuecache_s *qc,
uint8_t *buffer,
int size);
#endif
/****************************************************************************
* Name: esp_wireless_init
*
* Description:
* Initialize ESP32 wireless common components for both BT and Wi-Fi.
*
* Parameters:
* None
*
* Returned Value:
* Zero (OK) is returned on success. A negated errno value is returned on
* failure.
*
****************************************************************************/
int esp_wireless_init(void);
/****************************************************************************
* Name: esp_wireless_deinit
*
* Description:
* De-initialize ESP32 wireless common components.
*
* Parameters:
* None
*
* Returned Value:
* Zero (OK) is returned on success. A negated errno value is returned on
* failure.
*
****************************************************************************/
int esp_wireless_deinit(void);
#endif /* __ARCH_XTENSA_SRC_COMMON_ESPRESSIF_ESP_WIRELESS_H */
File diff suppressed because it is too large Load Diff
+119
View File
@@ -0,0 +1,119 @@
/****************************************************************************
* arch/xtensa/src/common/espressif/esp_wlan.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
#ifndef __ARCH_XTENSA_SRC_COMMON_ESPRESSIF_ESP_WLAN_H
#define __ARCH_XTENSA_SRC_COMMON_ESPRESSIF_ESP_WLAN_H
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#ifdef CONFIG_ARCH_CHIP_ESP32S2
# include "esp32s2_wifi_adapter.h"
#endif
#ifndef __ASSEMBLY__
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C"
{
#else
#define EXTERN extern
#endif
#ifdef CONFIG_ESPRESSIF_WIFI
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
#
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
#ifdef ESPRESSIF_WLAN_HAS_STA
/****************************************************************************
* Name: esp_wlan_sta_set_linkstatus
*
* Description:
* Set Wi-Fi station link status
*
* Parameters:
* linkstatus - true Notifies the networking layer about an available
* carrier, false Notifies the networking layer about an
* disappeared carrier.
*
* Returned Value:
* OK on success; Negated errno on failure.
*
****************************************************************************/
int esp_wlan_sta_set_linkstatus(bool linkstatus);
/****************************************************************************
* Name: esp_wlan_sta_initialize
*
* Description:
* Initialize the ESP32|S2|S3 WLAN station netcard driver
*
* Input Parameters:
* None
*
* Returned Value:
* OK on success; Negated errno on failure.
*
****************************************************************************/
int esp_wlan_sta_initialize(void);
#endif /* ESPRESSIF_WLAN_HAS_STA */
/****************************************************************************
* Name: esp_wlan_softap_initialize
*
* Description:
* Initialize the ESP32|S2|S3 WLAN softAP netcard driver
*
* Input Parameters:
* None
*
* Returned Value:
* OK on success; Negated errno on failure.
*
****************************************************************************/
#ifdef ESPRESSIF_WLAN_HAS_SOFTAP
int esp_wlan_softap_initialize(void);
#endif /* ESPRESSIF_WLAN_HAS_SOFTAP */
#endif /* CONFIG_ESPRESSIF_WIFI */
#ifdef __cplusplus
}
#endif
#undef EXTERN
#endif /* __ASSEMBLY__ */
#endif /* __ARCH_XTENSA_SRC_COMMON_ESPRESSIF_ESP_WLAN_H */
+12 -1
View File
@@ -131,6 +131,10 @@ ifeq ($(CONFIG_RTC_DRIVER),y)
CHIP_CSRCS += esp32s2_rtc_lowerhalf.c
endif
ifeq ($(CONFIG_ESPRESSIF_WIFI),y)
CHIP_CSRCS += esp32s2_wifi_adapter.c
endif
#############################################################################
# Espressif HAL for 3rd Party Platforms
#############################################################################
@@ -139,7 +143,7 @@ endif
ESP_HAL_3RDPARTY_REPO = esp-hal-3rdparty
ifndef ESP_HAL_3RDPARTY_VERSION
ESP_HAL_3RDPARTY_VERSION = 3986249ef8f567bf542bc35ab283ef488f9fd8e2
ESP_HAL_3RDPARTY_VERSION = 7857ae934736b2de2a387d90bd491fde2b3a5377
endif
ifndef ESP_HAL_3RDPARTY_URL
@@ -169,6 +173,13 @@ include common/espressif/Make.defs
include chip/Bootloader.mk
context:: chip/$(ESP_HAL_3RDPARTY_REPO)
ifeq ($(CONFIG_ESPRESSIF_WIRELESS),y)
$(Q) echo "Espressif HAL for 3rd Party Platforms: initializing submodules..."
$(Q) git -C chip/$(ESP_HAL_3RDPARTY_REPO) submodule --quiet update --init $(GIT_DEPTH_PARAMETER) components/mbedtls/mbedtls components/esp_phy/lib components/esp_wifi/lib
$(Q) git -C chip/$(ESP_HAL_3RDPARTY_REPO)/components/mbedtls/mbedtls reset --quiet --hard
$(Q) echo "Applying patches..."
$(Q) cd chip/$(ESP_HAL_3RDPARTY_REPO)/components/mbedtls/mbedtls && git apply ../../../nuttx/patches/components/mbedtls/mbedtls/*.patch
endif
distclean::
$(call DELDIR,chip/$(ESP_HAL_3RDPARTY_REPO))
+20 -3
View File
@@ -81,6 +81,12 @@
#define ESP32S2_MAX_PRIORITY 5
#define ESP32S2_PRIO_INDEX(p) ((p) - ESP32S2_MIN_PRIORITY)
#ifdef CONFIG_ESPRESSIF_WIFI
# define ESP32S2_WIFI_RESERVE_INT (1 << ESP32S2_CPUINT_MAC)
#else
# define ESP32S2_WIFI_RESERVE_INT 0
#endif
/****************************************************************************
* Private Data
****************************************************************************/
@@ -99,7 +105,8 @@ static uint32_t g_intenable;
* devices.
*/
static uint32_t g_cpu_freeints = ESP32S2_CPUINT_PERIPHSET;
static uint32_t g_cpu_freeints = ESP32S2_CPUINT_PERIPHSET &
~ESP32S2_WIFI_RESERVE_INT;
/* Bitsets for each interrupt priority 1-5 */
@@ -287,13 +294,24 @@ void up_irqinitialize(void)
/* Hard code special cases. */
g_irqmap[XTENSA_IRQ_TIMER0] = ESP32S2_CPUINT_TIMER0;
g_irqmap[XTENSA_IRQ_SWINT] = ESP32S2_CPUINT_SOFTWARE1;
#ifdef CONFIG_ESPRESSIF_WIFI
g_irqmap[ESP32S2_IRQ_MAC] = ESP32S2_CPUINT_MAC;
g_irqmap[ESP32S2_IRQ_PWR] = ESP32S2_CPUINT_PWR;
#endif
/* Initialize CPU interrupts */
esp32s2_cpuint_initialize();
/* Reserve interrupt for some special drivers */
#ifdef CONFIG_ESPRESSIF_WIFI
g_cpu_intmap[ESP32S2_CPUINT_MAC] = CPUINT_ASSIGN(ESP32S2_IRQ_MAC);
g_cpu_intmap[ESP32S2_CPUINT_PWR] = CPUINT_ASSIGN(ESP32S2_IRQ_PWR);
xtensa_enable_cpuint(&g_intenable, 1 << ESP32S2_CPUINT_MAC);
#endif
#ifdef CONFIG_ESP32S2_GPIO_IRQ
/* Initialize GPIO interrupt support */
@@ -634,4 +652,3 @@ uint32_t *xtensa_int_decode(uint32_t cpuints, uint32_t *regs)
return regs;
}
+2 -36
View File
@@ -45,6 +45,8 @@
#include "hardware/wdev_reg.h"
#include "esp32s2_clockconfig.h"
#include "esp_random.h"
#if defined(CONFIG_ESP32S2_RNG)
#if defined(CONFIG_DEV_RANDOM) || defined(CONFIG_DEV_URANDOM_ARCH)
@@ -83,42 +85,6 @@ static const struct file_operations g_rngops =
* Private functions
****************************************************************************/
/****************************************************************************
* Name: esp32s2_random
****************************************************************************/
uint32_t IRAM_ATTR esp_random(void)
{
/* The PRNG which implements WDEV_RANDOM register gets 2 bits
* of extra entropy from a hardware randomness source every APB clock cycle
* (provided Wi-Fi or BT are enabled). To make sure entropy is not drained
* faster than it is added, this function needs to wait for at least 16 APB
* clock cycles after reading previous word. This implementation may
* actually wait a bit longer due to extra time spent in arithmetic and
* branch statements.
*
* As a (probably unnecessary) precaution to avoid returning the
* RNG state as-is, the result is XORed with additional
* WDEV_RND_REG reads while waiting.
*/
uint32_t cpu_to_apb_freq_ratio = esp_clk_cpu_freq() / esp_clk_apb_freq();
static uint32_t last_ccount = 0;
uint32_t ccount;
uint32_t result = 0;
do
{
ccount = XTHAL_GET_CCOUNT();
result ^= getreg32(WDEV_RND_REG);
}
while (ccount - last_ccount < cpu_to_apb_freq_ratio * 16);
last_ccount = ccount;
return result ^ getreg32(WDEV_RND_REG);
}
/****************************************************************************
* Name: esp32s2_rng_read
****************************************************************************/
+16
View File
@@ -50,12 +50,17 @@
#include "hal/cache_types.h"
#include "hal/cache_ll.h"
#include "hal/cache_hal.h"
#include "hal/sar_ctrl_ll.h"
#include "rom/spi_flash.h"
#ifdef CONFIG_ESPRESSIF_SIMPLE_BOOT
# include "bootloader_init.h"
#endif
#include "bootloader_random.h"
#include "bootloader_soc.h"
#include "esp_clk_internal.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
@@ -346,6 +351,17 @@ static void noreturn_function IRAM_ATTR __esp32s2_start(void)
}
#endif
/* Initialize peripherals parameters */
esp_perip_clk_init();
/* RNG is enabled during boot and must be disabled otherwise
* Wi-Fi gets unstable.
*/
bootloader_random_disable();
bootloader_ana_clock_glitch_reset_config(false);
/* The 2nd stage bootloader enables RTC WDT to check on startup sequence
* related issues in application. Hence disable that as we are about to
* start the NuttX environment.
@@ -37,6 +37,10 @@
* Pre-processor Definitions
****************************************************************************/
/* Each handler allows setting a callback function which is called in case
* of a system reset, for whatever reason.
*/
#define SHUTDOWN_HANDLERS_NO 4
/****************************************************************************
@@ -18,8 +18,8 @@
*
****************************************************************************/
#ifndef __ARCH_XTENSA_SRC_ESP32S3_ESP32S3_SYSTEMRESET_H
#define __ARCH_XTENSA_SRC_ESP32S3_ESP32S3_SYSTEMRESET_H
#ifndef __ARCH_XTENSA_SRC_ESP32S2_ESP32S2_SYSTEMRESET_H
#define __ARCH_XTENSA_SRC_ESP32S2_ESP32S2_SYSTEMRESET_H
/****************************************************************************
* Included Files
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+11 -2
View File
@@ -28,12 +28,15 @@ INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)$(CHIP_SERIES)$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)$(CHIP_SERIES)$(DELIM)private_include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_common$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_event$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)include$(DELIM)esp_private
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)include$(DELIM)soc
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)port$(DELIM)$(CHIP_SERIES)
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)port$(DELIM)$(CHIP_SERIES)$(DELIM)private_include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)port$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_phy$(DELIM)$(CHIP_SERIES)$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_phy$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_rom$(DELIM)$(CHIP_SERIES)
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_rom$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_rom$(DELIM)include$(DELIM)$(CHIP_SERIES)
@@ -42,6 +45,7 @@ INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_system$(DELIM)port$(DELIM)include$(DELIM)private
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_system$(DELIM)port$(DELIM)public_compat
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_timer$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_wifi$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)$(CHIP_SERIES)$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)platform_port$(DELIM)include
@@ -75,6 +79,7 @@ CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)cpu.c
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)esp_clk.c
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)hw_random.c
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)mac_addr.c
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)periph_ctrl.c
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)port$(DELIM)$(CHIP_SERIES)$(DELIM)cpu_region_protect.c
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)port$(DELIM)$(CHIP_SERIES)$(DELIM)esp_clk_tree.c
@@ -83,6 +88,8 @@ CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)port$(DELIM)$(CHIP_SERIES)$(DELIM)rtc_time.c
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)port$(DELIM)esp_clk_tree_common.c
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)regi2c_ctrl.c
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_phy$(DELIM)src$(DELIM)phy_init.c
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_phy$(DELIM)src$(DELIM)phy_common.c
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_rom$(DELIM)patches$(DELIM)esp_rom_regi2c_$(CHIP_SERIES).c
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_rom$(DELIM)patches$(DELIM)esp_rom_wdt.c
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_system$(DELIM)port$(DELIM)soc$(DELIM)$(CHIP_SERIES)$(DELIM)clk.c
@@ -110,6 +117,10 @@ CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)soc$
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)soc$(DELIM)$(CHIP_SERIES)$(DELIM)temperature_sensor_periph.c
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)spi_flash$(DELIM)flash_ops.c
# Bootloader files
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)src$(DELIM)${CHIP_SERIES}$(DELIM)bootloader_soc.c
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)src$(DELIM)bootloader_random_${CHIP_SERIES}.c
ifeq ($(CONFIG_ESPRESSIF_SIMPLE_BOOT),y)
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)nuttx$(DELIM)src$(DELIM)bootloader_banner_wrap.c
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)src$(DELIM)bootloader_console.c
@@ -125,9 +136,7 @@ ifeq ($(CONFIG_ESPRESSIF_SIMPLE_BOOT),y)
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)src$(DELIM)bootloader_efuse.c
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)src$(DELIM)bootloader_mem.c
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)src$(DELIM)bootloader_random.c
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)src$(DELIM)bootloader_random_${CHIP_SERIES}.c
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)src$(DELIM)esp_image_format.c
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)src$(DELIM)${CHIP_SERIES}$(DELIM)bootloader_soc.c
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)src$(DELIM)${CHIP_SERIES}$(DELIM)bootloader_sha.c
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)src$(DELIM)flash_encrypt.c
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)soc$(DELIM)${CHIP_SERIES}$(DELIM)uart_periph.c
@@ -0,0 +1,73 @@
/****************************************************************************
* boards/xtensa/esp32s2/common/include/esp32s2_board_wlan.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
#ifndef __BOARDS_XTENSA_ESP32S2_COMMON_INCLUDE_ESP32S2_BOARD_WLAN_H
#define __BOARDS_XTENSA_ESP32S2_COMMON_INCLUDE_ESP32S2_BOARD_WLAN_H
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
#ifndef __ASSEMBLY__
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C"
{
#else
#define EXTERN extern
#endif
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
#ifdef CONFIG_ESPRESSIF_WIFI
/****************************************************************************
* Name: board_wlan_init
*
* Description:
* Configure the wireless subsystem.
*
* Returned Value:
* Zero (OK) is returned on success; A negated errno value is returned
* to indicate the nature of any failure.
*
****************************************************************************/
int board_wlan_init(void);
#endif /* CONFIG_ESPRESSIF_WIFI */
#undef EXTERN
#if defined(__cplusplus)
}
#endif
#endif /* __ASSEMBLY__ */
#endif /* __BOARDS_XTENSA_ESP32S2_COMMON_INCLUDE_ESP32S2_BOARD_WLAN_H */
@@ -18,6 +18,8 @@
*
****************************************************************************/
#include <nuttx/config.h>
/* Default entry point: */
ENTRY(__start);
@@ -134,6 +136,13 @@ SECTIONS
*libarch.a:*cpu_region_protect.*(.text .text.* .literal .literal.*)
*libc.a:sq_remlast.*(.literal .text .literal.* .text.*)
*(.wifirxiram .wifirxiram.*)
*(.wifi0iram .wifi0iram.*)
*(.wifiorslpiram .wifiorslpiram.*)
*(.wifislpiram .wifislpiram.*)
*(.wifislprxiram .wifislprxiram.*)
*(.phyiram .phyiram.*)
*(.wifiextrairam .wifiextrairam.*)
/* align + add 16B for CPU dummy speculative instr. fetch */
@@ -312,6 +321,14 @@ SECTIONS
*(.rodata)
*(.rodata.*)
#ifdef CONFIG_ESPRESSIF_WIRELESS
*(.rodata_wlog_verbose.*)
*(.rodata_wlog_debug.*)
*(.rodata_wlog_info.*)
*(.rodata_wlog_warning.*)
*(.rodata_wlog_error.*)
#endif
*(.irom1.text) /* catch stray ICACHE_RODATA_ATTR */
*(.gnu.linkonce.r.*)
*(.rodata1)
@@ -419,6 +436,7 @@ SECTIONS
.rtc.data :
{
. = ALIGN(4);
*(.rtc.data)
*(.rtc.data.*)
*(.rtc.rodata)
@@ -32,6 +32,10 @@ ifeq ($(CONFIG_SPI_DRIVER),y)
CSRCS += esp32s2_board_spidev.c
endif
ifeq ($(CONFIG_ESPRESSIF_WIFI),y)
CSRCS += esp32s2_board_wlan.c
endif
ifeq ($(CONFIG_SPI_SLAVE_DRIVER),y)
CSRCS += esp32s2_board_spislavedev.c
endif
@@ -0,0 +1,80 @@
/****************************************************************************
* boards/xtensa/esp32s2/common/src/esp32s2_board_wlan.c
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/stat.h>
#include <syslog.h>
#include <debug.h>
#include <nuttx/wireless/wireless.h>
#include "espressif/esp_wlan.h"
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: board_wlan_init
*
* Description:
* Configure the wireless subsystem.
*
* Input Parameters:
* None.
*
* Returned Value:
* Zero (OK) is returned on success; A negated errno value is returned
* to indicate the nature of any failure.
*
****************************************************************************/
int board_wlan_init(void)
{
int ret = OK;
#ifdef ESPRESSIF_WLAN_HAS_STA
ret = esp_wlan_sta_initialize();
if (ret)
{
wlerr("ERROR: Failed to initialize Wi-Fi station\n");
return ret;
}
#endif /* ESPRESSIF_WLAN_HAS_STA */
#ifdef ESPRESSIF_WLAN_HAS_SOFTAP
ret = esp_wlan_softap_initialize();
if (ret)
{
wlerr("ERROR: Failed to initialize Wi-Fi softAP\n");
return ret;
}
#endif /* ESPRESSIF_WLAN_HAS_SOFTAP */
return ret;
}
@@ -0,0 +1,86 @@
#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
# modifications.
#
# CONFIG_ARCH_LEDS is not set
# CONFIG_NSH_ARGCAT is not set
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
CONFIG_ALLOW_BSD_COMPONENTS=y
CONFIG_ARCH="xtensa"
CONFIG_ARCH_BOARD="esp32s2-saola-1"
CONFIG_ARCH_BOARD_COMMON=y
CONFIG_ARCH_BOARD_ESP32S2_SAOLA_1=y
CONFIG_ARCH_CHIP="esp32s2"
CONFIG_ARCH_CHIP_ESP32S2=y
CONFIG_ARCH_CHIP_ESP32S2WROVER=y
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_XTENSA=y
CONFIG_BOARD_LOOPSPERMSEC=16717
CONFIG_BUILTIN=y
CONFIG_DEFAULT_TASK_STACKSIZE=4096
CONFIG_DRIVERS_IEEE80211=y
CONFIG_DRIVERS_WIRELESS=y
CONFIG_ESP32S2_RT_TIMER_TASK_STACK_SIZE=4096
CONFIG_ESP32S2_SPIFLASH_SPIFFS=y
CONFIG_ESP32S2_UART0=y
CONFIG_ESPRESSIF_SPIFLASH=y
CONFIG_ESPRESSIF_WIFI=y
CONFIG_ESPRESSIF_WIFI_STATION_SOFTAP=y
CONFIG_EXAMPLES_DHCPD=y
CONFIG_FS_PROCFS=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_IDLETHREAD_STACKSIZE=3072
CONFIG_INIT_ENTRYPOINT="nsh_main"
CONFIG_INIT_STACKSIZE=8192
CONFIG_INTELHEX_BINARY=y
CONFIG_IOB_NBUFFERS=124
CONFIG_IOB_THROTTLE=24
CONFIG_NAME_MAX=48
CONFIG_NETDB_DNSCLIENT=y
CONFIG_NETDEV_LATEINIT=y
CONFIG_NETDEV_PHY_IOCTL=y
CONFIG_NETDEV_WIRELESS_IOCTL=y
CONFIG_NETUTILS_CJSON=y
CONFIG_NETUTILS_DHCPD=y
CONFIG_NETUTILS_IPERF=y
CONFIG_NET_BROADCAST=y
CONFIG_NET_ETH_PKTSIZE=1514
CONFIG_NET_ICMP_SOCKET=y
CONFIG_NET_TCP=y
CONFIG_NET_TCP_DELAYED_ACK=y
CONFIG_NET_TCP_WRITE_BUFFERS=y
CONFIG_NET_UDP=y
CONFIG_NET_UDP_WRITE_BUFFERS=y
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_LINELEN=64
CONFIG_NSH_READLINE=y
CONFIG_POSIX_SPAWN_DEFAULT_STACKSIZE=2048
CONFIG_PREALLOC_TIMERS=4
CONFIG_PTHREAD_MUTEX_TYPES=y
CONFIG_RAM_SIZE=114688
CONFIG_RAM_START=0x20000000
CONFIG_RR_INTERVAL=200
CONFIG_SCHED_LPWORK=y
CONFIG_SCHED_WAITPID=y
CONFIG_SIG_DEFAULT=y
CONFIG_START_DAY=6
CONFIG_START_MONTH=12
CONFIG_START_YEAR=2011
CONFIG_SYSLOG_BUFFER=y
CONFIG_SYSTEM_DHCPC_RENEW=y
CONFIG_SYSTEM_NSH=y
CONFIG_SYSTEM_PING=y
CONFIG_TIMER=y
CONFIG_TLS_TASK_NELEM=4
CONFIG_UART0_SERIAL_CONSOLE=y
CONFIG_WIRELESS=y
CONFIG_WIRELESS_WAPI=y
CONFIG_WIRELESS_WAPI_CMDTOOL=y
CONFIG_WIRELESS_WAPI_INITCONF=y
CONFIG_WIRELESS_WAPI_STACKSIZE=8192
@@ -0,0 +1,81 @@
#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
# modifications.
#
# CONFIG_ARCH_LEDS is not set
# CONFIG_NSH_ARGCAT is not set
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
CONFIG_ALLOW_BSD_COMPONENTS=y
CONFIG_ARCH="xtensa"
CONFIG_ARCH_BOARD="esp32s2-saola-1"
CONFIG_ARCH_BOARD_COMMON=y
CONFIG_ARCH_BOARD_ESP32S2_SAOLA_1=y
CONFIG_ARCH_CHIP="esp32s2"
CONFIG_ARCH_CHIP_ESP32S2=y
CONFIG_ARCH_CHIP_ESP32S2WROVER=y
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_XTENSA=y
CONFIG_BOARD_LOOPSPERMSEC=16717
CONFIG_BUILTIN=y
CONFIG_DEFAULT_TASK_STACKSIZE=4096
CONFIG_DRIVERS_IEEE80211=y
CONFIG_DRIVERS_WIRELESS=y
CONFIG_ESP32S2_RT_TIMER_TASK_STACK_SIZE=4096
CONFIG_ESP32S2_UART0=y
CONFIG_ESPRESSIF_WIFI=y
CONFIG_FS_PROCFS=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_IDLETHREAD_STACKSIZE=3072
CONFIG_INIT_ENTRYPOINT="nsh_main"
CONFIG_INIT_STACKSIZE=8192
CONFIG_INTELHEX_BINARY=y
CONFIG_IOB_NBUFFERS=124
CONFIG_IOB_THROTTLE=24
CONFIG_NAME_MAX=48
CONFIG_NETDB_DNSCLIENT=y
CONFIG_NETDEV_LATEINIT=y
CONFIG_NETDEV_PHY_IOCTL=y
CONFIG_NETDEV_WIRELESS_IOCTL=y
CONFIG_NETUTILS_CJSON=y
CONFIG_NETUTILS_IPERF=y
CONFIG_NET_BROADCAST=y
CONFIG_NET_ETH_PKTSIZE=1514
CONFIG_NET_ICMP_SOCKET=y
CONFIG_NET_TCP=y
CONFIG_NET_TCP_DELAYED_ACK=y
CONFIG_NET_TCP_WRITE_BUFFERS=y
CONFIG_NET_UDP=y
CONFIG_NET_UDP_WRITE_BUFFERS=y
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_LINELEN=64
CONFIG_NSH_READLINE=y
CONFIG_POSIX_SPAWN_DEFAULT_STACKSIZE=2048
CONFIG_PREALLOC_TIMERS=4
CONFIG_PTHREAD_MUTEX_TYPES=y
CONFIG_RAM_SIZE=114688
CONFIG_RAM_START=0x20000000
CONFIG_RR_INTERVAL=200
CONFIG_SCHED_LPWORK=y
CONFIG_SCHED_WAITPID=y
CONFIG_SIG_DEFAULT=y
CONFIG_START_DAY=6
CONFIG_START_MONTH=12
CONFIG_START_YEAR=2011
CONFIG_SYSLOG_BUFFER=y
CONFIG_SYSTEM_DHCPC_RENEW=y
CONFIG_SYSTEM_NSH=y
CONFIG_SYSTEM_PING=y
CONFIG_TIMER=y
CONFIG_TLS_TASK_NELEM=4
CONFIG_UART0_SERIAL_CONSOLE=y
CONFIG_WIRELESS=y
CONFIG_WIRELESS_WAPI=y
CONFIG_WIRELESS_WAPI_CMDTOOL=y
CONFIG_WIRELESS_WAPI_INITCONF=y
CONFIG_WIRELESS_WAPI_STACKSIZE=8192
@@ -50,6 +50,10 @@
# include "esp32s2_tim_lowerhalf.h"
#endif
#ifdef CONFIG_ESPRESSIF_WIFI
# include "esp32s2_board_wlan.h"
#endif
#ifdef CONFIG_ESP32S2_I2C
# include "esp32s2_i2c.h"
#endif
@@ -302,6 +306,19 @@ int esp32s2_bringup(void)
}
#endif
#ifdef CONFIG_ESPRESSIF_WIRELESS
#ifdef CONFIG_ESPRESSIF_WIFI
ret = board_wlan_init();
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: Failed to initialize wireless subsystem=%d\n",
ret);
}
#endif
#endif
#ifdef CONFIG_SENSORS_BMP180
/* Try to register BMP180 device in I2C0 */