mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 21:36:28 +08:00
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:
committed by
Xiang Xiao
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> mksmartfs /dev/smart0
|
||||||
nsh> mount -t smartfs /dev/smart0 /mnt
|
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
|
timer
|
||||||
-----
|
-----
|
||||||
|
|
||||||
@@ -255,3 +275,24 @@ To test it, just run the following command::
|
|||||||
nsh> wdog -i /dev/watchdogX
|
nsh> wdog -i /dev/watchdogX
|
||||||
|
|
||||||
Where X is the watchdog instance.
|
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> mksmartfs /dev/smart0
|
||||||
nsh> mount -t smartfs /dev/smart0 /mnt
|
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
|
timer
|
||||||
-----
|
-----
|
||||||
|
|
||||||
@@ -255,3 +275,24 @@ To test it, just run the following command::
|
|||||||
nsh> wdog -i /dev/watchdogX
|
nsh> wdog -i /dev/watchdogX
|
||||||
|
|
||||||
Where X is the watchdog instance.
|
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
|
Timers Yes
|
||||||
UART Yes
|
UART Yes
|
||||||
Watchdog Yes
|
Watchdog Yes
|
||||||
Wifi No
|
Wifi Yes
|
||||||
XTS No
|
XTS No
|
||||||
============== =======
|
============== =======
|
||||||
|
|
||||||
|
|||||||
@@ -339,8 +339,266 @@ config ESP_RMT
|
|||||||
format, RMT can be extended to a versatile and general-purpose
|
format, RMT can be extended to a versatile and general-purpose
|
||||||
transceiver, transmitting or receiving many other types of signals.
|
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
|
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"
|
menu "UART Configuration"
|
||||||
depends on ESPRESSIF_UART
|
depends on ESPRESSIF_UART
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ ifeq ($(CONFIG_RTC),y)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_ESPRESSIF_HR_TIMER),y)
|
ifeq ($(CONFIG_ESPRESSIF_HR_TIMER),y)
|
||||||
CHIP_CSRCS += esp_hr_timer.c
|
CHIP_CSRCS += esp_hr_timer.c esp_ets_timer_legacy.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_ESPRESSIF_TWAI),y)
|
ifeq ($(CONFIG_ESPRESSIF_TWAI),y)
|
||||||
@@ -91,6 +91,14 @@ ifeq ($(CONFIG_ESPRESSIF_SPIFLASH),y)
|
|||||||
endif
|
endif
|
||||||
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
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
# Espressif HAL for 3rd Party Platforms
|
# Espressif HAL for 3rd Party Platforms
|
||||||
#############################################################################
|
#############################################################################
|
||||||
@@ -99,7 +107,7 @@ endif
|
|||||||
|
|
||||||
ESP_HAL_3RDPARTY_REPO = esp-hal-3rdparty
|
ESP_HAL_3RDPARTY_REPO = esp-hal-3rdparty
|
||||||
ifndef ESP_HAL_3RDPARTY_VERSION
|
ifndef ESP_HAL_3RDPARTY_VERSION
|
||||||
ESP_HAL_3RDPARTY_VERSION = 54aca80daef2002b0169e67bcde36f19f59cf6cf
|
ESP_HAL_3RDPARTY_VERSION = 581540ed0a5ce9674da44f9ece6a63d052058985
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef ESP_HAL_3RDPARTY_URL
|
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) 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) 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)
|
$(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
|
include common$(DELIM)espressif$(DELIM)Bootloader.mk
|
||||||
|
|
||||||
@@ -124,6 +139,10 @@ CHIP_SERIES = $(patsubst "%",%,$(CONFIG_ESPRESSIF_CHIP_SERIES))
|
|||||||
|
|
||||||
include chip/hal_${CHIP_SERIES}.mk
|
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)
|
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)/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/)
|
$(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))
|
$(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
|
||||||
|
INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)common$(DELIM)espressif$(DELIM)platform_include
|
||||||
VPATH += common$(DELIM)espressif
|
VPATH += common$(DELIM)espressif
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -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),
|
.toutsem = SEM_INITIALIZER(0),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static bool g_hr_timer_initialized;
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Functions
|
* 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;
|
struct esp_hr_timer_context_s *priv = &g_hr_timer_context;
|
||||||
|
|
||||||
@@ -311,7 +313,7 @@ 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,
|
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_handle)
|
||||||
{
|
{
|
||||||
struct esp_hr_timer_s *timer;
|
struct esp_hr_timer_s *timer;
|
||||||
@@ -351,7 +353,7 @@ int esp_hr_timer_create(const struct esp_hr_timer_args_s *args,
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void esp_hr_timer_start(struct esp_hr_timer_s *timer,
|
void IRAM_ATTR esp_hr_timer_start(struct esp_hr_timer_s *timer,
|
||||||
uint64_t timeout,
|
uint64_t timeout,
|
||||||
bool repeat)
|
bool repeat)
|
||||||
{
|
{
|
||||||
@@ -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;
|
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)
|
int esp_hr_timer_init(void)
|
||||||
{
|
{
|
||||||
static bool g_hr_timer_initialized = false;
|
|
||||||
struct esp_hr_timer_context_s *priv;
|
struct esp_hr_timer_context_s *priv;
|
||||||
int pid;
|
int pid;
|
||||||
|
|
||||||
|
|||||||
@@ -68,6 +68,7 @@
|
|||||||
#define CPUINT_FREE(cpuint) ((cpuint).val = 0)
|
#define CPUINT_FREE(cpuint) ((cpuint).val = 0)
|
||||||
#define CPUINT_ISENABLED(cpuint) ((cpuint).cpuint_en == 1)
|
#define CPUINT_ISENABLED(cpuint) ((cpuint).cpuint_en == 1)
|
||||||
#define CPUINT_ISASSIGNED(cpuint) ((cpuint).assigned == 1)
|
#define CPUINT_ISASSIGNED(cpuint) ((cpuint).assigned == 1)
|
||||||
|
#define CPUINT_ISRESERVED(cpuint) ((cpuint).reserved0 == 1)
|
||||||
#define CPUINT_ISFREE(cpuint) (!CPUINT_ISASSIGNED(cpuint))
|
#define CPUINT_ISFREE(cpuint) (!CPUINT_ISASSIGNED(cpuint))
|
||||||
|
|
||||||
/* CPU interrupts can be detached from any interrupt source by setting the
|
/* 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.
|
* 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
|
/* This bitmask has an 1 if the int should be disabled
|
||||||
* when the flash is disabled.
|
* when the flash is disabled.
|
||||||
@@ -200,8 +202,7 @@ static int esp_cpuint_alloc(int irq)
|
|||||||
|
|
||||||
DEBUGASSERT(CPUINT_ISFREE(g_cpuint_map[cpuint]));
|
DEBUGASSERT(CPUINT_ISFREE(g_cpuint_map[cpuint]));
|
||||||
|
|
||||||
CPUINT_ASSIGN(g_cpuint_map[cpuint], irq);
|
esp_set_irq(irq, cpuint);
|
||||||
g_irq_map[irq] = cpuint;
|
|
||||||
|
|
||||||
return cpuint;
|
return cpuint;
|
||||||
}
|
}
|
||||||
@@ -680,3 +681,49 @@ void IRAM_ATTR esp_intr_noniram_enable(void)
|
|||||||
esp_cpu_intr_enable(non_iram_ints);
|
esp_cpu_intr_enable(non_iram_ints);
|
||||||
leave_critical_section(irqstate);
|
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);
|
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
|
#undef EXTERN
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -865,7 +865,11 @@ int esp_rtc_driverinit(void)
|
|||||||
|
|
||||||
/* Enable HR-Timer */
|
/* Enable HR-Timer */
|
||||||
|
|
||||||
VERIFY(esp_hr_timer_init());
|
ret = esp_hr_timer_init();
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
g_hr_timer_enabled = true;
|
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);
|
extern int ets_printf(const char *fmt, ...) printf_like(1, 2);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern void cache_set_idrom_mmu_size(uint32_t irom_size, uint32_t drom_size);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Function Prototypes
|
* Private Function Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@@ -174,6 +176,11 @@ HDR_ATTR static void (*_entry_point)(void) = __start;
|
|||||||
* Public Data
|
* 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
|
* 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)
|
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
|
#ifdef CONFIG_ESPRESSIF_SIMPLE_BOOT
|
||||||
if (bootloader_init() != 0)
|
if (bootloader_init() != 0)
|
||||||
{
|
{
|
||||||
@@ -410,6 +422,19 @@ void __esp_start(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#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
|
#ifdef CONFIG_ESPRESSIF_REGION_PROTECTION
|
||||||
/* Configure region protection */
|
/* Configure region protection */
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -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 */
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -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/Make.defs
|
||||||
include common/espressif/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
|
CFLAGS += ${DEFINE_PREFIX}_RETARGETABLE_LOCKING
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -20,143 +20,156 @@
|
|||||||
|
|
||||||
# Include header paths
|
# Include header paths
|
||||||
|
|
||||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/nuttx/include
|
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)nuttx$(DELIM)include
|
||||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/nuttx/$(CHIP_SERIES)/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)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/efuse/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)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/efuse/private_include
|
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)include
|
||||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/efuse/$(CHIP_SERIES)/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)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/efuse/$(CHIP_SERIES)/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)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_common/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)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/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)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/include/esp_private
|
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_event$(DELIM)include
|
||||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/include/soc
|
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)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/port/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)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/port/$(CHIP_SERIES)
|
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)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/port/$(CHIP_SERIES)/private_include
|
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)port$(DELIM)include
|
||||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_rom/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)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_rom/include/$(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)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_rom/$(CHIP_SERIES)
|
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)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_system/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)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_system/port/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)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_system/port/include/private
|
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)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_system/port/public_compat
|
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)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_timer/include
|
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_system$(DELIM)include
|
||||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/$(CHIP_SERIES)/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)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/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)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/platform_port/include
|
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)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/log
|
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_timer$(DELIM)include
|
||||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/log/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)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/riscv/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)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/soc/include
|
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)include
|
||||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/soc/$(CHIP_SERIES)/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)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/spi_flash/include
|
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)log
|
||||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/spi_flash/include/spi_flash
|
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)log$(DELIM)include
|
||||||
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)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)
|
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)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)include
|
||||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/private_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)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/bootloader_flash/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)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/spi_flash/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)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/spi_flash/include/spi_flash
|
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)/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)esp_app_format$(DELIM)include
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Linker scripts
|
# Linker scripts
|
||||||
|
|
||||||
ARCHSCRIPT += $(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_rom/$(CHIP_SERIES)/ld/$(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.api.ld
|
||||||
ARCHSCRIPT += $(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_rom/$(CHIP_SERIES)/ld/$(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)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_rom/$(CHIP_SERIES)/ld/$(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.ld
|
||||||
ARCHSCRIPT += $(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_rom/$(CHIP_SERIES)/ld/$(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.net80211.ld
|
||||||
ARCHSCRIPT += $(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_rom/$(CHIP_SERIES)/ld/$(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.newlib.ld
|
||||||
ARCHSCRIPT += $(ARCH_SRCDIR)/chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_rom/$(CHIP_SERIES)/ld/$(CHIP_SERIES).rom.wdt.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)/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.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
|
# Source files
|
||||||
|
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/efuse/src/esp_efuse_api.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)src$(DELIM)esp_efuse_api.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/efuse/src/esp_efuse_utility.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)src$(DELIM)esp_efuse_utility.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/efuse/$(CHIP_SERIES)/esp_efuse_fields.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)$(CHIP_SERIES)$(DELIM)esp_efuse_fields.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/efuse/$(CHIP_SERIES)/esp_efuse_table.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)$(CHIP_SERIES)$(DELIM)esp_efuse_table.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/efuse/$(CHIP_SERIES)/esp_efuse_utility.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)$(CHIP_SERIES)$(DELIM)esp_efuse_utility.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/clk_ctrl_os.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/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/cpu.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)clk_ctrl_os.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/esp_clk.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)cpu.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/hw_random.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)esp_clk.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/modem_clock.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)hw_random.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/periph_ctrl.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)mac_addr.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/regi2c_ctrl.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)modem_clock.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/port/esp_clk_tree_common.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)periph_ctrl.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/port/$(CHIP_SERIES)/esp_clk_tree.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)regi2c_ctrl.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/port/$(CHIP_SERIES)/cpu_region_protect.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)sleep_modem.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/port/$(CHIP_SERIES)/ocode_init.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/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/port/$(CHIP_SERIES)/pmu_init.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/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/port/$(CHIP_SERIES)/pmu_param.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/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/port/$(CHIP_SERIES)/pmu_sleep.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/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/port/$(CHIP_SERIES)/rtc_clk.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/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/port/$(CHIP_SERIES)/rtc_clk_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/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/port/$(CHIP_SERIES)/rtc_time.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/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/port/$(CHIP_SERIES)/sar_periph_ctrl.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/$(ESP_HAL_3RDPARTY_REPO)/components/esp_hw_support/port/$(CHIP_SERIES)/systimer.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/$(ESP_HAL_3RDPARTY_REPO)/components/esp_rom/patches/esp_rom_regi2c_$(CHIP_SERIES).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/$(ESP_HAL_3RDPARTY_REPO)/components/esp_rom/patches/esp_rom_systimer.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/$(ESP_HAL_3RDPARTY_REPO)/components/esp_rom/patches/esp_rom_wdt.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/$(ESP_HAL_3RDPARTY_REPO)/components/esp_system/port/brownout.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_phy$(DELIM)src$(DELIM)lib_printf.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_system/port/soc/$(CHIP_SERIES)/clk.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_phy$(DELIM)src$(DELIM)phy_init.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_system/port/soc/$(CHIP_SERIES)/system_internal.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/$(ESP_HAL_3RDPARTY_REPO)/components/hal/brownout_hal.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_rom$(DELIM)patches$(DELIM)esp_rom_systimer.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/efuse_hal.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_rom$(DELIM)patches$(DELIM)esp_rom_wdt.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/gpio_hal.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_system$(DELIM)port$(DELIM)brownout.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/ledc_hal.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/$(ESP_HAL_3RDPARTY_REPO)/components/hal/ledc_hal_iram.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/$(ESP_HAL_3RDPARTY_REPO)/components/hal/lp_timer_hal.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)brownout_hal.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/rmt_hal.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)efuse_hal.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/timer_hal.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)gpio_hal.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/timer_hal_iram.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)ledc_hal.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/cache_hal.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)ledc_hal_iram.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/mpu_hal.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)lp_timer_hal.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/mmu_hal.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)rmt_hal.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/uart_hal.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)timer_hal.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/uart_hal_iram.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)timer_hal_iram.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/wdt_hal_iram.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)twai_hal_iram.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/$(CHIP_SERIES)/clk_tree_hal.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)twai_hal.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/$(CHIP_SERIES)/efuse_hal.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)cache_hal.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/$(CHIP_SERIES)/modem_clock_hal.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)mpu_hal.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/log/log.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)mmu_hal.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/log/log_noos.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)uart_hal.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/riscv/interrupt.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)uart_hal_iram.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/soc/$(CHIP_SERIES)/gpio_periph.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)wdt_hal_iram.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/soc/$(CHIP_SERIES)/ledc_periph.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)$(CHIP_SERIES)$(DELIM)clk_tree_hal.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/soc/$(CHIP_SERIES)/rmt_periph.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)$(CHIP_SERIES)$(DELIM)efuse_hal.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/twai_hal_iram.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)$(CHIP_SERIES)$(DELIM)modem_clock_hal.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/hal/twai_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)
|
ifeq ($(CONFIG_ESPRESSIF_SIMPLE_BOOT),y)
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/nuttx/src/bootloader_banner_wrap.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)nuttx$(DELIM)src$(DELIM)bootloader_banner_wrap.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/bootloader_console.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)src$(DELIM)bootloader_console.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/bootloader_console_loader.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)src$(DELIM)bootloader_console_loader.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/${CHIP_SERIES}/bootloader_${CHIP_SERIES}.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/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/bootloader_init.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)src$(DELIM)bootloader_init.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/bootloader_common.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)src$(DELIM)bootloader_common.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/bootloader_common_loader.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)src$(DELIM)bootloader_common_loader.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/bootloader_flash/src/bootloader_flash.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/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/bootloader_flash/src/bootloader_flash_config_${CHIP_SERIES}.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/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/bootloader_clock_init.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)src$(DELIM)bootloader_clock_init.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/bootloader_clock_loader.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)src$(DELIM)bootloader_clock_loader.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/bootloader_efuse.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)src$(DELIM)bootloader_efuse.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/bootloader_mem.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)src$(DELIM)bootloader_mem.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/bootloader_random.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)src$(DELIM)bootloader_random.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/bootloader_random_${CHIP_SERIES}.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/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/esp_image_format.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)src$(DELIM)esp_image_format.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/${CHIP_SERIES}/bootloader_soc.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/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/${CHIP_SERIES}/bootloader_sha.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/$(ESP_HAL_3RDPARTY_REPO)/components/bootloader_support/src/flash_encrypt.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bootloader_support$(DELIM)src$(DELIM)flash_encrypt.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/soc/${CHIP_SERIES}/uart_periph.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)soc$(DELIM)${CHIP_SERIES}$(DELIM)uart_periph.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_rom/patches/esp_rom_uart.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_rom$(DELIM)patches$(DELIM)esp_rom_uart.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_rom/patches/esp_rom_sys.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_rom$(DELIM)patches$(DELIM)esp_rom_sys.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/esp_rom/patches/esp_rom_spiflash.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_rom$(DELIM)patches$(DELIM)esp_rom_spiflash.c
|
||||||
CHIP_CSRCS += chip/$(ESP_HAL_3RDPARTY_REPO)/components/efuse/src/esp_efuse_fields.c
|
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)src$(DELIM)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)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
|
LDFLAGS += --wrap=bootloader_print_banner
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -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_resume_icache = Cache_Resume_ICache;
|
||||||
cache_suspend_icache = Cache_Suspend_ICache;
|
cache_suspend_icache = Cache_Suspend_ICache;
|
||||||
cache_invalidate_icache_all = Cache_Invalidate_ICache_All;
|
cache_invalidate_icache_all = Cache_Invalidate_ICache_All;
|
||||||
|
|||||||
@@ -102,6 +102,11 @@ SECTIONS
|
|||||||
esp_head.*(.literal .text .literal.* .text.*)
|
esp_head.*(.literal .text .literal.* .text.*)
|
||||||
esp_start.*(.literal .text .literal.* .text.*)
|
esp_start.*(.literal .text .literal.* .text.*)
|
||||||
|
|
||||||
|
*(.wifi0iram.*)
|
||||||
|
*(.wifirxiram.*)
|
||||||
|
*(.wifislpiram.*)
|
||||||
|
*(.wifiorslpiram.*)
|
||||||
|
*(.wifislprxiram.*)
|
||||||
} >iram0_0_seg AT > ROM
|
} >iram0_0_seg AT > ROM
|
||||||
|
|
||||||
/* Marks the end of IRAM code segment */
|
/* Marks the end of IRAM code segment */
|
||||||
@@ -277,12 +282,17 @@ SECTIONS
|
|||||||
.flash.text :
|
.flash.text :
|
||||||
{
|
{
|
||||||
_stext = .;
|
_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.*)
|
*(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
|
||||||
*(.irom0.text) /* catch stray ICACHE_RODATA_ATTR */
|
*(.irom0.text) /* catch stray ICACHE_RODATA_ATTR */
|
||||||
*(.fini.literal)
|
*(.fini.literal)
|
||||||
*(.fini)
|
*(.fini)
|
||||||
*(.gnu.version)
|
*(.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 = .;
|
_etext = .;
|
||||||
|
|
||||||
/* Similar to _iram_start, this symbol goes here so it is
|
/* Similar to _iram_start, this symbol goes here so it is
|
||||||
@@ -303,12 +313,28 @@ SECTIONS
|
|||||||
_image_drom_lma = LOADADDR(.flash.rodata);
|
_image_drom_lma = LOADADDR(.flash.rodata);
|
||||||
_image_drom_size = SIZEOF(.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 :
|
.flash.rodata :
|
||||||
{
|
{
|
||||||
_srodata = ABSOLUTE(.);
|
_srodata = ABSOLUTE(.);
|
||||||
|
|
||||||
*(.rodata)
|
*(.rodata)
|
||||||
*(.rodata.*)
|
*(.rodata.*)
|
||||||
|
*(.rodata_wlog_verbose.*)
|
||||||
|
*(.rodata_wlog_debug.*)
|
||||||
|
*(.rodata_wlog_info.*)
|
||||||
|
*(.rodata_wlog_warning.*)
|
||||||
|
*(.rodata_wlog_error.*)
|
||||||
|
|
||||||
*(.srodata.*)
|
*(.srodata.*)
|
||||||
|
|
||||||
@@ -360,6 +386,16 @@ SECTIONS
|
|||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
} >default_rodata_seg AT > ROM
|
} >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 fast memory holds RTC wake stub code !*/
|
||||||
|
|
||||||
.rtc.text :
|
.rtc.text :
|
||||||
|
|||||||
@@ -36,6 +36,10 @@ ifeq ($(CONFIG_ESPRESSIF_TWAI),y)
|
|||||||
CSRCS += esp_board_twai.c
|
CSRCS += esp_board_twai.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_ESPRESSIF_WIFI),y)
|
||||||
|
CSRCS += esp_board_wlan.c
|
||||||
|
endif
|
||||||
|
|
||||||
DEPPATH += --dep-path src
|
DEPPATH += --dep-path src
|
||||||
VPATH += :src
|
VPATH += :src
|
||||||
CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)src
|
CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)src
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -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"
|
# include "esp_board_rmt.h"
|
||||||
#endif
|
#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"
|
#include "esp32c6-devkitc.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -206,6 +214,20 @@ int esp_bringup(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#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
|
#ifdef CONFIG_DEV_GPIO
|
||||||
ret = esp_gpio_init();
|
ret = esp_gpio_init();
|
||||||
if (ret < 0)
|
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
|
||||||
@@ -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"
|
# include "esp_board_rmt.h"
|
||||||
#endif
|
#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"
|
#include "esp32c6-devkitm.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -206,6 +214,20 @@ int esp_bringup(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#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
|
#ifdef CONFIG_DEV_GPIO
|
||||||
ret = esp_gpio_init();
|
ret = esp_gpio_init();
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user