esp32c6/wifi: Add support for the Wi-Fi in ESP32-C6
This commit introduces support for both station and softAP modes.
This commit is contained in:
parent
9e8c9ea47f
commit
2c4963dcd6
@ -197,6 +197,26 @@ Once booted you can use the following commands to mount the file system::
|
||||
nsh> mksmartfs /dev/smart0
|
||||
nsh> mount -t smartfs /dev/smart0 /mnt
|
||||
|
||||
sta_softap
|
||||
----------
|
||||
|
||||
With this configuration 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.
|
||||
|
||||
timer
|
||||
-----
|
||||
|
||||
@ -255,3 +275,24 @@ To test it, just run the following command::
|
||||
nsh> wdog -i /dev/watchdogX
|
||||
|
||||
Where X is the watchdog instance.
|
||||
|
||||
wifi
|
||||
----
|
||||
|
||||
Enables Wi-Fi support. You can define your credentials this way::
|
||||
|
||||
$ make menuconfig
|
||||
-> Application Configuration
|
||||
-> Network Utilities
|
||||
-> Network initialization (NETUTILS_NETINIT [=y])
|
||||
-> WAPI Configuration
|
||||
|
||||
Or if you don't want to keep it saved in the firmware you can do it
|
||||
at runtime::
|
||||
|
||||
nsh> wapi psk wlan0 mypasswd 3
|
||||
nsh> wapi essid wlan0 myssid 1
|
||||
nsh> renew wlan0
|
||||
|
||||
.. tip:: Please refer to :ref:`ESP32 Wi-Fi Station Mode <esp32_wi-fi_sta>`
|
||||
for more information.
|
||||
|
@ -197,6 +197,26 @@ Once booted you can use the following commands to mount the file system::
|
||||
nsh> mksmartfs /dev/smart0
|
||||
nsh> mount -t smartfs /dev/smart0 /mnt
|
||||
|
||||
sta_softap
|
||||
----------
|
||||
|
||||
With this configuration 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.
|
||||
|
||||
timer
|
||||
-----
|
||||
|
||||
@ -255,3 +275,24 @@ To test it, just run the following command::
|
||||
nsh> wdog -i /dev/watchdogX
|
||||
|
||||
Where X is the watchdog instance.
|
||||
|
||||
wifi
|
||||
----
|
||||
|
||||
Enables Wi-Fi support. You can define your credentials this way::
|
||||
|
||||
$ make menuconfig
|
||||
-> Application Configuration
|
||||
-> Network Utilities
|
||||
-> Network initialization (NETUTILS_NETINIT [=y])
|
||||
-> WAPI Configuration
|
||||
|
||||
Or if you don't want to keep it saved in the firmware you can do it
|
||||
at runtime::
|
||||
|
||||
nsh> wapi psk wlan0 mypasswd 3
|
||||
nsh> wapi essid wlan0 myssid 1
|
||||
nsh> renew wlan0
|
||||
|
||||
.. tip:: Please refer to :ref:`ESP32 Wi-Fi Station Mode <esp32_wi-fi_sta>`
|
||||
for more information.
|
||||
|
@ -163,7 +163,7 @@ SPIFLASH Yes
|
||||
Timers Yes
|
||||
UART Yes
|
||||
Watchdog Yes
|
||||
Wifi No
|
||||
Wifi Yes
|
||||
XTS No
|
||||
============== =======
|
||||
|
||||
|
@ -339,8 +339,266 @@ config ESP_RMT
|
||||
format, RMT can be extended to a versatile and general-purpose
|
||||
transceiver, transmitting or receiving many other types of signals.
|
||||
|
||||
config ESP_WIRELESS
|
||||
bool
|
||||
default n
|
||||
select NET
|
||||
select ARCH_PHY_INTERRUPT
|
||||
select RTC
|
||||
select RTC_DRIVER
|
||||
select ESPRESSIF_HR_TIMER
|
||||
|
||||
config ESPRESSIF_WIFI
|
||||
bool "Wi-Fi"
|
||||
depends on ESPRESSIF_ESP32C6
|
||||
default n
|
||||
select ESP_WIRELESS
|
||||
---help---
|
||||
Enable Wi-Fi support
|
||||
|
||||
config ESP_COEX_SW_COEXIST_ENABLE
|
||||
bool "Software WiFi/Bluetooth/IEEE 802.15.4 coexistence"
|
||||
depends on (ESPRESSIF_WIFI && ESPRESSIF_BLE) || \
|
||||
(ESPRESSIF_WIFI && ESP_IEEE802154) || \
|
||||
(ESP_IEEE802154 && ESPRESSIF_BLE)
|
||||
default y
|
||||
---help---
|
||||
If enabled, WiFi & Bluetooth coexistence is controlled by software rather than hardware.
|
||||
Recommended for heavy traffic scenarios. Both coexistence configuration options are
|
||||
automatically managed, no user intervention is required.
|
||||
If only Bluetooth is used, it is recommended to disable this option to reduce binary file
|
||||
size.
|
||||
|
||||
endmenu # Peripheral 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 ESPRESSIF_WIFI_GCMP_SUPPORT
|
||||
select ESPRESSIF_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 # ESPRESSIF_WIFI_MODE
|
||||
|
||||
config ESPRESSIF_WIFI_ENABLE_WPA3_SAE
|
||||
bool "Enable WPA3-Personal"
|
||||
default y
|
||||
---help---
|
||||
Select this option to allow the device to establish a WPA3-Personal 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_ENABLE_SAE_PK
|
||||
bool "Enable SAE-PK"
|
||||
depends on ESPRESSIF_WIFI_ENABLE_WPA3_SAE
|
||||
default y
|
||||
---help---
|
||||
Select this option to enable SAE-PK
|
||||
|
||||
config ESPRESSIF_WIFI_SOFTAP_SAE_SUPPORT
|
||||
bool "Enable WPA3 Personal(SAE) SoftAP"
|
||||
default y
|
||||
depends on ESPRESSIF_WIFI_ENABLE_WPA3_SAE
|
||||
depends on ESPRESSIF_WIFI_SOFTAP || ESPRESSIF_WIFI_STATION_SOFTAP
|
||||
---help---
|
||||
Select this option to enable SAE support in softAP mode.
|
||||
|
||||
config ESPRESSIF_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_RX_BUFFER_NUM
|
||||
int "Max number of WiFi static RX buffers"
|
||||
range 2 25 if !ESPRESSIF_ESP32C6
|
||||
range 2 128 if ESPRESSIF_ESP32C6
|
||||
default 10
|
||||
---help---
|
||||
Set the number of WiFi static RX buffers. Each buffer takes approximately 1.6KB of RAM.
|
||||
The static rx buffers are allocated when esp_wifi_init is called, they are not freed
|
||||
until esp_wifi_deinit is called.
|
||||
|
||||
WiFi hardware use these buffers to receive all 802.11 frames.
|
||||
A higher number may allow higher throughput but increases memory use. If ESPRESSIF_WIFI_AMPDU_RX_ENABLED
|
||||
is enabled, this value is recommended to set equal or bigger than ESPRESSIF_WIFI_RX_BA_WIN in order to
|
||||
achieve better throughput and compatibility with both stations and APs.
|
||||
|
||||
config ESPRESSIF_WIFI_DYNAMIC_RX_BUFFER_NUM
|
||||
int "Max number of WiFi dynamic RX buffers"
|
||||
default 32
|
||||
---help---
|
||||
Set the number of WiFi dynamic RX buffers, 0 means unlimited RX buffers will be allocated
|
||||
(provided sufficient free RAM). The size of each dynamic RX buffer depends on the size of
|
||||
the received data frame.
|
||||
|
||||
For each received data frame, the WiFi driver makes a copy to an RX buffer and then delivers
|
||||
it to the high layer TCP/IP stack. The dynamic RX buffer is freed after the higher layer has
|
||||
successfully received the data frame.
|
||||
|
||||
For some applications, WiFi data frames may be received faster than the application can
|
||||
process them. In these cases we may run out of memory if RX buffer number is unlimited (0).
|
||||
|
||||
If a dynamic RX buffer limit is set, it should be at least the number of static RX buffers.
|
||||
|
||||
config ESPRESSIF_WIFI_DYNAMIC_TX_BUFFER_NUM
|
||||
int "Max number of WiFi dynamic TX buffers"
|
||||
range 1 128
|
||||
default 32
|
||||
---help---
|
||||
Set the number of WiFi dynamic TX buffers. The size of each dynamic TX buffer is not fixed,
|
||||
it depends on the size of each transmitted data frame.
|
||||
|
||||
For each transmitted frame from the higher layer TCP/IP stack, the WiFi driver makes a copy
|
||||
of it in a TX buffer. For some applications, especially UDP applications, the upper layer
|
||||
can deliver frames faster than WiFi layer can transmit. In these cases, we may run out of TX
|
||||
buffers.
|
||||
|
||||
config ESPRESSIF_WIFI_AMPDU_TX_ENABLED
|
||||
bool "Wi-Fi TX AMPDU"
|
||||
default y
|
||||
---help---
|
||||
Select this option to enable AMPDU TX feature
|
||||
|
||||
config ESPRESSIF_WIFI_TX_BA_WIN
|
||||
int "WiFi AMPDU TX BA window size"
|
||||
depends on ESPRESSIF_WIFI_AMPDU_TX_ENABLED
|
||||
range 2 32 if !ESPRESSIF_ESP32C6
|
||||
range 2 64 if ESPRESSIF_ESP32C6
|
||||
default 6
|
||||
|
||||
config ESPRESSIF_WIFI_AMPDU_RX_ENABLED
|
||||
bool "WiFi AMPDU RX"
|
||||
default y
|
||||
---help---
|
||||
Select this option to enable AMPDU RX feature
|
||||
|
||||
config ESPRESSIF_WIFI_RX_BA_WIN
|
||||
int "WiFi AMPDU RX BA window size"
|
||||
depends on ESPRESSIF_WIFI_AMPDU_RX_ENABLED
|
||||
range 2 32 if !ESPRESSIF_ESP32C6
|
||||
range 2 64 if ESPRESSIF_ESP32C6
|
||||
default 6
|
||||
---help---
|
||||
Set the size of WiFi Block Ack RX window. Generally a bigger value means higher throughput and better
|
||||
compatibility but more memory. Most of time we should NOT change the default value unless special
|
||||
reason, e.g. test the maximum UDP RX throughput with iperf etc. For iperf test in shieldbox, the
|
||||
recommended value is 9~12. If PSRAM is used and WiFi memory is prefered to allocat in PSRAM first,
|
||||
the default and minimum value should be 16 to achieve better throughput and compatibility with both
|
||||
stations and APs.
|
||||
|
||||
config ESPRESSIF_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 ESPRESSIF_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 ESP_POWER_SAVE_MODE
|
||||
prompt "Wi-Fi Power save mode"
|
||||
default ESP_POWER_SAVE_MIN_MODEM if ESPRESSIF_WIFI_BT_COEXIST
|
||||
default ESP_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.
|
||||
|
||||
ESP_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 ESP_POWER_SAVE_NONE is suitable when high throughput is required.
|
||||
|
||||
config ESP_POWER_SAVE_NONE
|
||||
bool "No power save"
|
||||
|
||||
config ESP_POWER_SAVE_MIN_MODEM
|
||||
bool "Minimum modem power saving."
|
||||
|
||||
config ESP_POWER_SAVE_MAX_MODEM
|
||||
bool "Maximum modem power saving"
|
||||
|
||||
endchoice # ESP_POWER_SAVE_MODE
|
||||
|
||||
endmenu # ESPRESSIF_WIFI
|
||||
|
||||
menu "UART Configuration"
|
||||
depends on ESPRESSIF_UART
|
||||
|
||||
|
@ -36,59 +36,67 @@ CHIP_CSRCS += esp_lowputc.c esp_serial.c
|
||||
CHIP_CSRCS += esp_systemreset.c
|
||||
|
||||
ifeq ($(CONFIG_SCHED_TICKLESS),y)
|
||||
CHIP_CSRCS += esp_tickless.c
|
||||
CHIP_CSRCS += esp_tickless.c
|
||||
else
|
||||
CHIP_CSRCS += esp_timerisr.c
|
||||
CHIP_CSRCS += esp_timerisr.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_WATCHDOG),y)
|
||||
CHIP_CSRCS += esp_wdt.c
|
||||
CHIP_CSRCS += esp_wdt.c
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_DEV_RANDOM)$(CONFIG_DEV_URANDOM_ARCH),)
|
||||
CHIP_CSRCS += esp_random.c
|
||||
CHIP_CSRCS += esp_random.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_TIMER),y)
|
||||
CHIP_CSRCS += esp_timer.c
|
||||
CHIP_CSRCS += esp_timer.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ONESHOT),y)
|
||||
CHIP_CSRCS += esp_oneshot.c
|
||||
CHIP_CSRCS += esp_oneshot.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_RTC),y)
|
||||
CHIP_CSRCS += esp_rtc.c
|
||||
CHIP_CSRCS += esp_rtc.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ESPRESSIF_HR_TIMER),y)
|
||||
CHIP_CSRCS += esp_hr_timer.c
|
||||
CHIP_CSRCS += esp_hr_timer.c esp_ets_timer_legacy.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ESPRESSIF_TWAI),y)
|
||||
CHIP_CSRCS += esp_twai.c
|
||||
CHIP_CSRCS += esp_twai.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ESPRESSIF_LEDC),y)
|
||||
CHIP_CSRCS += esp_ledc.c
|
||||
CHIP_CSRCS += esp_ledc.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ESPRESSIF_USBSERIAL),y)
|
||||
CHIP_CSRCS += esp_usbserial.c
|
||||
CHIP_CSRCS += esp_usbserial.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ESP_RMT),y)
|
||||
CHIP_CSRCS += esp_rmt.c
|
||||
ifeq ($(CONFIG_WS2812_NON_SPI_DRIVER),y)
|
||||
CHIP_CSRCS += esp_ws2812.c
|
||||
endif
|
||||
CHIP_CSRCS += esp_rmt.c
|
||||
ifeq ($(CONFIG_WS2812_NON_SPI_DRIVER),y)
|
||||
CHIP_CSRCS += esp_ws2812.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ESPRESSIF_SPIFLASH),y)
|
||||
CHIP_CSRCS += esp_spiflash.c
|
||||
ifeq ($(CONFIG_ESPRESSIF_MTD),y)
|
||||
CHIP_CSRCS += esp_spiflash_mtd.c
|
||||
endif
|
||||
CHIP_CSRCS += esp_spiflash.c
|
||||
ifeq ($(CONFIG_ESPRESSIF_MTD),y)
|
||||
CHIP_CSRCS += esp_spiflash_mtd.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ESP_WIRELESS),y)
|
||||
ifeq ($(CONFIG_ESPRESSIF_WIFI),y)
|
||||
CHIP_CSRCS += esp_wifi_init.c
|
||||
CHIP_CSRCS += esp_wlan.c
|
||||
CHIP_CSRCS += esp_wifi_utils.c
|
||||
endif
|
||||
endif
|
||||
|
||||
#############################################################################
|
||||
@ -99,7 +107,7 @@ endif
|
||||
|
||||
ESP_HAL_3RDPARTY_REPO = esp-hal-3rdparty
|
||||
ifndef ESP_HAL_3RDPARTY_VERSION
|
||||
ESP_HAL_3RDPARTY_VERSION = 54aca80daef2002b0169e67bcde36f19f59cf6cf
|
||||
ESP_HAL_3RDPARTY_VERSION = 581540ed0a5ce9674da44f9ece6a63d052058985
|
||||
endif
|
||||
|
||||
ifndef ESP_HAL_3RDPARTY_URL
|
||||
@ -111,6 +119,13 @@ chip/$(ESP_HAL_3RDPARTY_REPO):
|
||||
$(Q) git clone --quiet $(ESP_HAL_3RDPARTY_URL) chip/$(ESP_HAL_3RDPARTY_REPO)
|
||||
$(Q) echo "Espressif HAL for 3rd Party Platforms: ${ESP_HAL_3RDPARTY_VERSION}"
|
||||
$(Q) git -C chip/$(ESP_HAL_3RDPARTY_REPO) checkout --quiet $(ESP_HAL_3RDPARTY_VERSION)
|
||||
ifeq ($(CONFIG_ESP_WIRELESS),y)
|
||||
$(Q) echo "Espressif HAL for 3rd Party Platforms: initializing submodules..."
|
||||
$(Q) git -C chip/$(ESP_HAL_3RDPARTY_REPO) submodule --quiet update --init --depth=1 components/mbedtls/mbedtls components/esp_phy/lib components/esp_wifi/lib components/esp_coex/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
|
||||
|
||||
include common$(DELIM)espressif$(DELIM)Bootloader.mk
|
||||
|
||||
@ -124,6 +139,10 @@ CHIP_SERIES = $(patsubst "%",%,$(CONFIG_ESPRESSIF_CHIP_SERIES))
|
||||
|
||||
include chip/hal_${CHIP_SERIES}.mk
|
||||
|
||||
ifeq ($(CONFIG_ESP_WIRELESS),y)
|
||||
include common$(DELIM)espressif$(DELIM)Wireless.mk
|
||||
endif
|
||||
|
||||
context:: chip/$(ESP_HAL_3RDPARTY_REPO)
|
||||
$(call COPYFILE,chip/$(ESP_HAL_3RDPARTY_REPO)/components/soc/$(CHIP_SERIES)/include/soc/gpio_sig_map.h,../include/chip/)
|
||||
$(call COPYFILE,chip/$(ESP_HAL_3RDPARTY_REPO)/nuttx/$(CHIP_SERIES)/include/irq.h,../include/chip/)
|
||||
@ -134,4 +153,5 @@ distclean::
|
||||
$(call DELDIR,chip/$(ESP_HAL_3RDPARTY_REPO))
|
||||
|
||||
INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)common$(DELIM)espressif
|
||||
INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)common$(DELIM)espressif$(DELIM)platform_include
|
||||
VPATH += common$(DELIM)espressif
|
||||
|
245
arch/risc-v/src/common/espressif/Wireless.mk
Normal file
245
arch/risc-v/src/common/espressif/Wireless.mk
Normal file
@ -0,0 +1,245 @@
|
||||
############################################################################
|
||||
# arch/risc-v/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)bt$(DELIM)include$(DELIM)$(CHIP_SERIES)$(DELIM)include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_coex$(DELIM)include
|
||||
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_coex$(DELIM)lib$(DELIM)$(CHIP_SERIES)
|
||||
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 -lcoexist
|
||||
ifeq ($(CHIP_SERIES),esp32c6)
|
||||
EXTRA_LIBS += -lmesh
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ESPRESSIF_WIFI),y)
|
||||
|
||||
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 += 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 += hash_info.c
|
||||
CHIP_CSRCS += rsa_alt_helpers.c
|
||||
CHIP_CSRCS += ecdh.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
|
||||
|
||||
ifeq ($(CONFIG_ESPRESSIF_WIFI_ENABLE_SAE_PK),y)
|
||||
CFLAGS += $(DEFINE_PREFIX)CONFIG_SAE_PK
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ESPRESSIF_WIFI_ENABLE_WPA3_OWE_STA),y)
|
||||
CFLAGS += $(DEFINE_PREFIX)CONFIG_OWE_STA
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ESPRESSIF_WIFI_GCMP_SUPPORT),y)
|
||||
CFLAGS += $(DEFINE_PREFIX)CONFIG_GCMP
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ESPRESSIF_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_wpa2.c
|
||||
CHIP_CSRCS += esp_wpa3.c
|
||||
CHIP_CSRCS += esp_wpas_glue.c
|
||||
CHIP_CSRCS += esp_owe.c
|
||||
CHIP_CSRCS += esp_scan.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
|
263
arch/risc-v/src/common/espressif/esp_ets_timer_legacy.c
Normal file
263
arch/risc-v/src/common/espressif/esp_ets_timer_legacy.c
Normal file
@ -0,0 +1,263 @@
|
||||
/****************************************************************************
|
||||
* arch/risc-v/src/common/espressif/esp_ets_timer_legacy.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this args 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* ets_timer module implements a set of legacy timer APIs which are
|
||||
* used by the WiFi driver. This is done on top of the esp_hr_timer APIs.
|
||||
* Applications should not use ets_timer functions, as they may change
|
||||
* without notice.
|
||||
*/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "sdkconfig.h"
|
||||
#include "esp_timer.h"
|
||||
#include "rom/ets_sys.h"
|
||||
#include "esp_attr.h"
|
||||
|
||||
#include "espressif/esp_hr_timer.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* We abuse 'timer_arg' field of ETSTimer structure to hold a
|
||||
* pointer to esp_hr_timer.
|
||||
*/
|
||||
|
||||
#define ESP_TIMER(p_ets_timer) \
|
||||
((struct esp_hr_timer_s *) (p_ets_timer)->timer_arg)
|
||||
|
||||
/* Override internal name to be compliant with NuttX C Coding Standard */
|
||||
|
||||
#define ets_timer ETSTimer
|
||||
#define ets_timer_func ETSTimerFunc
|
||||
|
||||
/* We abuse 'timer_expire' field of ETSTimer structure to hold a magic value
|
||||
* signifying that the contents of the timer was zeroed out.
|
||||
*/
|
||||
|
||||
#define TIMER_INITIALIZED_FIELD(p_ets_timer) ((p_ets_timer)->timer_expire)
|
||||
#define TIMER_INITIALIZED_VAL 0x12121212
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
static bool timer_initialized(ets_timer *ptimer);
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: timer_initialized
|
||||
*
|
||||
* Description:
|
||||
* This function checks if the given ETS timer is initialized.
|
||||
*
|
||||
* Input Parameters:
|
||||
* ptimer - Pointer to the ETS timer structure.
|
||||
*
|
||||
* Returned Value:
|
||||
* Returns true if the timer is initialized, false otherwise.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static bool IRAM_ATTR timer_initialized(ets_timer *ptimer)
|
||||
{
|
||||
return TIMER_INITIALIZED_FIELD(ptimer) == TIMER_INITIALIZED_VAL;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: ets_timer_setfn
|
||||
*
|
||||
* Description:
|
||||
* Set timer callback function and argument.
|
||||
*
|
||||
* Input Parameters:
|
||||
* ptimer - Timer struct pointer
|
||||
* pfunction - Timer callback
|
||||
* parg - Timer callback argument
|
||||
*
|
||||
* Returned Value:
|
||||
* None
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void ets_timer_setfn(ets_timer *ptimer,
|
||||
ets_timer_func *pfunction,
|
||||
void *parg)
|
||||
{
|
||||
int ret = OK;
|
||||
|
||||
if (!timer_initialized(ptimer))
|
||||
{
|
||||
memset(ptimer, 0, sizeof(*ptimer));
|
||||
TIMER_INITIALIZED_FIELD(ptimer) = TIMER_INITIALIZED_VAL;
|
||||
}
|
||||
|
||||
if (ESP_TIMER(ptimer) == NULL)
|
||||
{
|
||||
struct esp_hr_timer_args_s hr_timer_args;
|
||||
struct esp_hr_timer_s *hr_timers_p;
|
||||
|
||||
hr_timer_args.arg = parg;
|
||||
hr_timer_args.callback = pfunction;
|
||||
|
||||
ret = esp_hr_timer_create(&hr_timer_args, &hr_timers_p);
|
||||
|
||||
if (ret)
|
||||
{
|
||||
tmrerr("Failed to create ets_timer error=%d\n", ret);
|
||||
}
|
||||
else
|
||||
{
|
||||
ptimer->timer_arg = hr_timers_p;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: ets_timer_arm_us
|
||||
*
|
||||
* Description:
|
||||
* Arms an ETS timer. The timer range is from 640 us to 429496 ms.
|
||||
*
|
||||
* Input Parameters:
|
||||
* ptimer - Pointer to the timer structure.
|
||||
* time_us - Timer value in microseconds. The range is 1 to 429496729.
|
||||
* repeat_flag - Specifies if the timer is periodically repeated.
|
||||
*
|
||||
* Returned Value:
|
||||
* None
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void IRAM_ATTR ets_timer_arm_us(ets_timer *ptimer,
|
||||
uint32_t time_us,
|
||||
bool repeat_flag)
|
||||
{
|
||||
assert(timer_initialized(ptimer));
|
||||
|
||||
esp_hr_timer_stop(ESP_TIMER(ptimer));
|
||||
|
||||
if (!repeat_flag)
|
||||
{
|
||||
esp_hr_timer_start(ESP_TIMER(ptimer), time_us, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
esp_hr_timer_start(ESP_TIMER(ptimer), time_us, true);
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: ets_timer_arm
|
||||
*
|
||||
* Description:
|
||||
* Arms an ETS timer. The timer range is from 640 us to 429496 ms.
|
||||
*
|
||||
* Input Parameters:
|
||||
* ptimer - Pointer to the timer structure.
|
||||
* time_us - Timer value in microseconds. The range is 1 to 429496.
|
||||
* repeat_flag - Specifies if the timer is periodically repeated.
|
||||
*
|
||||
* Returned Value:
|
||||
* None
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void IRAM_ATTR ets_timer_arm(ets_timer *ptimer,
|
||||
uint32_t time_ms,
|
||||
bool repeat_flag)
|
||||
{
|
||||
uint64_t time_us = 1000LL * (uint64_t) time_ms;
|
||||
|
||||
assert(timer_initialized(ptimer));
|
||||
|
||||
esp_hr_timer_stop(ESP_TIMER(ptimer));
|
||||
|
||||
if (!repeat_flag)
|
||||
{
|
||||
esp_hr_timer_start(ESP_TIMER(ptimer), time_us, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
esp_hr_timer_start(ESP_TIMER(ptimer), time_us, true);
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: ets_timer_done
|
||||
*
|
||||
* Description:
|
||||
* Unset timer callback and argument to NULL.
|
||||
*
|
||||
* Input Parameters:
|
||||
* ptimer - timer data pointer
|
||||
*
|
||||
* Returned Value:
|
||||
* None
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void ets_timer_done(ets_timer *ptimer)
|
||||
{
|
||||
if (timer_initialized(ptimer))
|
||||
{
|
||||
esp_hr_timer_delete(ESP_TIMER(ptimer));
|
||||
ptimer->timer_arg = NULL;
|
||||
TIMER_INITIALIZED_FIELD(ptimer) = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: ets_timer_disarm
|
||||
*
|
||||
* Description:
|
||||
* Disarm an ets timer.
|
||||
*
|
||||
* Input Parameters:
|
||||
* ptimer - timer data pointer
|
||||
*
|
||||
* Returned Value:
|
||||
* None
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void IRAM_ATTR ets_timer_disarm(ets_timer *ptimer)
|
||||
{
|
||||
if (timer_initialized(ptimer))
|
||||
{
|
||||
esp_hr_timer_stop(ESP_TIMER(ptimer));
|
||||
}
|
||||
}
|
@ -97,6 +97,8 @@ static struct esp_hr_timer_context_s g_hr_timer_context =
|
||||
.toutsem = SEM_INITIALIZER(0),
|
||||
};
|
||||
|
||||
static bool g_hr_timer_initialized;
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
@ -118,7 +120,7 @@ static struct esp_hr_timer_context_s g_hr_timer_context =
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int esp_hr_timer_thread(int argc, char *argv[])
|
||||
IRAM_ATTR static int esp_hr_timer_thread(int argc, char *argv[])
|
||||
{
|
||||
struct esp_hr_timer_context_s *priv = &g_hr_timer_context;
|
||||
|
||||
@ -311,8 +313,8 @@ static int IRAM_ATTR esp_hr_timer_isr(int irq, void *context, void *arg)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_hr_timer_create(const struct esp_hr_timer_args_s *args,
|
||||
struct esp_hr_timer_s **timer_handle)
|
||||
int IRAM_ATTR esp_hr_timer_create(const struct esp_hr_timer_args_s *args,
|
||||
struct esp_hr_timer_s **timer_handle)
|
||||
{
|
||||
struct esp_hr_timer_s *timer;
|
||||
|
||||
@ -351,9 +353,9 @@ int esp_hr_timer_create(const struct esp_hr_timer_args_s *args,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void esp_hr_timer_start(struct esp_hr_timer_s *timer,
|
||||
uint64_t timeout,
|
||||
bool repeat)
|
||||
void IRAM_ATTR esp_hr_timer_start(struct esp_hr_timer_s *timer,
|
||||
uint64_t timeout,
|
||||
bool repeat)
|
||||
{
|
||||
struct esp_hr_timer_context_s *priv = &g_hr_timer_context;
|
||||
bool inserted = false;
|
||||
@ -436,7 +438,7 @@ void esp_hr_timer_start(struct esp_hr_timer_s *timer,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void esp_hr_timer_stop(struct esp_hr_timer_s *timer)
|
||||
void IRAM_ATTR esp_hr_timer_stop(struct esp_hr_timer_s *timer)
|
||||
{
|
||||
struct esp_hr_timer_context_s *priv = &g_hr_timer_context;
|
||||
|
||||
@ -666,7 +668,6 @@ void IRAM_ATTR esp_hr_timer_calibration(uint64_t time_us)
|
||||
|
||||
int esp_hr_timer_init(void)
|
||||
{
|
||||
static bool g_hr_timer_initialized = false;
|
||||
struct esp_hr_timer_context_s *priv;
|
||||
int pid;
|
||||
|
||||
|
@ -68,6 +68,7 @@
|
||||
#define CPUINT_FREE(cpuint) ((cpuint).val = 0)
|
||||
#define CPUINT_ISENABLED(cpuint) ((cpuint).cpuint_en == 1)
|
||||
#define CPUINT_ISASSIGNED(cpuint) ((cpuint).assigned == 1)
|
||||
#define CPUINT_ISRESERVED(cpuint) ((cpuint).reserved0 == 1)
|
||||
#define CPUINT_ISFREE(cpuint) (!CPUINT_ISASSIGNED(cpuint))
|
||||
|
||||
/* CPU interrupts can be detached from any interrupt source by setting the
|
||||
@ -113,7 +114,8 @@ static volatile uint8_t g_irq_map[NR_IRQS];
|
||||
* devices.
|
||||
*/
|
||||
|
||||
static uint32_t g_cpuint_freelist = ESP_CPUINT_PERIPHSET;
|
||||
static uint32_t g_cpuint_freelist = ESP_CPUINT_PERIPHSET & \
|
||||
~ESP_WIRELESS_RESERVE_INT;
|
||||
|
||||
/* This bitmask has an 1 if the int should be disabled
|
||||
* when the flash is disabled.
|
||||
@ -200,8 +202,7 @@ static int esp_cpuint_alloc(int irq)
|
||||
|
||||
DEBUGASSERT(CPUINT_ISFREE(g_cpuint_map[cpuint]));
|
||||
|
||||
CPUINT_ASSIGN(g_cpuint_map[cpuint], irq);
|
||||
g_irq_map[irq] = cpuint;
|
||||
esp_set_irq(irq, cpuint);
|
||||
|
||||
return cpuint;
|
||||
}
|
||||
@ -680,3 +681,49 @@ void IRAM_ATTR esp_intr_noniram_enable(void)
|
||||
esp_cpu_intr_enable(non_iram_ints);
|
||||
leave_critical_section(irqstate);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_get_irq
|
||||
*
|
||||
* Description:
|
||||
* This function returns the IRQ associated with a CPU interrupt
|
||||
*
|
||||
* Input Parameters:
|
||||
* cpuint - The CPU interrupt associated to the IRQ
|
||||
*
|
||||
* Returned Value:
|
||||
* The IRQ associated with such CPU interrupt or CPUINT_UNASSIGNED if
|
||||
* IRQ is not yet assigned to a CPU interrupt.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_get_irq(int cpuint)
|
||||
{
|
||||
return CPUINT_GETIRQ(g_cpuint_map[cpuint]);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_set_irq
|
||||
*
|
||||
* Description:
|
||||
* This function assigns a CPU interrupt to a specific IRQ number. It
|
||||
* updates the mapping between IRQ numbers and CPU interrupts, allowing
|
||||
* the system to correctly route hardware interrupts to the appropriate
|
||||
* handlers. Please note that this function is intended to be used only
|
||||
* when a CPU interrupt is already assigned to an IRQ number. Otherwise,
|
||||
* please check esp_setup_irq.
|
||||
*
|
||||
* Input Parameters:
|
||||
* irq - The IRQ number to be associated with the CPU interrupt.
|
||||
* cpuint - The CPU interrupt to be associated with the IRQ number.
|
||||
*
|
||||
* Returned Value:
|
||||
* None
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void esp_set_irq(int irq, int cpuint)
|
||||
{
|
||||
CPUINT_ASSIGN(g_cpuint_map[cpuint], irq);
|
||||
g_irq_map[irq] = cpuint;
|
||||
}
|
||||
|
@ -174,6 +174,45 @@ void esp_intr_noniram_disable(void);
|
||||
|
||||
void esp_intr_noniram_enable(void);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_get_irq
|
||||
*
|
||||
* Description:
|
||||
* This function returns the IRQ associated with a CPU interrupt
|
||||
*
|
||||
* Input Parameters:
|
||||
* cpuint - The CPU interrupt associated to the IRQ
|
||||
*
|
||||
* Returned Value:
|
||||
* The IRQ associated with such CPU interrupt or CPUINT_UNASSIGNED if
|
||||
* IRQ is not yet assigned to a CPU interrupt.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_get_irq(int cpuint);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_set_irq
|
||||
*
|
||||
* Description:
|
||||
* This function assigns a CPU interrupt to a specific IRQ number. It
|
||||
* updates the mapping between IRQ numbers and CPU interrupts, allowing
|
||||
* the system to correctly route hardware interrupts to the appropriate
|
||||
* handlers. Please note that this function is intended to be used only
|
||||
* when a CPU interrupt is already assigned to an IRQ number. Otherwise,
|
||||
* please check esp_setup_irq.
|
||||
*
|
||||
* Input Parameters:
|
||||
* irq - The IRQ number to be associated with the CPU interrupt.
|
||||
* cpuint - The CPU interrupt to be associated with the IRQ number.
|
||||
*
|
||||
* Returned Value:
|
||||
* None
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void esp_set_irq(int irq, int cpuint);
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
@ -865,7 +865,11 @@ int esp_rtc_driverinit(void)
|
||||
|
||||
/* Enable HR-Timer */
|
||||
|
||||
VERIFY(esp_hr_timer_init());
|
||||
ret = esp_hr_timer_init();
|
||||
if (ret < 0)
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
|
||||
g_hr_timer_enabled = true;
|
||||
|
||||
|
@ -152,6 +152,8 @@ extern uint8_t _image_drom_size[];
|
||||
extern int ets_printf(const char *fmt, ...) printf_like(1, 2);
|
||||
#endif
|
||||
|
||||
extern void cache_set_idrom_mmu_size(uint32_t irom_size, uint32_t drom_size);
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
@ -174,6 +176,11 @@ HDR_ATTR static void (*_entry_point)(void) = __start;
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
extern uint8_t _instruction_reserved_start[];
|
||||
extern uint8_t _instruction_reserved_end[];
|
||||
extern uint8_t _rodata_reserved_start[];
|
||||
extern uint8_t _rodata_reserved_end[];
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
@ -384,6 +391,11 @@ static int map_rom_segments(uint32_t app_drom_start, uint32_t app_drom_vaddr,
|
||||
|
||||
void __esp_start(void)
|
||||
{
|
||||
#ifdef CONFIG_ESP_ROM_NEEDS_SET_CACHE_MMU_SIZE
|
||||
uint32_t _instruction_size;
|
||||
uint32_t cache_mmu_irom_size;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESPRESSIF_SIMPLE_BOOT
|
||||
if (bootloader_init() != 0)
|
||||
{
|
||||
@ -410,6 +422,19 @@ void __esp_start(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CONFIG_ESP_ROM_NEEDS_SET_CACHE_MMU_SIZE
|
||||
_instruction_size = (uint32_t)&_instruction_reserved_end - \
|
||||
(uint32_t)&_instruction_reserved_start;
|
||||
cache_mmu_irom_size =
|
||||
((_instruction_size + SPI_FLASH_MMU_PAGE_SIZE - 1) / \
|
||||
SPI_FLASH_MMU_PAGE_SIZE) * sizeof(uint32_t);
|
||||
|
||||
/* Configure the Cache MMU size for instruction and rodata in flash. */
|
||||
|
||||
cache_set_idrom_mmu_size(cache_mmu_irom_size,
|
||||
CACHE_DROM_MMU_MAX_END - cache_mmu_irom_size);
|
||||
#endif /* CONFIG_ESP_ROM_NEEDS_SET_CACHE_MMU_SIZE */
|
||||
|
||||
#ifdef CONFIG_ESPRESSIF_REGION_PROTECTION
|
||||
/* Configure region protection */
|
||||
|
||||
|
465
arch/risc-v/src/common/espressif/esp_wifi_init.c
Normal file
465
arch/risc-v/src/common/espressif/esp_wifi_init.c
Normal file
@ -0,0 +1,465 @@
|
||||
/****************************************************************************
|
||||
* arch/risc-v/src/common/espressif/esp_wifi_init.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this args 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 <assert.h>
|
||||
#include <debug.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <esp_event.h>
|
||||
#include <esp_wifi.h>
|
||||
#include "esp_log.h"
|
||||
#include "esp_private/wifi.h"
|
||||
#include "esp_private/adc_share_hw_ctrl.h"
|
||||
#include "esp_private/sleep_modem.h"
|
||||
#include "esp_sleep.h"
|
||||
#include "esp_private/esp_clk.h"
|
||||
#include "esp_wpa.h"
|
||||
#include "esp_coexist_internal.h"
|
||||
#include "esp_phy_init.h"
|
||||
#include "esp_private/phy.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#if (CONFIG_ESPRESSIF_WIFI_RX_BA_WIN > CONFIG_ESPRESSIF_WIFI_DYNAMIC_RX_BUFFER_NUM)
|
||||
#error "WiFi configuration check: WARNING, WIFI_RX_BA_WIN should not be larger than WIFI_DYNAMIC_RX_BUFFER_NUM!"
|
||||
#endif
|
||||
|
||||
#if (CONFIG_ESPRESSIF_WIFI_RX_BA_WIN > (CONFIG_ESPRESSIF_WIFI_STATIC_RX_BUFFER_NUM << 1))
|
||||
#error "WiFi configuration check: WARNING, WIFI_RX_BA_WIN should not be larger than double of the WIFI_STATIC_RX_BUFFER_NUM!"
|
||||
#endif
|
||||
|
||||
#if SOC_PM_SUPPORT_PMU_MODEM_STATE
|
||||
# define WIFI_BEACON_MONITOR_CONFIG_DEFAULT(ena) { \
|
||||
.enable = (ena), \
|
||||
.loss_timeout = CONFIG_ESP_WIFI_SLP_BEACON_LOST_TIMEOUT, \
|
||||
.loss_threshold = CONFIG_ESP_WIFI_SLP_BEACON_LOST_THRESHOLD, \
|
||||
.delta_intr_early = 0, \
|
||||
.delta_loss_timeout = 0, \
|
||||
.beacon_abort = 1, \
|
||||
.broadcast_wakeup = 1, \
|
||||
.tsf_time_sync_deviation = 5, \
|
||||
.modem_state_consecutive = 10, \
|
||||
.rf_ctrl_wait_cycle = 20 \
|
||||
}
|
||||
#else
|
||||
# define WIFI_BEACON_MONITOR_CONFIG_DEFAULT(ena) { \
|
||||
.enable = (ena), \
|
||||
.loss_timeout = CONFIG_ESP_WIFI_SLP_BEACON_LOST_TIMEOUT, \
|
||||
.loss_threshold = CONFIG_ESP_WIFI_SLP_BEACON_LOST_THRESHOLD, \
|
||||
.delta_intr_early = CONFIG_ESP_WIFI_SLP_PHY_ON_DELTA_EARLY_TIME, \
|
||||
.delta_loss_timeout = CONFIG_ESP_WIFI_SLP_PHY_OFF_DELTA_TIMEOUT_TIME \
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Set additional WiFi features and capabilities */
|
||||
|
||||
uint64_t g_wifi_feature_caps =
|
||||
#if CONFIG_ESP_WIFI_ENABLE_WPA3_SAE
|
||||
CONFIG_FEATURE_WPA3_SAE_BIT |
|
||||
#endif
|
||||
#if CONFIG_SPIRAM
|
||||
CONFIG_FEATURE_CACHE_TX_BUF_BIT |
|
||||
#endif
|
||||
#if CONFIG_ESP_WIFI_FTM_INITIATOR_SUPPORT
|
||||
CONFIG_FEATURE_FTM_INITIATOR_BIT |
|
||||
#endif
|
||||
#if CONFIG_ESP_WIFI_FTM_RESPONDER_SUPPORT
|
||||
CONFIG_FEATURE_FTM_RESPONDER_BIT |
|
||||
#endif
|
||||
0;
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
static void esp_wifi_set_log_level(void);
|
||||
static void esp_wifi_config_info(void);
|
||||
|
||||
extern uint8_t esp_wifi_get_user_init_flag_internal(void);
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
ESP_EVENT_DEFINE_BASE(WIFI_EVENT);
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_set_log_level
|
||||
*
|
||||
* Description:
|
||||
* Sets the log level for the ESP32 WiFi module based on preprocessor
|
||||
* definitions. The log level can be verbose, warning, or error.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* None
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void esp_wifi_set_log_level(void)
|
||||
{
|
||||
wifi_log_level_t wifi_log_level = WIFI_LOG_NONE;
|
||||
|
||||
/* set WiFi log level */
|
||||
|
||||
#if defined(CONFIG_DEBUG_WIRELESS_INFO)
|
||||
wifi_log_level = WIFI_LOG_VERBOSE;
|
||||
#elif defined(CONFIG_DEBUG_WIRELESS_WARN)
|
||||
wifi_log_level = WIFI_LOG_WARNING;
|
||||
#elif defined(CONFIG_LOG_MAXIMUM_LEVEL)
|
||||
wifi_log_level = WIFI_LOG_ERROR;
|
||||
#endif
|
||||
|
||||
esp_wifi_internal_set_log_level(wifi_log_level);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_config_info
|
||||
*
|
||||
* Description:
|
||||
* This function logs the current configuration settings for the Wi-Fi
|
||||
* module. It checks for various configuration options and logs if they
|
||||
* are enabled.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* None
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void esp_wifi_config_info(void)
|
||||
{
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_RX_BA_WIN
|
||||
wlinfo("rx ba win: %d", CONFIG_ESPRESSIF_WIFI_RX_BA_WIN);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP
|
||||
wlinfo("WiFi/LWIP prefer SPIRAM");
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP_WIFI_IRAM_OPT
|
||||
wlinfo("WiFi IRAM OP enabled");
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP_WIFI_RX_IRAM_OPT
|
||||
wlinfo("WiFi RX IRAM OP enabled");
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP_WIFI_SLP_IRAM_OPT
|
||||
wlinfo("WiFi SLP IRAM OP enabled");
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LWIP_IRAM_OPTIMIZATION
|
||||
wlinfo("LWIP IRAM OP enabled");
|
||||
#endif
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CONFIG_ESP_WIFI_FTM_ENABLE
|
||||
|
||||
/****************************************************************************
|
||||
* Name: ieee80211_ftm_attach
|
||||
*
|
||||
* Description:
|
||||
* This function initializes and attaches the Fine Timing Measurement (FTM)
|
||||
* capabilities to the IEEE 802.11 Wi-Fi driver. FTM is used for precise
|
||||
* distance measurements between Wi-Fi devices.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* None
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void ieee80211_ftm_attach(void)
|
||||
{
|
||||
/* Do not remove, stub to overwrite weak link in Wi-Fi Lib */
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_ESP_WIFI_SOFTAP_SUPPORT
|
||||
|
||||
/****************************************************************************
|
||||
* Name: net80211_softap_funcs_init
|
||||
*
|
||||
* Description:
|
||||
* This function is a placeholder for initializing the SoftAP (Software
|
||||
* Access Point) functionalities of the IEEE 802.11 Wi-Fi driver. It is
|
||||
* only compiled if the CONFIG_ESP_WIFI_SOFTAP_SUPPORT configuration
|
||||
* option is not set.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* None
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void net80211_softap_funcs_init(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_ESP_WIFI_NAN_ENABLE
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nan_start
|
||||
*
|
||||
* Description:
|
||||
* This function is a stub to overwrite a weak link in the Wi-Fi library.
|
||||
* It is used to start the NAN (Neighbor Awareness Networking) service.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* Always returns ESP_OK.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
esp_err_t nan_start(void)
|
||||
{
|
||||
/* Do not remove, stub to overwrite weak link in Wi-Fi Lib */
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nan_stop
|
||||
*
|
||||
* Description:
|
||||
* This function is a stub to overwrite a weak link in the Wi-Fi library.
|
||||
* It is used to stop the NAN (Neighbor Awareness Networking) service.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* Always returns ESP_OK.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
esp_err_t nan_stop(void)
|
||||
{
|
||||
/* Do not remove, stub to overwrite weak link in Wi-Fi Lib */
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nan_input
|
||||
*
|
||||
* Description:
|
||||
* This function is a stub to overwrite a weak link in the Wi-Fi library.
|
||||
* It is used to handle input for the NAN (Neighbor Awareness Networking)
|
||||
* service.
|
||||
*
|
||||
* Input Parameters:
|
||||
* p1 - First parameter for the input function.
|
||||
* p2 - Second parameter for the input function.
|
||||
* p3 - Third parameter for the input function.
|
||||
*
|
||||
* Returned Value:
|
||||
* Always returns 0.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int nan_input(void *p1, int p2, int p3)
|
||||
{
|
||||
/* Do not remove, stub to overwrite weak link in Wi-Fi Lib */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nan_sm_handle_event
|
||||
*
|
||||
* Description:
|
||||
* This function is a stub to overwrite a weak link in the Wi-Fi library.
|
||||
* It is used to handle events for the NAN (Neighbor Awareness Networking)
|
||||
* service state machine.
|
||||
*
|
||||
* Input Parameters:
|
||||
* p1 - First parameter for the event handler.
|
||||
* p2 - Second parameter for the event handler.
|
||||
*
|
||||
* Returned Value:
|
||||
* None
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void nan_sm_handle_event(void *p1, int p2)
|
||||
{
|
||||
/* Do not remove, stub to overwrite weak link in Wi-Fi Lib */
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_deinit
|
||||
*
|
||||
* Description:
|
||||
* Deinitialize Wi-Fi and free resource
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Values: esp_err_t
|
||||
* Zero (OK) is returned or a negative error.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
esp_err_t esp_wifi_deinit(void)
|
||||
{
|
||||
esp_err_t err = ESP_OK;
|
||||
#ifdef CONFIG_ESP_WIFI_SLP_BEACON_LOST_OPT
|
||||
wifi_beacon_monitor_config_t monitor_config;
|
||||
#endif
|
||||
|
||||
if (esp_wifi_get_user_init_flag_internal())
|
||||
{
|
||||
wlerr("Wi-Fi not stop");
|
||||
return ESP_ERR_WIFI_NOT_STOPPED;
|
||||
}
|
||||
|
||||
if (esp_wifi_internal_reg_rxcb(WIFI_IF_STA, NULL) != ESP_OK ||
|
||||
esp_wifi_internal_reg_rxcb(WIFI_IF_AP, NULL) != ESP_OK)
|
||||
{
|
||||
wlerr("Failed to unregister Rx callbacks");
|
||||
}
|
||||
|
||||
esp_supplicant_deinit();
|
||||
err = esp_wifi_deinit_internal();
|
||||
if (err != ESP_OK)
|
||||
{
|
||||
wlerr("Failed to deinit Wi-Fi driver (0x%x)", err);
|
||||
return err;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ESP_WIFI_SLP_BEACON_LOST_OPT
|
||||
monitor_config = WIFI_BEACON_MONITOR_CONFIG_DEFAULT(false);
|
||||
esp_wifi_beacon_monitor_configure(&monitor_config);
|
||||
#endif
|
||||
|
||||
#if CONFIG_MAC_BB_PD
|
||||
esp_unregister_mac_bb_pd_callback(pm_mac_sleep);
|
||||
esp_unregister_mac_bb_pu_callback(pm_mac_wakeup);
|
||||
#endif
|
||||
esp_wifi_power_domain_off();
|
||||
#if CONFIG_MAC_BB_PD
|
||||
esp_wifi_internal_set_mac_sleep(false);
|
||||
esp_mac_bb_pd_mem_deinit();
|
||||
#endif
|
||||
esp_phy_modem_deinit();
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_init
|
||||
*
|
||||
* Description:
|
||||
* Initialize Wi-Fi
|
||||
*
|
||||
* Input Parameters:
|
||||
* config - Initialization config parameters
|
||||
*
|
||||
* Returned Values: esp_err_t
|
||||
* Zero (OK) is returned or a negative error.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
esp_err_t esp_wifi_init(const wifi_init_config_t *config)
|
||||
{
|
||||
esp_err_t result = ESP_OK;
|
||||
#ifdef CONFIG_ESP_WIFI_SLP_BEACON_LOST_OPT
|
||||
wifi_beacon_monitor_config_t monitor_config;
|
||||
#endif
|
||||
|
||||
if ((config->feature_caps & CONFIG_FEATURE_CACHE_TX_BUF_BIT) &&
|
||||
(WIFI_CACHE_TX_BUFFER_NUM == 0))
|
||||
{
|
||||
wlerr("Number of WiFi cache TX buffers should not equal 0 when"
|
||||
"enable SPIRAM");
|
||||
return ESP_ERR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
esp_wifi_power_domain_on();
|
||||
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
coex_init();
|
||||
#endif
|
||||
esp_wifi_set_log_level();
|
||||
|
||||
result = esp_wifi_init_internal(config);
|
||||
if (result == ESP_OK)
|
||||
{
|
||||
#if CONFIG_MAC_BB_PD
|
||||
esp_mac_bb_pd_mem_init();
|
||||
esp_wifi_internal_set_mac_sleep(true);
|
||||
#endif
|
||||
esp_phy_modem_init();
|
||||
|
||||
result = esp_supplicant_init();
|
||||
if (result != ESP_OK)
|
||||
{
|
||||
esp_err_t deinit_ret;
|
||||
|
||||
wlerr("Failed to init supplicant (0x%x)", result);
|
||||
|
||||
deinit_ret = esp_wifi_deinit();
|
||||
if (deinit_ret != ESP_OK)
|
||||
{
|
||||
wlerr("Failed to deinit Wi-Fi (0x%x)", deinit_ret);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
#if CONFIG_ESP_WIFI_SLP_BEACON_LOST_OPT
|
||||
monitor_config = WIFI_BEACON_MONITOR_CONFIG_DEFAULT(true);
|
||||
esp_wifi_beacon_monitor_configure(&monitor_config);
|
||||
#endif
|
||||
adc2_cal_include(); /* This enables the ADC2 calibration constructor at start up */
|
||||
|
||||
esp_wifi_config_info();
|
||||
|
||||
return result;
|
||||
}
|
654
arch/risc-v/src/common/espressif/esp_wifi_utils.c
Normal file
654
arch/risc-v/src/common/espressif/esp_wifi_utils.c
Normal file
@ -0,0 +1,654 @@
|
||||
/****************************************************************************
|
||||
* arch/risc-v/src/common/espressif/esp_wifi_utils.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 <assert.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
#include <netinet/arp.h>
|
||||
#include <sys/param.h>
|
||||
|
||||
#include <nuttx/kmalloc.h>
|
||||
#include <nuttx/wireless/wireless.h>
|
||||
|
||||
#include "esp_wifi_adapter.h"
|
||||
|
||||
#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 "esp_wpa.h"
|
||||
#include "rom/ets_sys.h"
|
||||
#include "soc/soc_caps.h"
|
||||
|
||||
#include "esp_wifi_utils.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Helper to get iw_event size */
|
||||
|
||||
#define ESP_IW_EVENT_SIZE(field) \
|
||||
(offsetof(struct iw_event, u) + sizeof(((union iwreq_data *)0)->field))
|
||||
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_SCAN_RESULT_SIZE
|
||||
# define WIFI_SCAN_RESULT_SIZE CONFIG_ESPRESSIF_WIFI_SCAN_RESULT_SIZE
|
||||
#else
|
||||
# define WIFI_SCAN_RESULT_SIZE (4096)
|
||||
#endif
|
||||
|
||||
#define SCAN_TIME_SEC (5)
|
||||
|
||||
/* Maximum number of channels for Wi-Fi 2.4Ghz */
|
||||
|
||||
#define CHANNEL_MAX_NUM (14)
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
||||
enum scan_status_e
|
||||
{
|
||||
ESP_SCAN_DISABLED = 0,
|
||||
ESP_SCAN_RUN,
|
||||
ESP_SCAN_DONE
|
||||
};
|
||||
|
||||
/* Wi-Fi scan result information */
|
||||
|
||||
struct wifi_scan_result
|
||||
{
|
||||
enum scan_status_e scan_status; /* Scan status */
|
||||
sem_t scan_signal; /* Scan notification signal */
|
||||
uint8_t *scan_result; /* Temp buffer that holds results */
|
||||
unsigned int scan_result_size; /* Current size of temp buffer */
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
static struct wifi_scan_result g_scan_priv =
|
||||
{
|
||||
.scan_signal = SEM_INITIALIZER(0),
|
||||
};
|
||||
static uint8_t g_channel_num;
|
||||
static uint8_t g_channel_list[CHANNEL_MAX_NUM];
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* 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)
|
||||
{
|
||||
struct wifi_scan_result *priv = &g_scan_priv;
|
||||
wifi_scan_config_t *config = NULL;
|
||||
struct iw_scan_req *req;
|
||||
int ret = 0;
|
||||
int i;
|
||||
uint8_t target_mac[MAC_LEN];
|
||||
uint8_t target_ssid[SSID_MAX_LEN + 1];
|
||||
memset(target_ssid, 0x0, sizeof(SSID_MAX_LEN + 1));
|
||||
|
||||
if (iwr == NULL)
|
||||
{
|
||||
wlerr("ERROR: Invalid ioctl cmd.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (g_scan_priv.scan_status != ESP_SCAN_DISABLED)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
|
||||
config = kmm_calloc(1, sizeof(wifi_scan_config_t));
|
||||
if (config == NULL)
|
||||
{
|
||||
wlerr("ERROR: Cannot allocate result buffer\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
g_channel_num = 0;
|
||||
memset(g_channel_list, 0x0, CHANNEL_MAX_NUM);
|
||||
|
||||
if (iwr->u.data.pointer &&
|
||||
iwr->u.data.length >= sizeof(struct iw_scan_req))
|
||||
{
|
||||
req = (struct iw_scan_req *)iwr->u.data.pointer;
|
||||
config->scan_type = (req->scan_type == IW_SCAN_TYPE_ACTIVE ?
|
||||
WIFI_SCAN_TYPE_ACTIVE : WIFI_SCAN_TYPE_PASSIVE);
|
||||
if (iwr->u.data.flags & IW_SCAN_THIS_ESSID &&
|
||||
req->essid_len < sizeof(target_ssid))
|
||||
{
|
||||
/* Scan specific ESSID */
|
||||
|
||||
config->show_hidden = true;
|
||||
config->bssid = NULL;
|
||||
memcpy(&target_ssid[0], req->essid, req->essid_len);
|
||||
config->ssid = &target_ssid[0];
|
||||
config->ssid[req->essid_len] = '\0';
|
||||
}
|
||||
|
||||
if (iwr->u.data.flags & IW_SCAN_THIS_FREQ &&
|
||||
req->num_channels > 0)
|
||||
{
|
||||
/* Scan specific channels */
|
||||
|
||||
DEBUGASSERT(req->num_channels <= CHANNEL_MAX_NUM);
|
||||
g_channel_num = req->num_channels;
|
||||
if (req->num_channels == 1)
|
||||
{
|
||||
config->channel = req->channel_list[0].m;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < req->num_channels; i++)
|
||||
{
|
||||
g_channel_list[i] = req->channel_list[i].m;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
memset(target_mac, 0xff, MAC_LEN);
|
||||
if (memcmp(req->bssid.sa_data, target_mac, MAC_LEN) != 0)
|
||||
{
|
||||
/* Scan specific bssid */
|
||||
|
||||
memcpy(target_mac, req->bssid.sa_data, MAC_LEN);
|
||||
config->bssid = &target_mac[0];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Default scan parameters */
|
||||
|
||||
wlinfo("INFO: Use default scan parameters\n");
|
||||
config->scan_type = WIFI_SCAN_TYPE_ACTIVE; /* Active scan */
|
||||
}
|
||||
|
||||
esp_wifi_start();
|
||||
ret = esp_wifi_scan_start(config, false);
|
||||
if (ret != OK)
|
||||
{
|
||||
wlerr("ERROR: Scan error, ret: %d\n", ret);
|
||||
ret = ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Allocate buffer to store scan result */
|
||||
|
||||
if (priv->scan_result == NULL)
|
||||
{
|
||||
priv->scan_result = kmm_malloc(WIFI_SCAN_RESULT_SIZE);
|
||||
if (priv->scan_result == NULL)
|
||||
{
|
||||
wlerr("ERROR: Cannot allocate result buffer\n");
|
||||
ret = -ENOMEM;
|
||||
}
|
||||
else
|
||||
{
|
||||
memset(priv->scan_result, 0x0, WIFI_SCAN_RESULT_SIZE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (config)
|
||||
{
|
||||
kmm_free(config);
|
||||
config = NULL;
|
||||
}
|
||||
|
||||
if (ret == OK)
|
||||
{
|
||||
wlinfo("INFO: start scan\n");
|
||||
g_scan_priv.scan_status = ESP_SCAN_RUN;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_get_scan_results
|
||||
*
|
||||
* Description:
|
||||
* Get scan result
|
||||
*
|
||||
* 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_get_scan_results(struct iwreq *iwr)
|
||||
{
|
||||
int ret = OK;
|
||||
static bool scan_block = false;
|
||||
struct wifi_scan_result *priv = &g_scan_priv;
|
||||
|
||||
if (g_scan_priv.scan_status == ESP_SCAN_RUN)
|
||||
{
|
||||
irqstate_t irqstate = enter_critical_section();
|
||||
if (!scan_block)
|
||||
{
|
||||
scan_block = true;
|
||||
leave_critical_section(irqstate);
|
||||
nxsem_tickwait(&priv->scan_signal, SEC2TICK(SCAN_TIME_SEC));
|
||||
scan_block = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
leave_critical_section(irqstate);
|
||||
ret = -EINVAL;
|
||||
goto exit_failed;
|
||||
}
|
||||
}
|
||||
else if (g_scan_priv.scan_status == ESP_SCAN_DISABLED)
|
||||
{
|
||||
ret = -EINVAL;
|
||||
goto exit_failed;
|
||||
}
|
||||
|
||||
if ((iwr == NULL) || (g_scan_priv.scan_status != ESP_SCAN_DONE))
|
||||
{
|
||||
ret = -EINVAL;
|
||||
goto exit_failed;
|
||||
}
|
||||
|
||||
if (priv->scan_result == NULL)
|
||||
{
|
||||
/* Result have already been requested */
|
||||
|
||||
ret = OK;
|
||||
iwr->u.data.length = 0;
|
||||
goto exit_failed;
|
||||
}
|
||||
|
||||
if (priv->scan_result_size <= 0)
|
||||
{
|
||||
ret = OK;
|
||||
iwr->u.data.length = 0;
|
||||
goto exit_free_buffer;
|
||||
}
|
||||
|
||||
if (iwr->u.data.pointer == NULL ||
|
||||
iwr->u.data.length < priv->scan_result_size)
|
||||
{
|
||||
/* Stat request, return scan_result_size */
|
||||
|
||||
ret = -E2BIG;
|
||||
iwr->u.data.pointer = NULL;
|
||||
iwr->u.data.length = priv->scan_result_size;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Copy result to user buffer */
|
||||
|
||||
if (iwr->u.data.length > priv->scan_result_size)
|
||||
{
|
||||
iwr->u.data.length = priv->scan_result_size;
|
||||
}
|
||||
|
||||
memcpy(iwr->u.data.pointer, priv->scan_result, iwr->u.data.length);
|
||||
|
||||
exit_free_buffer:
|
||||
|
||||
/* Free scan result buffer */
|
||||
|
||||
kmm_free(priv->scan_result);
|
||||
priv->scan_result = NULL;
|
||||
priv->scan_result_size = 0;
|
||||
g_scan_priv.scan_status = ESP_SCAN_DISABLED;
|
||||
|
||||
exit_failed:
|
||||
if (ret < 0)
|
||||
{
|
||||
iwr->u.data.length = 0;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_scan_event_parse
|
||||
*
|
||||
* Description:
|
||||
* Parse scan information
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* None
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void esp_wifi_scan_event_parse(void)
|
||||
{
|
||||
struct wifi_scan_result *priv = &g_scan_priv;
|
||||
wifi_ap_record_t *ap_list_buffer = NULL;
|
||||
uint16_t bss_total = 0;
|
||||
uint8_t bss_count = 0;
|
||||
bool parse_done = false;
|
||||
|
||||
if (priv->scan_status != ESP_SCAN_RUN)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
esp_wifi_scan_get_ap_num(&bss_total);
|
||||
if (bss_total == 0)
|
||||
{
|
||||
priv->scan_status = ESP_SCAN_DONE;
|
||||
wlinfo("INFO: None AP is scanned\n");
|
||||
nxsem_post(&priv->scan_signal);
|
||||
return;
|
||||
}
|
||||
|
||||
ap_list_buffer = kmm_calloc(bss_total, sizeof(wifi_ap_record_t));
|
||||
if (ap_list_buffer == NULL)
|
||||
{
|
||||
priv->scan_status = ESP_SCAN_DONE;
|
||||
wlerr("ERROR: Failed to calloc buffer to print scan results");
|
||||
nxsem_post(&priv->scan_signal);
|
||||
return;
|
||||
}
|
||||
|
||||
if (esp_wifi_scan_get_ap_records(&bss_total,
|
||||
(wifi_ap_record_t *)ap_list_buffer) == OK)
|
||||
{
|
||||
struct iw_event *iwe;
|
||||
unsigned int result_size;
|
||||
size_t essid_len;
|
||||
size_t essid_len_aligned;
|
||||
bool is_target_channel = true;
|
||||
int i;
|
||||
|
||||
for (bss_count = 0; bss_count < bss_total; bss_count++)
|
||||
{
|
||||
if (g_channel_num > 1)
|
||||
{
|
||||
is_target_channel = false;
|
||||
for (i = 0; i < g_channel_num; i++)
|
||||
{
|
||||
if (g_channel_list[i] == ap_list_buffer[bss_count].primary)
|
||||
{
|
||||
is_target_channel = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
is_target_channel = true;
|
||||
}
|
||||
|
||||
if (is_target_channel)
|
||||
{
|
||||
result_size = WIFI_SCAN_RESULT_SIZE - priv->scan_result_size;
|
||||
|
||||
/* Copy BSSID */
|
||||
|
||||
if (result_size < ESP_IW_EVENT_SIZE(ap_addr))
|
||||
{
|
||||
goto scan_result_full;
|
||||
}
|
||||
|
||||
iwe = (struct iw_event *)
|
||||
&priv->scan_result[priv->scan_result_size];
|
||||
iwe->len = ESP_IW_EVENT_SIZE(ap_addr);
|
||||
iwe->cmd = SIOCGIWAP;
|
||||
memcpy(&iwe->u.ap_addr.sa_data,
|
||||
ap_list_buffer[bss_count].bssid,
|
||||
sizeof(ap_list_buffer[bss_count].bssid));
|
||||
iwe->u.ap_addr.sa_family = ARPHRD_ETHER;
|
||||
priv->scan_result_size += ESP_IW_EVENT_SIZE(ap_addr);
|
||||
result_size -= ESP_IW_EVENT_SIZE(ap_addr);
|
||||
|
||||
/* Copy ESSID */
|
||||
|
||||
essid_len = MIN(strlen((const char *)
|
||||
ap_list_buffer[bss_count].ssid), SSID_MAX_LEN);
|
||||
essid_len_aligned = (essid_len + 3) & -4;
|
||||
if (result_size < ESP_IW_EVENT_SIZE(essid) + essid_len_aligned)
|
||||
{
|
||||
goto scan_result_full;
|
||||
}
|
||||
|
||||
iwe = (struct iw_event *)
|
||||
&priv->scan_result[priv->scan_result_size];
|
||||
iwe->len = ESP_IW_EVENT_SIZE(essid) + essid_len_aligned;
|
||||
iwe->cmd = SIOCGIWESSID;
|
||||
iwe->u.essid.flags = 0;
|
||||
iwe->u.essid.length = essid_len;
|
||||
|
||||
/* Special processing for iw_point, set offset
|
||||
* in pointer field.
|
||||
*/
|
||||
|
||||
iwe->u.essid.pointer = (void *)sizeof(iwe->u.essid);
|
||||
memcpy(&iwe->u.essid + 1,
|
||||
ap_list_buffer[bss_count].ssid, essid_len);
|
||||
|
||||
wlinfo("INFO: ssid %s\n", ap_list_buffer[bss_count].ssid);
|
||||
|
||||
priv->scan_result_size +=
|
||||
ESP_IW_EVENT_SIZE(essid) + essid_len_aligned;
|
||||
result_size -= ESP_IW_EVENT_SIZE(essid) + essid_len_aligned;
|
||||
|
||||
/* Copy link quality info */
|
||||
|
||||
if (result_size < ESP_IW_EVENT_SIZE(qual))
|
||||
{
|
||||
goto scan_result_full;
|
||||
}
|
||||
|
||||
iwe = (struct iw_event *)
|
||||
&priv->scan_result[priv->scan_result_size];
|
||||
iwe->len = ESP_IW_EVENT_SIZE(qual);
|
||||
iwe->cmd = IWEVQUAL;
|
||||
iwe->u.qual.qual = 0x00;
|
||||
|
||||
wlinfo("INFO: signal %d\n", ap_list_buffer[bss_count].rssi);
|
||||
|
||||
iwe->u.qual.level = ap_list_buffer[bss_count].rssi;
|
||||
iwe->u.qual.noise = 0x00;
|
||||
iwe->u.qual.updated = IW_QUAL_DBM | IW_QUAL_ALL_UPDATED;
|
||||
|
||||
priv->scan_result_size += ESP_IW_EVENT_SIZE(qual);
|
||||
result_size -= ESP_IW_EVENT_SIZE(qual);
|
||||
|
||||
/* Copy AP mode */
|
||||
|
||||
if (result_size < ESP_IW_EVENT_SIZE(mode))
|
||||
{
|
||||
goto scan_result_full;
|
||||
}
|
||||
|
||||
iwe = (struct iw_event *)
|
||||
&priv->scan_result[priv->scan_result_size];
|
||||
iwe->len = ESP_IW_EVENT_SIZE(mode);
|
||||
iwe->cmd = SIOCGIWMODE;
|
||||
iwe->u.mode = IW_MODE_MASTER;
|
||||
priv->scan_result_size += ESP_IW_EVENT_SIZE(mode);
|
||||
result_size -= ESP_IW_EVENT_SIZE(mode);
|
||||
|
||||
/* Copy AP encryption mode */
|
||||
|
||||
if (result_size < ESP_IW_EVENT_SIZE(data))
|
||||
{
|
||||
goto scan_result_full;
|
||||
}
|
||||
|
||||
iwe = (struct iw_event *)
|
||||
&priv->scan_result[priv->scan_result_size];
|
||||
iwe->len = ESP_IW_EVENT_SIZE(data);
|
||||
iwe->cmd = SIOCGIWENCODE;
|
||||
iwe->u.data.flags = IW_ENCODE_ENABLED | IW_ENCODE_NOKEY;
|
||||
iwe->u.data.length = 0;
|
||||
iwe->u.essid.pointer = NULL;
|
||||
|
||||
priv->scan_result_size += ESP_IW_EVENT_SIZE(data);
|
||||
result_size -= ESP_IW_EVENT_SIZE(data);
|
||||
|
||||
/* Copy AP channel */
|
||||
|
||||
if (result_size < ESP_IW_EVENT_SIZE(freq))
|
||||
{
|
||||
goto scan_result_full;
|
||||
}
|
||||
|
||||
iwe = (struct iw_event *)
|
||||
&priv->scan_result[priv->scan_result_size];
|
||||
iwe->len = ESP_IW_EVENT_SIZE(freq);
|
||||
iwe->cmd = SIOCGIWFREQ;
|
||||
iwe->u.freq.e = 0;
|
||||
iwe->u.freq.m = ap_list_buffer[bss_count].primary;
|
||||
|
||||
priv->scan_result_size += ESP_IW_EVENT_SIZE(freq);
|
||||
result_size -= ESP_IW_EVENT_SIZE(freq);
|
||||
}
|
||||
}
|
||||
|
||||
parse_done = true;
|
||||
}
|
||||
|
||||
scan_result_full:
|
||||
|
||||
/* Continue instead of break to log dropped AP results */
|
||||
|
||||
if (!parse_done)
|
||||
{
|
||||
wlerr("ERROR: No more space in scan_result buffer\n");
|
||||
}
|
||||
|
||||
if (ap_list_buffer)
|
||||
{
|
||||
kmm_free(ap_list_buffer);
|
||||
ap_list_buffer = NULL;
|
||||
}
|
||||
|
||||
priv->scan_status = ESP_SCAN_DONE;
|
||||
nxsem_post(&priv->scan_signal);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* 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
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int32_t esp_wifi_to_errno(int err)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (err < ESP_ERR_WIFI_BASE)
|
||||
{
|
||||
/* Unmask component error bits */
|
||||
|
||||
ret = err & 0xfff;
|
||||
|
||||
switch (ret)
|
||||
{
|
||||
case ESP_OK:
|
||||
ret = OK;
|
||||
break;
|
||||
case ESP_ERR_NO_MEM:
|
||||
ret = -ENOMEM;
|
||||
break;
|
||||
|
||||
case ESP_ERR_INVALID_ARG:
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
|
||||
case ESP_ERR_INVALID_STATE:
|
||||
ret = -EIO;
|
||||
break;
|
||||
|
||||
case ESP_ERR_INVALID_SIZE:
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
|
||||
case ESP_ERR_NOT_FOUND:
|
||||
ret = -ENOSYS;
|
||||
break;
|
||||
|
||||
case ESP_ERR_NOT_SUPPORTED:
|
||||
ret = -ENOSYS;
|
||||
break;
|
||||
|
||||
case ESP_ERR_TIMEOUT:
|
||||
ret = -ETIMEDOUT;
|
||||
break;
|
||||
|
||||
case ESP_ERR_INVALID_MAC:
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
|
||||
default:
|
||||
ret = ERROR;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = ERROR;
|
||||
}
|
||||
|
||||
if (ret != OK)
|
||||
{
|
||||
wlerr("ERROR: %s\n", esp_err_to_name(err));
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
120
arch/risc-v/src/common/espressif/esp_wifi_utils.h
Normal file
120
arch/risc-v/src/common/espressif/esp_wifi_utils.h
Normal file
@ -0,0 +1,120 @@
|
||||
/****************************************************************************
|
||||
* arch/risc-v/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_RISCV_SRC_COMMON_ESPRESSIF_ESP_WIFI_UTILS_H
|
||||
#define __ARCH_RISCV_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:
|
||||
* 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_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);
|
||||
|
||||
/****************************************************************************
|
||||
* 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
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int32_t esp_wifi_to_errno(int err);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#undef EXTERN
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_WIFI_UTILS_H */
|
1731
arch/risc-v/src/common/espressif/esp_wlan.c
Normal file
1731
arch/risc-v/src/common/espressif/esp_wlan.c
Normal file
File diff suppressed because it is too large
Load Diff
177
arch/risc-v/src/common/espressif/esp_wlan.h
Normal file
177
arch/risc-v/src/common/espressif/esp_wlan.h
Normal file
@ -0,0 +1,177 @@
|
||||
/****************************************************************************
|
||||
* arch/risc-v/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_RISCV_SRC_COMMON_ESPRESSIF_ESP_WLAN_H
|
||||
#define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_WLAN_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_ESPRESSIF_WIFI_STATION)
|
||||
# define ESP_WLAN_HAS_STA
|
||||
# define ESP_WLAN_STA_DEVNO 0
|
||||
# define ESP_WLAN_DEVS 1
|
||||
#elif defined(CONFIG_ESPRESSIF_WIFI_SOFTAP)
|
||||
# define ESP_WLAN_HAS_SOFTAP
|
||||
# define ESP_WLAN_SOFTAP_DEVNO 0
|
||||
# define ESP_WLAN_DEVS 1
|
||||
#elif defined(CONFIG_ESPRESSIF_WIFI_STATION_SOFTAP)
|
||||
# define ESP_WLAN_HAS_STA
|
||||
# define ESP_WLAN_HAS_SOFTAP
|
||||
# define ESP_WLAN_STA_DEVNO 0
|
||||
# define ESP_WLAN_SOFTAP_DEVNO 1
|
||||
# define ESP_WLAN_DEVS 2
|
||||
#endif
|
||||
|
||||
#define MAC_LEN (6)
|
||||
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
|
||||
/****************************************************************************
|
||||
* 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
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static inline int32_t nuttx_err_to_freertos(int ret)
|
||||
{
|
||||
return ret >= 0;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef ESP_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-S3 WLAN station netcard driver
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success; Negated errno on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wlan_sta_initialize(void);
|
||||
#endif /* ESP_WLAN_HAS_STA */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wlan_softap_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the ESP32-S3 WLAN softAP netcard driver
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success; Negated errno on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef ESP_WLAN_HAS_SOFTAP
|
||||
int esp_wlan_softap_initialize(void);
|
||||
#endif /* ESP_WLAN_HAS_SOFTAP */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_tx_done_cb
|
||||
*
|
||||
* Description:
|
||||
* Wi-Fi TX done callback function.
|
||||
*
|
||||
* Input Parameters:
|
||||
* ifidx - The interface id that the tx callback has been triggered from
|
||||
* data - Pointer to the data transmitted
|
||||
* data_len - Length of the data transmitted
|
||||
* txstatus - True:if the data was transmitted sucessfully False: if data
|
||||
* transmission failed
|
||||
*
|
||||
* Returned Value:
|
||||
* none
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void esp_wifi_tx_done_cb(uint8_t ifidx,
|
||||
uint8_t *data,
|
||||
uint16_t *len,
|
||||
bool txstatus);
|
||||
|
||||
#endif /* CONFIG_ESPRESSIF_WIFI */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#undef EXTERN
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_WLAN_H */
|
@ -21,4 +21,11 @@
|
||||
include common/Make.defs
|
||||
include common/espressif/Make.defs
|
||||
|
||||
# Wireless interfaces.
|
||||
|
||||
ifeq ($(CONFIG_ESPRESSIF_WIFI),y)
|
||||
CHIP_CSRCS += esp_coex_adapter.c esp_wifi_adapter.c
|
||||
EXTRA_LIBS += -lcore -lnet80211 -lpp
|
||||
endif
|
||||
|
||||
CFLAGS += ${DEFINE_PREFIX}_RETARGETABLE_LOCKING
|
||||
|
578
arch/risc-v/src/esp32c6/esp_coex_adapter.c
Normal file
578
arch/risc-v/src/esp32c6/esp_coex_adapter.c
Normal file
@ -0,0 +1,578 @@
|
||||
/****************************************************************************
|
||||
* arch/risc-v/src/esp32c6/esp_coex_adapter.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 <debug.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include <nuttx/spinlock.h>
|
||||
#include <irq/irq.h>
|
||||
#include <nuttx/kmalloc.h>
|
||||
|
||||
#include "esp_hr_timer.h"
|
||||
#include "esp_wlan.h"
|
||||
|
||||
#include "esp_attr.h"
|
||||
#include "esp_timer.h"
|
||||
#include "soc/rtc.h"
|
||||
#include "esp_private/esp_clk.h"
|
||||
#include "esp_coexist_adapter.h"
|
||||
#include "rom/ets_sys.h"
|
||||
#include "soc/soc_caps.h"
|
||||
#include "esp_modem_wrapper.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define OSI_FUNCS_TIME_BLOCKING 0xffffffff
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
static int64_t esp_coex_esp_timer_get_time_wrapper(void);
|
||||
static int32_t esp_coex_semphr_take_from_isr_wrapper(void *semphr,
|
||||
void *hptw);
|
||||
static int32_t esp_coex_semphr_give_from_isr_wrapper(void *semphr,
|
||||
void *hptw);
|
||||
static int esp_coex_is_in_isr_wrapper(void);
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
coex_adapter_funcs_t g_coex_adapter_funcs =
|
||||
{
|
||||
._version = COEX_ADAPTER_VERSION,
|
||||
._task_yield_from_isr = esp_coex_common_task_yield_from_isr_wrapper,
|
||||
._semphr_create = esp_coex_common_semphr_create_wrapper,
|
||||
._semphr_delete = esp_coex_common_semphr_delete_wrapper,
|
||||
._semphr_take_from_isr = esp_coex_semphr_take_from_isr_wrapper,
|
||||
._semphr_give_from_isr = esp_coex_semphr_give_from_isr_wrapper,
|
||||
._semphr_take = esp_coex_common_semphr_take_wrapper,
|
||||
._semphr_give = esp_coex_common_semphr_give_wrapper,
|
||||
._is_in_isr = esp_coex_is_in_isr_wrapper,
|
||||
._malloc_internal = esp_coex_common_malloc_internal_wrapper,
|
||||
._free = free,
|
||||
._esp_timer_get_time = esp_coex_esp_timer_get_time_wrapper,
|
||||
._env_is_chip = esp_coex_common_env_is_chip_wrapper,
|
||||
._timer_disarm = esp_coex_common_timer_disarm_wrapper,
|
||||
._timer_done = esp_coex_common_timer_done_wrapper,
|
||||
._timer_setfn = esp_coex_common_timer_setfn_wrapper,
|
||||
._timer_arm_us = esp_coex_common_timer_arm_us_wrapper,
|
||||
._magic = COEX_ADAPTER_MAGIC,
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_coex_esp_timer_get_time_wrapper
|
||||
*
|
||||
* Description:
|
||||
* This function retrieves the current time of the High Resolution Timer
|
||||
* in microseconds. It is a wrapper around the esp_hr_timer_time_us
|
||||
* function, providing a consistent interface for the coexistence module.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None.
|
||||
*
|
||||
* Returned Value:
|
||||
* The current time of the High Resolution Timer in microseconds, as a
|
||||
* 64-bit integer.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static IRAM_ATTR int64_t esp_coex_esp_timer_get_time_wrapper(void)
|
||||
{
|
||||
return (int64_t)esp_hr_timer_time_us();
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_coex_semphr_take_from_isr_wrapper
|
||||
*
|
||||
* Description:
|
||||
* Take a semaphore from an ISR
|
||||
*
|
||||
* Input Parameters:
|
||||
* semphr - Semaphore data pointer.
|
||||
* hptw - Unused.
|
||||
*
|
||||
* Returned Value:
|
||||
* True if success or false if fail
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int32_t IRAM_ATTR esp_coex_semphr_take_from_isr_wrapper(void *semphr,
|
||||
void *hptw)
|
||||
{
|
||||
*(int *)hptw = 0;
|
||||
|
||||
return nuttx_err_to_freertos(nxsem_trywait(semphr));
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_coex_semphr_give_from_isr_wrapper
|
||||
*
|
||||
* Description:
|
||||
* Post semaphore
|
||||
*
|
||||
* Input Parameters:
|
||||
* semphr - Semaphore data pointer
|
||||
* hptw - Unused.
|
||||
*
|
||||
* Returned Value:
|
||||
* True if success or false if fail
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int32_t IRAM_ATTR esp_coex_semphr_give_from_isr_wrapper(void *semphr,
|
||||
void *hptw)
|
||||
{
|
||||
*(int *)hptw = 0;
|
||||
|
||||
return esp_coex_common_semphr_give_wrapper(semphr);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_coex_is_in_isr_wrapper
|
||||
*
|
||||
* Description:
|
||||
* This function checks if the current context is an interrupt service
|
||||
* routine (ISR). It is a wrapper around the NuttX up_interrupt_context
|
||||
* function.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* Returns 1 if the current context is an ISR, 0 otherwise.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int IRAM_ATTR esp_coex_is_in_isr_wrapper(void)
|
||||
{
|
||||
return (int)up_interrupt_context();
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_coex_common_env_is_chip_wrapper
|
||||
*
|
||||
* Description:
|
||||
* This function checks if the environment is a chip or FPGA.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* Returns true if the environment is a chip, false if it's an FPGA.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
bool IRAM_ATTR esp_coex_common_env_is_chip_wrapper(void)
|
||||
{
|
||||
#ifdef CONFIG_IDF_ENV_FPGA
|
||||
return false;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_coex_common_spin_lock_create_wrapper
|
||||
*
|
||||
* Description:
|
||||
* Create spin lock in SMP mode
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* Spin lock data pointer
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void *esp_coex_common_spin_lock_create_wrapper(void)
|
||||
{
|
||||
spinlock_t *lock;
|
||||
int tmp;
|
||||
|
||||
tmp = sizeof(*lock);
|
||||
lock = kmm_malloc(tmp);
|
||||
if (!lock)
|
||||
{
|
||||
wlerr("Failed to alloc %d memory\n", tmp);
|
||||
DEBUGPANIC();
|
||||
}
|
||||
|
||||
spin_initialize(lock, SP_UNLOCKED);
|
||||
|
||||
return lock;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_coex_common_int_disable_wrapper
|
||||
*
|
||||
* Description:
|
||||
* Enter critical section by disabling interrupts and taking the spin lock
|
||||
* if in SMP mode.
|
||||
*
|
||||
* Input Parameters:
|
||||
* wifi_int_mux - Spin lock data pointer
|
||||
*
|
||||
* Returned Value:
|
||||
* CPU PS value.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint32_t IRAM_ATTR esp_coex_common_int_disable_wrapper(void *wifi_int_mux)
|
||||
{
|
||||
irqstate_t flags;
|
||||
|
||||
flags = spin_lock_irqsave((spinlock_t *)wifi_int_mux);
|
||||
|
||||
return (uint32_t)flags;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_coex_common_int_restore_wrapper
|
||||
*
|
||||
* Description:
|
||||
* Exit from critical section by enabling interrupts and releasing the spin
|
||||
* lock if in SMP mode.
|
||||
*
|
||||
* Input Parameters:
|
||||
* wifi_int_mux - Spin lock data pointer
|
||||
* tmp - CPU PS value.
|
||||
*
|
||||
* Returned Value:
|
||||
* None
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void IRAM_ATTR esp_coex_common_int_restore_wrapper(void *wifi_int_mux,
|
||||
uint32_t tmp)
|
||||
{
|
||||
irqstate_t flags = (irqstate_t)tmp;
|
||||
|
||||
spin_unlock_irqrestore((spinlock_t *)wifi_int_mux, flags);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_task_yield_from_isr
|
||||
*
|
||||
* Description:
|
||||
* Perform a solicited context switch on FreeRTOS. Do nothing in NuttX.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* None
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void IRAM_ATTR esp_coex_common_task_yield_from_isr_wrapper(void)
|
||||
{
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_coex_common_semphr_create_wrapper
|
||||
*
|
||||
* Description:
|
||||
* Create and initialize semaphore
|
||||
*
|
||||
* Input Parameters:
|
||||
* max - No meanining for NuttX
|
||||
* init - semaphore initialization value
|
||||
*
|
||||
* Returned Value:
|
||||
* Semaphore data pointer
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void *esp_coex_common_semphr_create_wrapper(uint32_t max, uint32_t init)
|
||||
{
|
||||
int ret;
|
||||
sem_t *sem;
|
||||
int tmp;
|
||||
|
||||
tmp = sizeof(sem_t);
|
||||
sem = kmm_malloc(tmp);
|
||||
if (!sem)
|
||||
{
|
||||
wlerr("Failed to alloc %d memory\n", tmp);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ret = nxsem_init(sem, 0, init);
|
||||
if (ret)
|
||||
{
|
||||
wlerr("Failed to initialize sem error=%d\n", ret);
|
||||
kmm_free(sem);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return sem;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_coex_common_semphr_delete_wrapper
|
||||
*
|
||||
* Description:
|
||||
* Delete semaphore
|
||||
*
|
||||
* Input Parameters:
|
||||
* semphr - Semaphore data pointer
|
||||
*
|
||||
* Returned Value:
|
||||
* None
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void esp_coex_common_semphr_delete_wrapper(void *semphr)
|
||||
{
|
||||
sem_t *sem = (sem_t *)semphr;
|
||||
|
||||
nxsem_destroy(sem);
|
||||
kmm_free(sem);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_coex_common_semphr_take_wrapper
|
||||
*
|
||||
* Description:
|
||||
* This function attempts to take (wait for) a semaphore within a certain
|
||||
* period of time. It is a wrapper around the NuttX nxsem_wait and
|
||||
* nxsem_tickwait functions, providing error handling and translation
|
||||
* between NuttX and ESP-IDF error codes.
|
||||
*
|
||||
* Input Parameters:
|
||||
* semphr - Pointer to the semaphore data structure.
|
||||
* block_time_tick - The maximum number of system ticks to wait.
|
||||
*
|
||||
* Returned Value:
|
||||
* Returns 0 if the semaphore was successfully taken, or a negative error
|
||||
* code if the operation failed or the timeout expired.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int32_t esp_coex_common_semphr_take_wrapper(void *semphr,
|
||||
uint32_t block_time_tick)
|
||||
{
|
||||
int ret;
|
||||
sem_t *sem = (sem_t *)semphr;
|
||||
|
||||
if (block_time_tick == OSI_FUNCS_TIME_BLOCKING)
|
||||
{
|
||||
ret = nxsem_wait(sem);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (block_time_tick > 0)
|
||||
{
|
||||
ret = nxsem_tickwait(sem, block_time_tick);
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = nxsem_trywait(sem);
|
||||
}
|
||||
}
|
||||
|
||||
if (ret)
|
||||
{
|
||||
wlerr("ERROR: Failed to wait sem in %lu ticks. Error=%d\n",
|
||||
block_time_tick, ret);
|
||||
}
|
||||
|
||||
return nuttx_err_to_freertos(ret);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_coex_common_semphr_give_wrapper
|
||||
*
|
||||
* Description:
|
||||
* This function posts (releases) a semaphore. It is a wrapper around the
|
||||
* NuttX nxsem_post function, providing error handling and translation
|
||||
* between NuttX and ESP-IDF error codes.
|
||||
*
|
||||
* Input Parameters:
|
||||
* semphr - Pointer to the semaphore data structure.
|
||||
*
|
||||
* Returned Value:
|
||||
* Returns 0 if the semaphore was successfully posted, or a negative error
|
||||
* code if the operation failed.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int32_t esp_coex_common_semphr_give_wrapper(void *semphr)
|
||||
{
|
||||
int ret;
|
||||
sem_t *sem = (sem_t *)semphr;
|
||||
|
||||
ret = nxsem_post(sem);
|
||||
if (ret)
|
||||
{
|
||||
wlerr("Failed to post sem error=%d\n", ret);
|
||||
}
|
||||
|
||||
return nuttx_err_to_freertos(ret);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_coex_common_timer_disarm_wrapper
|
||||
*
|
||||
* Description:
|
||||
* Disable timer
|
||||
*
|
||||
* Input Parameters:
|
||||
* timer - timer data pointer
|
||||
*
|
||||
* Returned Value:
|
||||
* None
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void IRAM_ATTR esp_coex_common_timer_disarm_wrapper(void *timer)
|
||||
{
|
||||
ets_timer_disarm(timer);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_coex_common_timer_done_wrapper
|
||||
*
|
||||
* Description:
|
||||
* Disable and free timer
|
||||
*
|
||||
* Input Parameters:
|
||||
* timer - timer data pointer
|
||||
*
|
||||
* Returned Value:
|
||||
* None
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void esp_coex_common_timer_done_wrapper(void *timer)
|
||||
{
|
||||
ets_timer_done(timer);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_coex_common_timer_setfn_wrapper
|
||||
*
|
||||
* Description:
|
||||
* Set timer callback function and private data
|
||||
*
|
||||
* Input Parameters:
|
||||
* ptimer - Timer data pointer
|
||||
* pfunction - Callback function
|
||||
* parg - Callback function private data
|
||||
*
|
||||
* Returned Value:
|
||||
* None
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void esp_coex_common_timer_setfn_wrapper(void *ptimer,
|
||||
void *pfunction,
|
||||
void *parg)
|
||||
{
|
||||
ets_timer_setfn(ptimer, pfunction, parg);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_coex_common_timer_arm_us_wrapper
|
||||
*
|
||||
* Description:
|
||||
* Set timer timeout period and repeat flag
|
||||
*
|
||||
* Input Parameters:
|
||||
* ptimer - timer data pointer
|
||||
* us - micro seconds
|
||||
* repeat - true: run cycle, false: run once
|
||||
*
|
||||
* Returned Value:
|
||||
* None
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void IRAM_ATTR esp_coex_common_timer_arm_us_wrapper(void *ptimer,
|
||||
uint32_t us,
|
||||
bool repeat)
|
||||
{
|
||||
ets_timer_arm_us(ptimer, us, repeat);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_coex_common_clk_slowclk_cal_get_wrapper
|
||||
*
|
||||
* Description:
|
||||
* Get the calibration value of RTC slow clock
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* The calibration value obtained using rtc_clk_cal
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint32_t esp_coex_common_clk_slowclk_cal_get_wrapper(void)
|
||||
{
|
||||
/* The bit width of WiFi light sleep clock calibration is 12 while the one
|
||||
* of system is 19. It should shift 19 - 12 = 7.
|
||||
*/
|
||||
|
||||
return (esp_clk_slowclk_cal_get() >>
|
||||
(RTC_CLK_CAL_FRACT - SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH));
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_coex_common_malloc_internal_wrapper
|
||||
*
|
||||
* Description:
|
||||
* Drivers allocate a block of memory
|
||||
*
|
||||
* Input Parameters:
|
||||
* size - memory size
|
||||
*
|
||||
* Returned Value:
|
||||
* Memory pointer
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
IRAM_ATTR void *esp_coex_common_malloc_internal_wrapper(size_t size)
|
||||
{
|
||||
return kmm_malloc(size);
|
||||
}
|
5569
arch/risc-v/src/esp32c6/esp_wifi_adapter.c
Normal file
5569
arch/risc-v/src/esp32c6/esp_wifi_adapter.c
Normal file
File diff suppressed because it is too large
Load Diff
672
arch/risc-v/src/esp32c6/esp_wifi_adapter.h
Normal file
672
arch/risc-v/src/esp32c6/esp_wifi_adapter.h
Normal file
@ -0,0 +1,672 @@
|
||||
/****************************************************************************
|
||||
* arch/risc-v/src/esp32c6/esp_wifi_adapter.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_RISCV_SRC_ESP32C6_ESP_WIFI_ADAPTER_H
|
||||
#define __ARCH_RISCV_SRC_ESP32C6_ESP_WIFI_ADAPTER_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/wireless/wireless.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "esp_wlan.h"
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define SSID_MAX_LEN (32)
|
||||
#define PWD_MAX_LEN (64)
|
||||
|
||||
#define CONFIG_IDF_TARGET_ESP32C6 1
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_adapter_init
|
||||
*
|
||||
* Description:
|
||||
* Initialize ESP32C6 Wi-Fi adapter
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* 0 if success or -1 if fail
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_adapter_init(void);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_notify_subscribe
|
||||
*
|
||||
* Description:
|
||||
* Enable event notification
|
||||
*
|
||||
* Input Parameters:
|
||||
* pid - Task PID
|
||||
* event - Signal event data pointer
|
||||
*
|
||||
* Returned Value:
|
||||
* 0 if success or -1 if fail
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_notify_subscribe(pid_t pid, struct sigevent *event);
|
||||
|
||||
#ifdef ESP_WLAN_HAS_STA
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_sta_start
|
||||
*
|
||||
* Description:
|
||||
* Start Wi-Fi station.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_sta_start(void);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_sta_stop
|
||||
*
|
||||
* Description:
|
||||
* Stop Wi-Fi station.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_sta_stop(void);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_sta_send_data
|
||||
*
|
||||
* Description:
|
||||
* Use Wi-Fi station interface to send 802.3 frame
|
||||
*
|
||||
* Input Parameters:
|
||||
* pbuf - Packet buffer pointer
|
||||
* len - Packet length
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_sta_send_data(void *pbuf, size_t len);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_set_password
|
||||
*
|
||||
* Description:
|
||||
* Set/Get Wi-Fi station password
|
||||
*
|
||||
* Input Parameters:
|
||||
* iwr - The argument of the ioctl cmd
|
||||
* set - true: set data; false: get data
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_sta_password(struct iwreq *iwr, bool set);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_sta_essid
|
||||
*
|
||||
* Description:
|
||||
* Set/Get Wi-Fi station ESSID
|
||||
*
|
||||
* Input Parameters:
|
||||
* iwr - The argument of the ioctl cmd
|
||||
* set - true: set data; false: get data
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_sta_essid(struct iwreq *iwr, bool set);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_sta_bssid
|
||||
*
|
||||
* Description:
|
||||
* Set/Get Wi-Fi station BSSID
|
||||
*
|
||||
* Input Parameters:
|
||||
* iwr - The argument of the ioctl cmd
|
||||
* set - true: set data; false: get data
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_sta_bssid(struct iwreq *iwr, bool set);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_sta_connect
|
||||
*
|
||||
* Description:
|
||||
* Trigger Wi-Fi station connection action
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_sta_connect(void);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_sta_disconnect
|
||||
*
|
||||
* Description:
|
||||
* Trigger Wi-Fi station disconnection action
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_sta_disconnect(void);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_sta_mode
|
||||
*
|
||||
* Description:
|
||||
* Set/Get Wi-Fi Station mode code.
|
||||
*
|
||||
* Input Parameters:
|
||||
* iwr - The argument of the ioctl cmd
|
||||
* set - true: set data; false: get data
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_sta_mode(struct iwreq *iwr, bool set);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_sta_auth
|
||||
*
|
||||
* Description:
|
||||
* Set/Get station authentication mode params.
|
||||
*
|
||||
* Input Parameters:
|
||||
* iwr - The argument of the ioctl cmd
|
||||
* set - true: set data; false: get data
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_sta_auth(struct iwreq *iwr, bool set);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_sta_freq
|
||||
*
|
||||
* Description:
|
||||
* Get station frequency.
|
||||
*
|
||||
* Input Parameters:
|
||||
* iwr - The argument of the ioctl cmd
|
||||
* set - true: set data; false: get data
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_sta_freq(struct iwreq *iwr, bool set);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_sta_bitrate
|
||||
*
|
||||
* Description:
|
||||
* Get station default bit rate (Mbps).
|
||||
*
|
||||
* Input Parameters:
|
||||
* iwr - The argument of the ioctl cmd
|
||||
* set - true: set data; false: get data
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_sta_bitrate(struct iwreq *iwr, bool set);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_sta_get_txpower
|
||||
*
|
||||
* Description:
|
||||
* Get station transmit power (dBm).
|
||||
*
|
||||
* Input Parameters:
|
||||
* iwr - The argument of the ioctl cmd
|
||||
* set - true: set data; false: get data
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_sta_txpower(struct iwreq *iwr, bool set);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_sta_get_channel_range
|
||||
*
|
||||
* Description:
|
||||
* Get station range of channel parameters.
|
||||
*
|
||||
* Input Parameters:
|
||||
* iwr - The argument of the ioctl cmd
|
||||
* set - true: set data; false: get data
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_sta_channel(struct iwreq *iwr, bool set);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_sta_country
|
||||
*
|
||||
* Description:
|
||||
* Configure country info.
|
||||
*
|
||||
* Input Parameters:
|
||||
* iwr - The argument of the ioctl cmd
|
||||
* set - true: set data; false: get data
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_sta_country(struct iwreq *iwr, bool set);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_sta_rssi
|
||||
*
|
||||
* Description:
|
||||
* Get Wi-Fi sensitivity (dBm).
|
||||
*
|
||||
* Input Parameters:
|
||||
* iwr - The argument of the ioctl cmd
|
||||
* set - true: set data; false: get data
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_sta_rssi(struct iwreq *iwr, bool set);
|
||||
#endif /* ESP_WLAN_HAS_STA */
|
||||
|
||||
#ifdef ESP_WLAN_HAS_SOFTAP
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_softap_start
|
||||
*
|
||||
* Description:
|
||||
* Start Wi-Fi softAP.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_softap_start(void);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_softap_stop
|
||||
*
|
||||
* Description:
|
||||
* Stop Wi-Fi softAP.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_softap_stop(void);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_softap_send_data
|
||||
*
|
||||
* Description:
|
||||
* Use Wi-Fi softAP interface to send 802.3 frame
|
||||
*
|
||||
* Input Parameters:
|
||||
* pbuf - Packet buffer pointer
|
||||
* len - Packet length
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_softap_send_data(void *pbuf, size_t len);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_softap_password
|
||||
*
|
||||
* Description:
|
||||
* Set/Get Wi-Fi SoftAP password
|
||||
*
|
||||
* Input Parameters:
|
||||
* iwr - The argument of the ioctl cmd
|
||||
* set - true: set data; false: get data
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_softap_password(struct iwreq *iwr, bool set);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_softap_essid
|
||||
*
|
||||
* Description:
|
||||
* Set/Get Wi-Fi SoftAP ESSID
|
||||
*
|
||||
* Input Parameters:
|
||||
* iwr - The argument of the ioctl cmd
|
||||
* set - true: set data; false: get data
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_softap_essid(struct iwreq *iwr, bool set);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_softap_bssid
|
||||
*
|
||||
* Description:
|
||||
* Set/Get Wi-Fi softAP BSSID
|
||||
*
|
||||
* Input Parameters:
|
||||
* iwr - The argument of the ioctl cmd
|
||||
* set - true: set data; false: get data
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_softap_bssid(struct iwreq *iwr, bool set);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_softap_connect
|
||||
*
|
||||
* Description:
|
||||
* Trigger Wi-Fi softAP accept connection action
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_softap_connect(void);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_softap_disconnect
|
||||
*
|
||||
* Description:
|
||||
* Trigger Wi-Fi softAP drop connection action
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_softap_disconnect(void);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_softap_mode
|
||||
*
|
||||
* Description:
|
||||
* Set/Get Wi-Fi SoftAP mode code.
|
||||
*
|
||||
* Input Parameters:
|
||||
* iwr - The argument of the ioctl cmd
|
||||
* set - true: set data; false: get data
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_softap_mode(struct iwreq *iwr, bool set);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_softap_auth
|
||||
*
|
||||
* Description:
|
||||
* Set/Get authentication mode params.
|
||||
*
|
||||
* Input Parameters:
|
||||
* iwr - The argument of the ioctl cmd
|
||||
* set - true: set data; false: get data
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_softap_auth(struct iwreq *iwr, bool set);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_softap_freq
|
||||
*
|
||||
* Description:
|
||||
* Set/Get SoftAP frequency.
|
||||
*
|
||||
* Input Parameters:
|
||||
* iwr - The argument of the ioctl cmd
|
||||
* set - true: set data; false: get data
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_softap_freq(struct iwreq *iwr, bool set);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_softap_get_bitrate
|
||||
*
|
||||
* Description:
|
||||
* Get SoftAP default bit rate (Mbps).
|
||||
*
|
||||
* Input Parameters:
|
||||
* iwr - The argument of the ioctl cmd
|
||||
* set - true: set data; false: get data
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_softap_bitrate(struct iwreq *iwr, bool set);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_softap_txpower
|
||||
*
|
||||
* Description:
|
||||
* Get SoftAP transmit power (dBm).
|
||||
*
|
||||
* Input Parameters:
|
||||
* iwr - The argument of the ioctl cmd
|
||||
* set - true: set data; false: get data
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_softap_txpower(struct iwreq *iwr, bool set);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_softap_channel
|
||||
*
|
||||
* Description:
|
||||
* Get SoftAP range of channel parameters.
|
||||
*
|
||||
* Input Parameters:
|
||||
* iwr - The argument of the ioctl cmd
|
||||
* set - true: set data; false: get data
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_softap_channel(struct iwreq *iwr, bool set);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_softap_country
|
||||
*
|
||||
* Description:
|
||||
* Configure country info.
|
||||
*
|
||||
* Input Parameters:
|
||||
* iwr - The argument of the ioctl cmd
|
||||
* set - true: set data; false: get data
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_softap_country(struct iwreq *iwr, bool set);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_softap_rssi
|
||||
*
|
||||
* Description:
|
||||
* Get Wi-Fi sensitivity (dBm).
|
||||
*
|
||||
* Input Parameters:
|
||||
* iwr - The argument of the ioctl cmd
|
||||
* set - true: set data; false: get data
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success (positive non-zero values are cmd-specific)
|
||||
* Negated errno returned on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp_wifi_softap_rssi(struct iwreq *iwr, bool set);
|
||||
#endif /* ESP_WLAN_HAS_SOFTAP */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#undef EXTERN
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ARCH_RISCV_SRC_ESP32C6_ESP_WIFI_ADAPTER_H */
|
@ -20,143 +20,156 @@
|
||||
|
||||
# Include header paths
|
||||
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/nuttx/include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/nuttx/$(CHIP_SERIES)/include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/efuse/include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/efuse/private_include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/efuse/$(CHIP_SERIES)/include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/efuse/$(CHIP_SERIES)/private_include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_common/include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/include/esp_private
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/include/soc
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/port/include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/port/$(CHIP_SERIES)
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/port/$(CHIP_SERIES)/private_include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_rom/include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_rom/include/$(CHIP_SERIES)
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_rom/$(CHIP_SERIES)
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_system/include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_system/port/include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_system/port/include/private
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_system/port/public_compat
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_timer/include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/$(CHIP_SERIES)/include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/platform_port/include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/log
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/log/include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/riscv/include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/soc/include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/soc/$(CHIP_SERIES)/include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/spi_flash/include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/spi_flash/include/spi_flash
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/driver/twai/include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)nuttx$(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)components$(DELIM)driver$(DELIM)twai$(DELIM)include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)private_include
|
||||
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)include
|
||||
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_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)include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_rom$(DELIM)include$(DELIM)$(CHIP_SERIES)
|
||||
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_system$(DELIM)include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_system$(DELIM)port$(DELIM)include
|
||||
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
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)log
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)log$(DELIM)include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)riscv$(DELIM)include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)soc$(DELIM)include
|
||||
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)components$(DELIM)spi_flash$(DELIM)include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)spi_flash$(DELIM)include$(DELIM)spi_flash
|
||||
|
||||
ifeq ($(CONFIG_ESPRESSIF_SIMPLE_BOOT),y)
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/private_include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/bootloader_flash/include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/spi_flash/include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/spi_flash/include/spi_flash
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_app_format/include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)private_include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)bootloader_flash$(DELIM)include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)spi_flash$(DELIM)include
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)spi_flash$(DELIM)include$(DELIM)spi_flash
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_app_format$(DELIM)include
|
||||
endif
|
||||
|
||||
# Linker scripts
|
||||
|
||||
ARCHSCRIPT += $(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_rom/$(CHIP_SERIES)/ld/$(CHIP_SERIES).rom.ld
|
||||
ARCHSCRIPT += $(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_rom/$(CHIP_SERIES)/ld/$(CHIP_SERIES).rom.api.ld
|
||||
ARCHSCRIPT += $(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_rom/$(CHIP_SERIES)/ld/$(CHIP_SERIES).rom.newlib.ld
|
||||
ARCHSCRIPT += $(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_rom/$(CHIP_SERIES)/ld/$(CHIP_SERIES).rom.spiflash.ld
|
||||
ARCHSCRIPT += $(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_rom/$(CHIP_SERIES)/ld/$(CHIP_SERIES).rom.version.ld
|
||||
ARCHSCRIPT += $(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_rom/$(CHIP_SERIES)/ld/$(CHIP_SERIES).rom.wdt.ld
|
||||
ARCHSCRIPT += $(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/soc/$(CHIP_SERIES)/ld/$(CHIP_SERIES).peripherals.ld
|
||||
ARCHSCRIPT += $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_rom$(DELIM)$(CHIP_SERIES)$(DELIM)ld$(DELIM)$(CHIP_SERIES).rom.api.ld
|
||||
ARCHSCRIPT += $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_rom$(DELIM)$(CHIP_SERIES)$(DELIM)ld$(DELIM)$(CHIP_SERIES).rom.coexist.ld
|
||||
ARCHSCRIPT += $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_rom$(DELIM)$(CHIP_SERIES)$(DELIM)ld$(DELIM)$(CHIP_SERIES).rom.ld
|
||||
ARCHSCRIPT += $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_rom$(DELIM)$(CHIP_SERIES)$(DELIM)ld$(DELIM)$(CHIP_SERIES).rom.net80211.ld
|
||||
ARCHSCRIPT += $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_rom$(DELIM)$(CHIP_SERIES)$(DELIM)ld$(DELIM)$(CHIP_SERIES).rom.newlib.ld
|
||||
ARCHSCRIPT += $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_rom$(DELIM)$(CHIP_SERIES)$(DELIM)ld$(DELIM)$(CHIP_SERIES).rom.phy.ld
|
||||
ARCHSCRIPT += $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_rom$(DELIM)$(CHIP_SERIES)$(DELIM)ld$(DELIM)$(CHIP_SERIES).rom.pp.ld
|
||||
ARCHSCRIPT += $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_rom$(DELIM)$(CHIP_SERIES)$(DELIM)ld$(DELIM)$(CHIP_SERIES).rom.spiflash.ld
|
||||
ARCHSCRIPT += $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_rom$(DELIM)$(CHIP_SERIES)$(DELIM)ld$(DELIM)$(CHIP_SERIES).rom.version.ld
|
||||
ARCHSCRIPT += $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_rom$(DELIM)$(CHIP_SERIES)$(DELIM)ld$(DELIM)$(CHIP_SERIES).rom.wdt.ld
|
||||
ARCHSCRIPT += $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)soc$(DELIM)$(CHIP_SERIES)$(DELIM)ld$(DELIM)$(CHIP_SERIES).peripherals.ld
|
||||
|
||||
# Source files
|
||||
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/efuse/src/esp_efuse_api.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/efuse/src/esp_efuse_utility.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/efuse/$(CHIP_SERIES)/esp_efuse_fields.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/efuse/$(CHIP_SERIES)/esp_efuse_table.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/efuse/$(CHIP_SERIES)/esp_efuse_utility.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/clk_ctrl_os.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/cpu.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/esp_clk.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/hw_random.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/modem_clock.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/periph_ctrl.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/regi2c_ctrl.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/port/esp_clk_tree_common.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/port/$(CHIP_SERIES)/esp_clk_tree.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/port/$(CHIP_SERIES)/cpu_region_protect.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/port/$(CHIP_SERIES)/ocode_init.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/port/$(CHIP_SERIES)/pmu_init.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/port/$(CHIP_SERIES)/pmu_param.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/port/$(CHIP_SERIES)/pmu_sleep.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/port/$(CHIP_SERIES)/rtc_clk.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/port/$(CHIP_SERIES)/rtc_clk_init.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/port/$(CHIP_SERIES)/rtc_time.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/port/$(CHIP_SERIES)/sar_periph_ctrl.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/port/$(CHIP_SERIES)/systimer.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_rom/patches/esp_rom_regi2c_$(CHIP_SERIES).c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_rom/patches/esp_rom_systimer.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_rom/patches/esp_rom_wdt.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_system/port/brownout.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_system/port/soc/$(CHIP_SERIES)/clk.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_system/port/soc/$(CHIP_SERIES)/system_internal.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/brownout_hal.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/efuse_hal.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/gpio_hal.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/ledc_hal.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/ledc_hal_iram.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/lp_timer_hal.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/rmt_hal.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/timer_hal.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/timer_hal_iram.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/cache_hal.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/mpu_hal.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/mmu_hal.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/uart_hal.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/uart_hal_iram.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/wdt_hal_iram.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/$(CHIP_SERIES)/clk_tree_hal.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/$(CHIP_SERIES)/efuse_hal.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/$(CHIP_SERIES)/modem_clock_hal.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/log/log.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/log/log_noos.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/riscv/interrupt.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/soc/$(CHIP_SERIES)/gpio_periph.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/soc/$(CHIP_SERIES)/ledc_periph.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/soc/$(CHIP_SERIES)/rmt_periph.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/twai_hal_iram.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/twai_hal.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)src$(DELIM)esp_efuse_api.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)src$(DELIM)esp_efuse_utility.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)$(CHIP_SERIES)$(DELIM)esp_efuse_fields.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)$(CHIP_SERIES)$(DELIM)esp_efuse_table.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)$(CHIP_SERIES)$(DELIM)esp_efuse_utility.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_common$(DELIM)src$(DELIM)esp_err_to_name.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)clk_ctrl_os.c
|
||||
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)modem_clock.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)regi2c_ctrl.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)sleep_modem.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)port$(DELIM)$(CHIP_SERIES)$(DELIM)esp_clk_tree.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)ocode_init.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)port$(DELIM)$(CHIP_SERIES)$(DELIM)pmu_init.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)port$(DELIM)$(CHIP_SERIES)$(DELIM)pmu_param.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)port$(DELIM)$(CHIP_SERIES)$(DELIM)pmu_sleep.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)port$(DELIM)$(CHIP_SERIES)$(DELIM)rtc_clk.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)port$(DELIM)$(CHIP_SERIES)$(DELIM)rtc_clk_init.c
|
||||
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)$(CHIP_SERIES)$(DELIM)sar_periph_ctrl.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)port$(DELIM)$(CHIP_SERIES)$(DELIM)systimer.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_phy$(DELIM)src$(DELIM)lib_printf.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_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_systimer.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)brownout.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_system$(DELIM)port$(DELIM)soc$(DELIM)$(CHIP_SERIES)$(DELIM)clk.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_system$(DELIM)port$(DELIM)soc$(DELIM)$(CHIP_SERIES)$(DELIM)system_internal.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)brownout_hal.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)efuse_hal.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)gpio_hal.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)ledc_hal.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)ledc_hal_iram.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)lp_timer_hal.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)rmt_hal.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)timer_hal.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)timer_hal_iram.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)twai_hal_iram.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)twai_hal.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)cache_hal.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)mpu_hal.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)mmu_hal.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)uart_hal.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)uart_hal_iram.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)wdt_hal_iram.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)$(CHIP_SERIES)$(DELIM)clk_tree_hal.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)$(CHIP_SERIES)$(DELIM)efuse_hal.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)$(CHIP_SERIES)$(DELIM)modem_clock_hal.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)log$(DELIM)log.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)log$(DELIM)log_noos.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)riscv$(DELIM)interrupt.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)soc$(DELIM)$(CHIP_SERIES)$(DELIM)gpio_periph.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)soc$(DELIM)$(CHIP_SERIES)$(DELIM)ledc_periph.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)soc$(DELIM)$(CHIP_SERIES)$(DELIM)rmt_periph.c
|
||||
|
||||
ifeq ($(CONFIG_ESPRESSIF_SIMPLE_BOOT),y)
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/nuttx/src/bootloader_banner_wrap.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/bootloader_console.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/bootloader_console_loader.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/${CHIP_SERIES}/bootloader_${CHIP_SERIES}.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/bootloader_init.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/bootloader_common.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/bootloader_common_loader.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/bootloader_flash/src/bootloader_flash.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/bootloader_flash/src/bootloader_flash_config_${CHIP_SERIES}.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/bootloader_clock_init.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/bootloader_clock_loader.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/bootloader_efuse.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/bootloader_mem.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/bootloader_random.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/bootloader_random_${CHIP_SERIES}.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/esp_image_format.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/${CHIP_SERIES}/bootloader_soc.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/${CHIP_SERIES}/bootloader_sha.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/flash_encrypt.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/soc/${CHIP_SERIES}/uart_periph.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_rom/patches/esp_rom_uart.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_rom/patches/esp_rom_sys.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_rom/patches/esp_rom_spiflash.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/efuse/src/esp_efuse_fields.c
|
||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/efuse/src/efuse_controller/keys/with_key_purposes/esp_efuse_api_key.c
|
||||
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
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)src$(DELIM)bootloader_console_loader.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)src$(DELIM)${CHIP_SERIES}$(DELIM)bootloader_${CHIP_SERIES}.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)src$(DELIM)bootloader_init.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)src$(DELIM)bootloader_common.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)src$(DELIM)bootloader_common_loader.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)bootloader_flash$(DELIM)src$(DELIM)bootloader_flash.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)bootloader_flash$(DELIM)src$(DELIM)bootloader_flash_config_${CHIP_SERIES}.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)src$(DELIM)bootloader_clock_init.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)src$(DELIM)bootloader_clock_loader.c
|
||||
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
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_rom$(DELIM)patches$(DELIM)esp_rom_uart.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_rom$(DELIM)patches$(DELIM)esp_rom_sys.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_rom$(DELIM)patches$(DELIM)esp_rom_spiflash.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)src$(DELIM)esp_efuse_fields.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)src$(DELIM)efuse_controller$(DELIM)keys$(DELIM)with_key_purposes$(DELIM)esp_efuse_api_key.c
|
||||
|
||||
LDFLAGS += --wrap=bootloader_print_banner
|
||||
endif
|
||||
|
73
boards/risc-v/esp32c6/common/include/esp_board_wlan.h
Normal file
73
boards/risc-v/esp32c6/common/include/esp_board_wlan.h
Normal file
@ -0,0 +1,73 @@
|
||||
/****************************************************************************
|
||||
* boards/risc-v/esp32c6/common/include/esp_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_RISCV_ESP32C6_COMMON_INCLUDE_ESP_BOARD_WLAN_H
|
||||
#define __BOARDS_RISCV_ESP32C6_COMMON_INCLUDE_ESP_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_RISCV_ESP32C6_COMMON_INCLUDE_ESP_BOARD_WLAN_H */
|
@ -18,6 +18,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
cache_set_idrom_mmu_size = Cache_Set_IDROM_MMU_Size;
|
||||
cache_resume_icache = Cache_Resume_ICache;
|
||||
cache_suspend_icache = Cache_Suspend_ICache;
|
||||
cache_invalidate_icache_all = Cache_Invalidate_ICache_All;
|
||||
|
@ -102,6 +102,11 @@ SECTIONS
|
||||
esp_head.*(.literal .text .literal.* .text.*)
|
||||
esp_start.*(.literal .text .literal.* .text.*)
|
||||
|
||||
*(.wifi0iram.*)
|
||||
*(.wifirxiram.*)
|
||||
*(.wifislpiram.*)
|
||||
*(.wifiorslpiram.*)
|
||||
*(.wifislprxiram.*)
|
||||
} >iram0_0_seg AT > ROM
|
||||
|
||||
/* Marks the end of IRAM code segment */
|
||||
@ -277,12 +282,17 @@ SECTIONS
|
||||
.flash.text :
|
||||
{
|
||||
_stext = .;
|
||||
_instruction_reserved_start = ABSOLUTE(.); /* This is a symbol marking the flash.text start, this can be used for mmu driver to maintain virtual address */
|
||||
_text_start = ABSOLUTE(.);
|
||||
|
||||
*(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
|
||||
*(.irom0.text) /* catch stray ICACHE_RODATA_ATTR */
|
||||
*(.fini.literal)
|
||||
*(.fini)
|
||||
*(.gnu.version)
|
||||
|
||||
_text_end = ABSOLUTE(.);
|
||||
_instruction_reserved_end = ABSOLUTE(.); /* This is a symbol marking the flash.text end, this can be used for mmu driver to maintain virtual address */
|
||||
_etext = .;
|
||||
|
||||
/* Similar to _iram_start, this symbol goes here so it is
|
||||
@ -303,12 +313,28 @@ SECTIONS
|
||||
_image_drom_lma = LOADADDR(.flash.rodata);
|
||||
_image_drom_size = SIZEOF(.flash.rodata);
|
||||
|
||||
.flash.appdesc : ALIGN(0x10)
|
||||
{
|
||||
_rodata_reserved_start = ABSOLUTE(.); /* This is a symbol marking the flash.rodata start, this can be used for mmu driver to maintain virtual address */
|
||||
_rodata_start = ABSOLUTE(.);
|
||||
|
||||
/* Create an empty gap within this section. Thanks to this, the end of this
|
||||
* section will match .flash.rodata's begin address. Thus, both sections
|
||||
* will be merged when creating the final bin image. */
|
||||
. = ALIGN(ALIGNOF(.flash.rodata));
|
||||
} >default_rodata_seg
|
||||
|
||||
.flash.rodata :
|
||||
{
|
||||
_srodata = ABSOLUTE(.);
|
||||
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
*(.rodata_wlog_verbose.*)
|
||||
*(.rodata_wlog_debug.*)
|
||||
*(.rodata_wlog_info.*)
|
||||
*(.rodata_wlog_warning.*)
|
||||
*(.rodata_wlog_error.*)
|
||||
|
||||
*(.srodata.*)
|
||||
|
||||
@ -360,6 +386,16 @@ SECTIONS
|
||||
. = ALIGN(4);
|
||||
} >default_rodata_seg AT > ROM
|
||||
|
||||
.flash.rodata_noload (NOLOAD) :
|
||||
{
|
||||
/*
|
||||
This is a symbol marking the flash.rodata end, this can be used for mmu driver to maintain virtual address
|
||||
We don't need to include the noload rodata in this section
|
||||
*/
|
||||
_rodata_reserved_end = ABSOLUTE(.);
|
||||
. = ALIGN (4);
|
||||
} > default_rodata_seg AT > ROM
|
||||
|
||||
/* RTC fast memory holds RTC wake stub code !*/
|
||||
|
||||
.rtc.text :
|
||||
|
@ -36,6 +36,10 @@ ifeq ($(CONFIG_ESPRESSIF_TWAI),y)
|
||||
CSRCS += esp_board_twai.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ESPRESSIF_WIFI),y)
|
||||
CSRCS += esp_board_wlan.c
|
||||
endif
|
||||
|
||||
DEPPATH += --dep-path src
|
||||
VPATH += :src
|
||||
CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)src
|
||||
|
81
boards/risc-v/esp32c6/common/src/esp_board_wlan.c
Normal file
81
boards/risc-v/esp32c6/common/src/esp_board_wlan.c
Normal file
@ -0,0 +1,81 @@
|
||||
/****************************************************************************
|
||||
* boards/risc-v/esp32c6/common/src/esp_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 ESP_WLAN_HAS_STA
|
||||
ret = esp_wlan_sta_initialize();
|
||||
if (ret)
|
||||
{
|
||||
wlerr("ERROR: Failed to initialize Wi-Fi station\n");
|
||||
return ret;
|
||||
}
|
||||
#endif /* ESP_WLAN_HAS_STA */
|
||||
|
||||
#ifdef ESP_WLAN_HAS_SOFTAP
|
||||
ret = esp_wlan_softap_initialize();
|
||||
if (ret)
|
||||
{
|
||||
wlerr("ERROR: Failed to initialize Wi-Fi softAP\n");
|
||||
return ret;
|
||||
}
|
||||
#endif /* ESP_WLAN_HAS_SOFTAP */
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -0,0 +1,84 @@
|
||||
#
|
||||
# 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_NDEBUG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
CONFIG_ALLOW_BSD_COMPONENTS=y
|
||||
CONFIG_ARCH="risc-v"
|
||||
CONFIG_ARCH_BOARD="esp32c6-devkitc"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ESP32C6_DEVKITC=y
|
||||
CONFIG_ARCH_CHIP="esp32c6"
|
||||
CONFIG_ARCH_CHIP_ESP32C6=y
|
||||
CONFIG_ARCH_CHIP_ESP32C6WROOM1=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=2048
|
||||
CONFIG_ARCH_RISCV=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=15000
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DEV_ZERO=y
|
||||
CONFIG_DRIVERS_IEEE80211=y
|
||||
CONFIG_DRIVERS_WIRELESS=y
|
||||
CONFIG_ESPRESSIF_ESP32C6=y
|
||||
CONFIG_ESPRESSIF_SPIFLASH=y
|
||||
CONFIG_ESPRESSIF_SPIFLASH_SPIFFS=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_ESPRESSIF_WIFI_STATION_SOFTAP=y
|
||||
CONFIG_EXAMPLES_DHCPD=y
|
||||
CONFIG_EXAMPLES_RANDOM=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_IDLETHREAD_STACKSIZE=2048
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_INIT_STACKSIZE=8192
|
||||
CONFIG_INTELHEX_BINARY=y
|
||||
CONFIG_IOB_THROTTLE=24
|
||||
CONFIG_LIBC_PERROR_STDOUT=y
|
||||
CONFIG_LIBC_STRERROR=y
|
||||
CONFIG_NETDB_DNSCLIENT=y
|
||||
CONFIG_NETDEV_LATEINIT=y
|
||||
CONFIG_NETDEV_PHY_IOCTL=y
|
||||
CONFIG_NETDEV_WIRELESS_IOCTL=y
|
||||
CONFIG_NETDEV_WORK_THREAD=y
|
||||
CONFIG_NETUTILS_CJSON=y
|
||||
CONFIG_NETUTILS_DHCPD=y
|
||||
CONFIG_NET_BROADCAST=y
|
||||
CONFIG_NET_ICMP=y
|
||||
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_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_NSH_STRERROR=y
|
||||
CONFIG_PREALLOC_TIMERS=0
|
||||
CONFIG_PTHREAD_MUTEX_TYPES=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_BACKTRACE=y
|
||||
CONFIG_SCHED_LPWORK=y
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SIG_DEFAULT=y
|
||||
CONFIG_START_DAY=29
|
||||
CONFIG_START_MONTH=11
|
||||
CONFIG_START_YEAR=2019
|
||||
CONFIG_SYSTEM_DHCPC_RENEW=y
|
||||
CONFIG_SYSTEM_DUMPSTACK=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_PING=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=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
|
80
boards/risc-v/esp32c6/esp32c6-devkitc/configs/wifi/defconfig
Normal file
80
boards/risc-v/esp32c6/esp32c6-devkitc/configs/wifi/defconfig
Normal file
@ -0,0 +1,80 @@
|
||||
#
|
||||
# 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_NDEBUG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
CONFIG_ALLOW_BSD_COMPONENTS=y
|
||||
CONFIG_ARCH="risc-v"
|
||||
CONFIG_ARCH_BOARD="esp32c6-devkitc"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ESP32C6_DEVKITC=y
|
||||
CONFIG_ARCH_CHIP="esp32c6"
|
||||
CONFIG_ARCH_CHIP_ESP32C6=y
|
||||
CONFIG_ARCH_CHIP_ESP32C6WROOM1=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=2048
|
||||
CONFIG_ARCH_RISCV=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=15000
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DEV_ZERO=y
|
||||
CONFIG_DRIVERS_IEEE80211=y
|
||||
CONFIG_DRIVERS_WIRELESS=y
|
||||
CONFIG_ESPRESSIF_ESP32C6=y
|
||||
CONFIG_ESPRESSIF_SPIFLASH=y
|
||||
CONFIG_ESPRESSIF_SPIFLASH_SPIFFS=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_EXAMPLES_RANDOM=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_IDLETHREAD_STACKSIZE=2048
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_INIT_STACKSIZE=8192
|
||||
CONFIG_INTELHEX_BINARY=y
|
||||
CONFIG_IOB_THROTTLE=24
|
||||
CONFIG_LIBC_PERROR_STDOUT=y
|
||||
CONFIG_LIBC_STRERROR=y
|
||||
CONFIG_NETDB_DNSCLIENT=y
|
||||
CONFIG_NETDEV_LATEINIT=y
|
||||
CONFIG_NETDEV_PHY_IOCTL=y
|
||||
CONFIG_NETDEV_WIRELESS_IOCTL=y
|
||||
CONFIG_NETDEV_WORK_THREAD=y
|
||||
CONFIG_NETUTILS_CJSON=y
|
||||
CONFIG_NET_BROADCAST=y
|
||||
CONFIG_NET_ICMP=y
|
||||
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_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_NSH_STRERROR=y
|
||||
CONFIG_PREALLOC_TIMERS=0
|
||||
CONFIG_PTHREAD_MUTEX_TYPES=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_BACKTRACE=y
|
||||
CONFIG_SCHED_LPWORK=y
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SIG_DEFAULT=y
|
||||
CONFIG_START_DAY=29
|
||||
CONFIG_START_MONTH=11
|
||||
CONFIG_START_YEAR=2019
|
||||
CONFIG_SYSTEM_DHCPC_RENEW=y
|
||||
CONFIG_SYSTEM_DUMPSTACK=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_PING=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=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
|
@ -65,6 +65,14 @@
|
||||
# include "esp_board_rmt.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
# include "esp_coexist_internal.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
# include "esp_board_wlan.h"
|
||||
#endif
|
||||
|
||||
#include "esp32c6-devkitc.h"
|
||||
|
||||
/****************************************************************************
|
||||
@ -206,6 +214,20 @@ int esp_bringup(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
esp_coex_adapter_register(&g_coex_adapter_funcs);
|
||||
coex_pre_init();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
ret = board_wlan_init();
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to initialize wireless subsystem=%d\n",
|
||||
ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEV_GPIO
|
||||
ret = esp_gpio_init();
|
||||
if (ret < 0)
|
||||
|
@ -0,0 +1,84 @@
|
||||
#
|
||||
# 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_NDEBUG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
CONFIG_ALLOW_BSD_COMPONENTS=y
|
||||
CONFIG_ARCH="risc-v"
|
||||
CONFIG_ARCH_BOARD="esp32c6-devkitc"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ESP32C6_DEVKITC=y
|
||||
CONFIG_ARCH_CHIP="esp32c6"
|
||||
CONFIG_ARCH_CHIP_ESP32C6=y
|
||||
CONFIG_ARCH_CHIP_ESP32C6WROOM1=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=2048
|
||||
CONFIG_ARCH_RISCV=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=15000
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DEV_ZERO=y
|
||||
CONFIG_DRIVERS_IEEE80211=y
|
||||
CONFIG_DRIVERS_WIRELESS=y
|
||||
CONFIG_ESPRESSIF_ESP32C6=y
|
||||
CONFIG_ESPRESSIF_SPIFLASH=y
|
||||
CONFIG_ESPRESSIF_SPIFLASH_SPIFFS=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_ESPRESSIF_WIFI_STATION_SOFTAP=y
|
||||
CONFIG_EXAMPLES_DHCPD=y
|
||||
CONFIG_EXAMPLES_RANDOM=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_IDLETHREAD_STACKSIZE=2048
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_INIT_STACKSIZE=8192
|
||||
CONFIG_INTELHEX_BINARY=y
|
||||
CONFIG_IOB_THROTTLE=24
|
||||
CONFIG_LIBC_PERROR_STDOUT=y
|
||||
CONFIG_LIBC_STRERROR=y
|
||||
CONFIG_NETDB_DNSCLIENT=y
|
||||
CONFIG_NETDEV_LATEINIT=y
|
||||
CONFIG_NETDEV_PHY_IOCTL=y
|
||||
CONFIG_NETDEV_WIRELESS_IOCTL=y
|
||||
CONFIG_NETDEV_WORK_THREAD=y
|
||||
CONFIG_NETUTILS_CJSON=y
|
||||
CONFIG_NETUTILS_DHCPD=y
|
||||
CONFIG_NET_BROADCAST=y
|
||||
CONFIG_NET_ICMP=y
|
||||
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_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_NSH_STRERROR=y
|
||||
CONFIG_PREALLOC_TIMERS=0
|
||||
CONFIG_PTHREAD_MUTEX_TYPES=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_BACKTRACE=y
|
||||
CONFIG_SCHED_LPWORK=y
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SIG_DEFAULT=y
|
||||
CONFIG_START_DAY=29
|
||||
CONFIG_START_MONTH=11
|
||||
CONFIG_START_YEAR=2019
|
||||
CONFIG_SYSTEM_DHCPC_RENEW=y
|
||||
CONFIG_SYSTEM_DUMPSTACK=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_PING=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=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
|
84
boards/risc-v/esp32c6/esp32c6-devkitm/configs/wifi/defconfig
Normal file
84
boards/risc-v/esp32c6/esp32c6-devkitm/configs/wifi/defconfig
Normal file
@ -0,0 +1,84 @@
|
||||
#
|
||||
# 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_NDEBUG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
CONFIG_ALLOW_BSD_COMPONENTS=y
|
||||
CONFIG_ARCH="risc-v"
|
||||
CONFIG_ARCH_BOARD="esp32c6-devkitc"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ESP32C6_DEVKITC=y
|
||||
CONFIG_ARCH_CHIP="esp32c6"
|
||||
CONFIG_ARCH_CHIP_ESP32C6=y
|
||||
CONFIG_ARCH_CHIP_ESP32C6WROOM1=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=2048
|
||||
CONFIG_ARCH_RISCV=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=15000
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DEV_ZERO=y
|
||||
CONFIG_DRIVERS_IEEE80211=y
|
||||
CONFIG_DRIVERS_WIRELESS=y
|
||||
CONFIG_ESPRESSIF_ESP32C6=y
|
||||
CONFIG_ESPRESSIF_SPIFLASH=y
|
||||
CONFIG_ESPRESSIF_SPIFLASH_SPIFFS=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_ESPRESSIF_WIFI_STATION_SOFTAP=y
|
||||
CONFIG_EXAMPLES_DHCPD=y
|
||||
CONFIG_EXAMPLES_RANDOM=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_IDLETHREAD_STACKSIZE=2048
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_INIT_STACKSIZE=8192
|
||||
CONFIG_INTELHEX_BINARY=y
|
||||
CONFIG_IOB_THROTTLE=24
|
||||
CONFIG_LIBC_PERROR_STDOUT=y
|
||||
CONFIG_LIBC_STRERROR=y
|
||||
CONFIG_NETDB_DNSCLIENT=y
|
||||
CONFIG_NETDEV_LATEINIT=y
|
||||
CONFIG_NETDEV_PHY_IOCTL=y
|
||||
CONFIG_NETDEV_WIRELESS_IOCTL=y
|
||||
CONFIG_NETDEV_WORK_THREAD=y
|
||||
CONFIG_NETUTILS_CJSON=y
|
||||
CONFIG_NETUTILS_DHCPD=y
|
||||
CONFIG_NET_BROADCAST=y
|
||||
CONFIG_NET_ICMP=y
|
||||
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_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_NSH_STRERROR=y
|
||||
CONFIG_PREALLOC_TIMERS=0
|
||||
CONFIG_PTHREAD_MUTEX_TYPES=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_BACKTRACE=y
|
||||
CONFIG_SCHED_LPWORK=y
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SIG_DEFAULT=y
|
||||
CONFIG_START_DAY=29
|
||||
CONFIG_START_MONTH=11
|
||||
CONFIG_START_YEAR=2019
|
||||
CONFIG_SYSTEM_DHCPC_RENEW=y
|
||||
CONFIG_SYSTEM_DUMPSTACK=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_PING=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=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
|
@ -65,6 +65,14 @@
|
||||
# include "esp_board_rmt.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
# include "esp_coexist_internal.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
# include "esp_board_wlan.h"
|
||||
#endif
|
||||
|
||||
#include "esp32c6-devkitm.h"
|
||||
|
||||
/****************************************************************************
|
||||
@ -206,6 +214,20 @@ int esp_bringup(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
esp_coex_adapter_register(&g_coex_adapter_funcs);
|
||||
coex_pre_init();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
ret = board_wlan_init();
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to initialize wireless subsystem=%d\n",
|
||||
ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEV_GPIO
|
||||
ret = esp_gpio_init();
|
||||
if (ret < 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user