P4
This commit is contained in:
1
.github/workflows/beta.yml
vendored
1
.github/workflows/beta.yml
vendored
@@ -12,6 +12,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
#board: [esp32, esp32-s3, esp32-s3-oct, esp32-c3, esp32-c6, esp32-h2, esp32-solo1, esp32-gl-s10, esp32-p4]
|
||||
board: [esp32, esp32-s3, esp32-s3-oct, esp32-c3, esp32-c6, esp32-h2, esp32-solo1, esp32-gl-s10]
|
||||
build: [release]
|
||||
env:
|
||||
|
||||
1
.github/workflows/build.yml
vendored
1
.github/workflows/build.yml
vendored
@@ -18,6 +18,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
#board: [esp32, esp32-s3, esp32-s3-oct, esp32-c3, esp32-c6, esp32-h2, esp32-solo1, esp32-gl-s10, esp32-p4]
|
||||
board: [esp32, esp32-s3, esp32-s3-oct, esp32-c3, esp32-c6, esp32-h2, esp32-solo1, esp32-gl-s10]
|
||||
build: [release]
|
||||
env:
|
||||
|
||||
1
.github/workflows/nightly.yml
vendored
1
.github/workflows/nightly.yml
vendored
@@ -34,6 +34,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
#board: [esp32, esp32-s3, esp32-s3-oct, esp32-c3, esp32-c6, esp32-h2, esp32-solo1, esp32-gl-s10, esp32-p4]
|
||||
board: [esp32, esp32-s3, esp32-s3-oct, esp32-c3, esp32-c6, esp32-h2, esp32-solo1, esp32-gl-s10]
|
||||
build: [release]
|
||||
env:
|
||||
|
||||
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
@@ -12,6 +12,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
#board: [esp32, esp32-s3, esp32-s3-oct, esp32-c3, esp32-c6, esp32-h2, esp32-solo1, esp32-gl-s10, esp32-p4]
|
||||
board: [esp32, esp32-s3, esp32-s3-oct, esp32-c3, esp32-c6, esp32-h2, esp32-solo1, esp32-gl-s10]
|
||||
build: [release]
|
||||
env:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
You can build this project using Docker. Just run the following commands in the console:
|
||||
|
||||
## Build with PlatformIO (will build for the ESP32, ESP32-S3, ESP32-C3, ESP32-C6, ESP32-H2 and ESP32-Solo1)
|
||||
## Build with PlatformIO (will build for the ESP32, ESP32-S3, ESP32-C3, ESP32-C6, ESP32-H2, ESP32-P4 and ESP32-Solo1)
|
||||
```console
|
||||
git clone https://github.com/technyon/nuki_hub --recursive
|
||||
cd nuki_hub/Docker
|
||||
|
||||
10
README.md
10
README.md
@@ -17,11 +17,10 @@ Feel free to join us on Discord: https://discord.gg/9nPq85bP4p
|
||||
<b>Supported ESP32 devices:</b>
|
||||
- Nuki Hub is compiled against all ESP32 models with Wi-Fi and Bluetooh Low Energy (BLE) which are supported by ESP-IDF 5.3.2 and Arduino Core 3.1.3.
|
||||
- Tested stable builds are provided for the ESP32, ESP32-S3, ESP32-C3, ESP32-C6 and ESP32-H2.
|
||||
- Untested builds are provided for the ESP32-Solo1 (as the developers don't own one).
|
||||
- Untested builds are provided for the ESP32-P4 (with the ESP32-C6-MINI-1 module for BLE and WiFi) and ESP32-Solo1 (as the developers don't own one).
|
||||
|
||||
<b>Not supported ESP32 devices:</b>
|
||||
- The ESP32-S2 has no built-in BLE and as such can't run Nuki Hub.
|
||||
- We are looking into supporting the ESP32-P4 with the ESP32-C6-MINI-1 module for BLE and WiFi
|
||||
|
||||
<b>Supported Nuki devices:</b>
|
||||
- Nuki Smart Lock 1.0
|
||||
@@ -60,13 +59,14 @@ When buying a new device in 2025 we can only recommend the ESP32-S3 with PSRAM (
|
||||
The ESP32-S3 is a dual-core CPU with many GPIO's, ability to enlarge RAM using PSRAM, ability to connect Ethernet modules over SPI and optionally power the device with a PoE splitter.<br>
|
||||
The only functions missing from the ESP32-S3 as compared to other ESP devices is the ability to use some Ethernet modules only supported by the original ESP32 (and ESP32-P4) and the ability to connect over WIFI6 (C6 or ESP32-P4 with C6 module)
|
||||
|
||||
If/When the ESP32-P4 with ESP32-C6-MINI-1 module for BLE/WiFi is supported this will probably become the preferred device for Nuki Hub.
|
||||
We provide a build for the ESP32-P4 with ESP32-C6-MINI-1 module for BLE/WiFi but this device is untested as of now.
|
||||
|
||||
Other considerations:
|
||||
- If Ethernet/PoE is required: An ESP32-S3 with PSRAM in combination with a SPI Ethernet module ([W5500](https://www.aliexpress.com/w/wholesale-w5500.html)) and [PoE to Ethernet and USB type B/C splitter](https://aliexpress.com/w/wholesale-poe-splitter-usb-c.html) or the LilyGO-T-ETH ELite, LilyGO-T-ETH-Lite-ESP32S3 or M5stack Atom S3R with the M5stack AtomPoe W5500 module
|
||||
- If WIFI6 is absolutely required (it probably isn't): ESP32-C6
|
||||
- If WIFI6 is absolutely required (it probably isn't): ESP32-C6 or ESP32-P4 with ESP32-C6-MINI-1 module (UNTESTED)
|
||||
|
||||
Devices ranked best-to-worst:
|
||||
- ESP32-P4 with ESP32-C6-MINI-1 module (UNTESTED)
|
||||
- ESP32-S3 with PSRAM
|
||||
- ......
|
||||
- ......
|
||||
@@ -938,7 +938,7 @@ Now connect via Wi-Fi and change the network hardware to "Generic W5500".<br>
|
||||
|
||||
If Ethernet hardware isn't detected or initialised properly after changing the network device, Wi-Fi will be used as a fallback.<br>
|
||||
<br>
|
||||
Note: LAN8720 modules are only supported on the ESP32 and ESP32-Solo1, not on the ESP32-S3, ESP32-C3 or ESP-C6<br>
|
||||
Note: LAN8720 modules are only supported on the ESP32, ESP32-P4 and ESP32-Solo1, not on the ESP32-S3, ESP32-C3 or ESP-C6<br>
|
||||
|
||||
## FAQ / Troubleshooting
|
||||
|
||||
|
||||
@@ -131,6 +131,23 @@ board = nuki-esp32solo1
|
||||
board_build.cmake_extra_args =
|
||||
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.release.defaults;sdkconfig.singlecore.defaults;sdkconfig.defaults.esp32-solo1"
|
||||
|
||||
[env:esp32-p4]
|
||||
extends = env:esp32
|
||||
board_build.embed_txtfiles =
|
||||
board = esp32-p4
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_NONE
|
||||
-DCONFIG_NIMBLE_CPP_LOG_LEVEL=0
|
||||
-DCONFIG_BT_NIMBLE_LOG_LEVEL=0
|
||||
-DCONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM=7
|
||||
-DCONFIG_ESP_WIFI_CACHE_TX_BUFFER_NUM=32
|
||||
-DCONFIG_ESP_WIFI_TX_BUFFER_TYPE=0
|
||||
-DCONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=16
|
||||
-DCONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM=32
|
||||
-DCONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF=0
|
||||
-DCONFIG_ESP_WIFI_SOFTAP_SUPPORT=y
|
||||
|
||||
[env:esp32_dbg]
|
||||
extends = env:esp32
|
||||
custom_build = debug
|
||||
@@ -226,4 +243,23 @@ build_flags =
|
||||
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
|
||||
-DCONFIG_NIMBLE_CPP_LOG_LEVEL=0
|
||||
-DCONFIG_BT_NIMBLE_LOG_LEVEL=0
|
||||
-DDEBUG_NUKIHUB
|
||||
-DDEBUG_NUKIHUB
|
||||
|
||||
[env:esp32-p4_dbg]
|
||||
extends = env:esp32-p4
|
||||
custom_build = debug
|
||||
board_build.cmake_extra_args =
|
||||
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.debug.defaults;sdkconfig.defaults.esp32-p4"
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
|
||||
-DCONFIG_NIMBLE_CPP_LOG_LEVEL=0
|
||||
-DCONFIG_BT_NIMBLE_LOG_LEVEL=0
|
||||
-DDEBUG_NUKIHUB
|
||||
-DCONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM=7
|
||||
-DCONFIG_ESP_WIFI_CACHE_TX_BUFFER_NUM=32
|
||||
-DCONFIG_ESP_WIFI_TX_BUFFER_TYPE=0
|
||||
-DCONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=16
|
||||
-DCONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM=32
|
||||
-DCONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF=0
|
||||
-DCONFIG_ESP_WIFI_SOFTAP_SUPPORT=y
|
||||
@@ -71,6 +71,13 @@ e000 boot_app0.bin
|
||||
10000 nuki_hub_esp32h2.bin
|
||||
280000 nuki_hub_updater_esp32h2.bin
|
||||
|
||||
ESP32-P4
|
||||
e000 boot_app0.bin
|
||||
0 bootloader.bin
|
||||
8000 nuki_hub.partitions.bin
|
||||
10000 nuki_hub_esp32p4.bin
|
||||
280000 nuki_hub_updater_esp32p4.bin
|
||||
|
||||
ESP32-SOLO1
|
||||
e000 boot_app0.bin
|
||||
1000 bootloader.bin
|
||||
|
||||
38
sdkconfig.defaults.esp32-p4
Normal file
38
sdkconfig.defaults.esp32-p4
Normal file
@@ -0,0 +1,38 @@
|
||||
CONFIG_SPIRAM=y
|
||||
CONFIG_SPIRAM_IGNORE_NOTFOUND=y
|
||||
CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC=y
|
||||
CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_DEFAULT=y
|
||||
CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=50768
|
||||
|
||||
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=65534
|
||||
CONFIG_LWIP_TCP_WND_DEFAULT=65534
|
||||
CONFIG_LWIP_TCP_RECVMBOX_SIZE=64
|
||||
CONFIG_LWIP_UDP_RECVMBOX_SIZE=64
|
||||
CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=64
|
||||
CONFIG_LWIP_TCP_SACK_OUT=y
|
||||
|
||||
CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=16
|
||||
CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM=64
|
||||
CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM=64
|
||||
CONFIG_ESP_WIFI_AMPDU_TX_ENABLED=y
|
||||
CONFIG_ESP_WIFI_TX_BA_WIN=32
|
||||
CONFIG_ESP_WIFI_AMPDU_RX_ENABLED=y
|
||||
CONFIG_ESP_WIFI_RX_BA_WIN=32
|
||||
CONFIG_ESP_WIFI_REMOTE_ENABLED=y
|
||||
CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED=y
|
||||
CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM=7
|
||||
CONFIG_ESP_WIFI_CACHE_TX_BUFFER_NUM=32
|
||||
CONFIG_ESP_WIFI_TX_BUFFER_TYPE=0
|
||||
CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=16
|
||||
CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM=32
|
||||
CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF=0
|
||||
|
||||
CONFIG_ESP_HCI_VHCI=y
|
||||
CONFIG_BT_CONTROLLER_DISABLED=y
|
||||
CONFIG_BT_BLUEDROID_ENABLED=n
|
||||
CONFIG_BT_NIMBLE_TRANSPORT_UART=n
|
||||
CONFIG_ESP_ENABLE_BT=y
|
||||
CONFIG_ESP32_P4_EV_BOARD=y
|
||||
CONFIG_BT_NIMBLE_ENABLED=y
|
||||
CONFIG_ESP_HOSTED_ENABLE_BT_NIMBLE=y
|
||||
CONFIG_SLAVE_IDF_TARGET_ESP32C6=y
|
||||
@@ -5,7 +5,7 @@
|
||||
#define NUKI_HUB_VERSION "9.09"
|
||||
#define NUKI_HUB_VERSION_INT (uint32_t)909
|
||||
#define NUKI_HUB_BUILD "unknownbuildnr"
|
||||
#define NUKI_HUB_DATE "2025-02-20"
|
||||
#define NUKI_HUB_DATE "2025-03-03"
|
||||
|
||||
#define GITHUB_LATEST_RELEASE_URL (char*)"https://github.com/technyon/nuki_hub/releases/latest"
|
||||
#define GITHUB_OTA_MANIFEST_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/manifest.json"
|
||||
@@ -120,6 +120,8 @@
|
||||
#define GITHUB_BETA_UPDATER_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/beta/nuki_hub_updater_esp32.bin"
|
||||
#define GITHUB_MASTER_RELEASE_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/master/nuki_hub_esp32-gl-s10.bin"
|
||||
#define GITHUB_MASTER_UPDATER_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/master/nuki_hub_updater_esp32.bin"
|
||||
#define GITHUB_LATEST_RELEASE_BINARY_URL_OTHER (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/nuki_hub_esp32.bin"
|
||||
#define GITHUB_LATEST_UPDATER_BINARY_URL_OTHER (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/nuki_hub_updater_esp32.bin"
|
||||
#define NUKI_HUB_HW (char*)"ESP32-GL-S10"
|
||||
#define BOOT_BUTTON_GPIO (gpio_num_t)0
|
||||
#else
|
||||
@@ -135,6 +137,8 @@
|
||||
#define GITHUB_BETA_UPDATER_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/beta/nuki_hub_updater_esp32.bin"
|
||||
#define GITHUB_MASTER_RELEASE_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/master/nuki_hub_esp32.bin"
|
||||
#define GITHUB_MASTER_UPDATER_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/master/nuki_hub_updater_esp32.bin"
|
||||
#define GITHUB_LATEST_RELEASE_BINARY_URL_OTHER (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/nuki_hub_esp32-gl-s10.bin"
|
||||
#define GITHUB_LATEST_UPDATER_BINARY_URL_OTHER (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/nuki_hub_updater_esp32.bin"
|
||||
#define NUKI_HUB_HW (char*)"ESP32"
|
||||
#define BOOT_BUTTON_GPIO (gpio_num_t)0
|
||||
#endif
|
||||
|
||||
@@ -329,7 +329,7 @@ const std::vector<int> Gpio::getDisabledPins() const
|
||||
disabledPins.push_back(_preferences->getInt(preference_network_custom_mdc, -1));
|
||||
disabledPins.push_back(_preferences->getInt(preference_network_custom_mdio, -1));
|
||||
break;
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32)
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||
case 4:
|
||||
disabledPins.push_back(12);
|
||||
disabledPins.push_back(ETH_RESET_PIN_LAN8720);
|
||||
|
||||
@@ -1609,6 +1609,11 @@ esp_err_t WebCfgServer::buildOtaHtml(PsychicRequest *request, PsychicResponse* r
|
||||
{
|
||||
response.print("<form onsubmit=\"return confirm('Do you really want to update to the latest release?');\" action=\"/get\" method=\"get\" style=\"float: left; margin-right: 10px\"><input type=\"hidden\" name=\"page\" value=\"autoupdate\"><input type=\"hidden\" name=\"other\" value=\"1\" /><input type=\"hidden\" name=\"release\" value=\"1\" /><input type=\"hidden\" name=\"token\" value=\"" + _confirmCode + "\" /><br><input type=\"submit\" style=\"background: blue\" value=\"Update to other PSRAM release version\"></form>");
|
||||
}
|
||||
#elif defined(CONFIG_IDF_TARGET_ESP32) && !defined(NUKI_TARGET_GL_S10)
|
||||
if(_preferences->getInt(preference_network_hardware) == 8)
|
||||
{
|
||||
response.print("<form onsubmit=\"return confirm('Do you really want to update to the latest release?');\" action=\"/get\" method=\"get\" style=\"float: left; margin-right: 10px\"><input type=\"hidden\" name=\"page\" value=\"autoupdate\"><input type=\"hidden\" name=\"other\" value=\"1\" /><input type=\"hidden\" name=\"release\" value=\"1\" /><input type=\"hidden\" name=\"token\" value=\"" + _confirmCode + "\" /><br><input type=\"submit\" style=\"background: blue\" value=\"Update to specific GL-S10 release version\"></form>");
|
||||
}
|
||||
#endif
|
||||
response.print("<div style=\"clear: both\"></div><br>");
|
||||
|
||||
@@ -4825,7 +4830,7 @@ esp_err_t WebCfgServer::buildCustomNetworkConfigHtml(PsychicRequest *request, Ps
|
||||
response.print("<table>");
|
||||
printDropDown(&response, "NWCUSTPHY", "PHY", String(_preferences->getInt(preference_network_custom_phy)), getNetworkCustomPHYOptions(), "");
|
||||
printInputField(&response, "NWCUSTADDR", "ADDR", _preferences->getInt(preference_network_custom_addr, 1), 6, "");
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32)
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||
printDropDown(&response, "NWCUSTCLK", "CLK", String(_preferences->getInt(preference_network_custom_clk, 0)), getNetworkCustomCLKOptions(), "internalopt");
|
||||
printInputField(&response, "NWCUSTPWR", "PWR", _preferences->getInt(preference_network_custom_pwr, 12), 6, "class=\"internalopt\"");
|
||||
printInputField(&response, "NWCUSTMDIO", "MDIO", _preferences->getInt(preference_network_custom_mdio), 6, "class=\"internalopt\"");
|
||||
@@ -6732,7 +6737,7 @@ esp_err_t WebCfgServer::processUpdate(PsychicRequest *request, PsychicResponse*
|
||||
_preferences->putString(preference_ota_main_url, GITHUB_MASTER_RELEASE_BINARY_URL);
|
||||
//}
|
||||
}
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32S3)
|
||||
#if (defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32)) && !defined(CONFIG_FREERTOS_UNICORE)
|
||||
else if(request->hasParam("other"))
|
||||
{
|
||||
res = buildConfirmHtml(request, resp, "Rebooting to update Nuki Hub and Nuki Hub updater<br/>Updating to latest RELEASE version", 2, true);
|
||||
@@ -6981,7 +6986,7 @@ const std::vector<std::pair<String, String>> WebCfgServer::getNetworkCustomPHYOp
|
||||
options.push_back(std::make_pair("1", "W5500"));
|
||||
options.push_back(std::make_pair("2", "DN9051"));
|
||||
options.push_back(std::make_pair("3", "KSZ8851SNL"));
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32)
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||
options.push_back(std::make_pair("4", "LAN8720"));
|
||||
options.push_back(std::make_pair("5", "RTL8201"));
|
||||
options.push_back(std::make_pair("6", "TLK110/IP101"));
|
||||
@@ -6992,7 +6997,7 @@ const std::vector<std::pair<String, String>> WebCfgServer::getNetworkCustomPHYOp
|
||||
|
||||
return options;
|
||||
}
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32)
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||
const std::vector<std::pair<String, String>> WebCfgServer::getNetworkCustomCLKOptions() const
|
||||
{
|
||||
std::vector<std::pair<String, String>> options;
|
||||
|
||||
@@ -83,7 +83,7 @@ private:
|
||||
const std::vector<std::pair<String, String>> getNetworkDetectionOptions() const;
|
||||
const std::vector<std::pair<String, String>> getGpioOptions() const;
|
||||
const std::vector<std::pair<String, String>> getNetworkCustomPHYOptions() const;
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32)
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||
const std::vector<std::pair<String, String>> getNetworkCustomCLKOptions() const;
|
||||
#endif
|
||||
#ifdef CONFIG_SOC_SPIRAM_SUPPORTED
|
||||
|
||||
@@ -8,6 +8,16 @@ dependencies:
|
||||
|
||||
espressif/libsodium: "^1.0.20~2"
|
||||
|
||||
espressif/esp_hosted:
|
||||
version: "*"
|
||||
rules:
|
||||
- if: "target in [esp32p4]"
|
||||
|
||||
espressif/esp_wifi_remote:
|
||||
version: "*"
|
||||
rules:
|
||||
- if: "target in [esp32p4]"
|
||||
|
||||
# # Defining a dependency from the registry:
|
||||
# # https://components.espressif.com/component/example/cmp
|
||||
# example/cmp: "^3.3.3" # Automatically update minor releases
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "../RestartReason.h"
|
||||
#include "../EspMillis.h"
|
||||
|
||||
#ifdef CONFIG_IDF_TARGET_ESP32
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||
#include "esp_private/esp_gpio_reserve.h"
|
||||
#include <bootloader_common.h>
|
||||
#include "esp_psram.h"
|
||||
@@ -90,7 +90,7 @@ void EthernetDevice::initialize()
|
||||
_hardwareInitialized = ETH.begin(_type, _phy_addr, _cs, _irq, _rst, SPI);
|
||||
ethCriticalFailure = false;
|
||||
}
|
||||
#ifdef CONFIG_IDF_TARGET_ESP32
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||
else
|
||||
{
|
||||
Log->println("Use RMII");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef CONFIG_IDF_TARGET_ESP32
|
||||
#if !defined(CONFIG_IDF_TARGET_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||
typedef enum {
|
||||
ETH_CLOCK_GPIO0_IN = 0,
|
||||
ETH_CLOCK_GPIO0_OUT = 1,
|
||||
@@ -11,11 +11,26 @@ typedef enum {
|
||||
#define ETH_PHY_TYPE_LAN8720 ETH_PHY_MAX
|
||||
#else
|
||||
#define ETH_PHY_TYPE_LAN8720 ETH_PHY_LAN8720
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||
#define ETH_CLOCK_GPIO0_IN EMAC_CLK_EXT_IN
|
||||
#define ETH_CLOCK_GPIO0_OUT EMAC_CLK_OUT
|
||||
#define ETH_CLOCK_GPIO16_OUT EMAC_CLK_OUT
|
||||
#define ETH_CLOCK_GPIO17_OUT EMAC_CLK_OUT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||
#define ETH_CLK_MODE_LAN8720 EMAC_CLK_EXT_IN
|
||||
#define ETH_PHY_ADDR_LAN8720 0
|
||||
#define ETH_PHY_MDC_LAN8720 31
|
||||
#define ETH_PHY_MDIO_LAN8720 52
|
||||
#define ETH_PHY_POWER_LAN8720 51
|
||||
#define ETH_RESET_PIN_LAN8720 1
|
||||
#else
|
||||
#define ETH_CLK_MODE_LAN8720 ETH_CLOCK_GPIO0_IN
|
||||
#define ETH_PHY_ADDR_LAN8720 0
|
||||
#define ETH_PHY_MDC_LAN8720 23
|
||||
#define ETH_PHY_MDIO_LAN8720 18
|
||||
#define ETH_PHY_POWER_LAN8720 -1
|
||||
#define ETH_RESET_PIN_LAN8720 1
|
||||
#define ETH_RESET_PIN_LAN8720 1
|
||||
#endif
|
||||
|
||||
@@ -118,7 +118,7 @@ NetworkDevice *NetworkDeviceInstantiator::Create(NetworkDeviceType networkDevice
|
||||
preferences->getInt(preference_network_custom_mosi, -1),
|
||||
custEthtype);
|
||||
}
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32)
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||
else if(custPHY >= 4 && custPHY <= 9)
|
||||
{
|
||||
int custCLKpref = preferences->getInt(preference_network_custom_clk, 0);
|
||||
|
||||
@@ -77,7 +77,7 @@ std::string NetworkUtil::GetCustomEthernetDeviceName(int custPHY)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32)
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||
eth_phy_type_t NetworkUtil::GetCustomEthernetType(int custPHY)
|
||||
{
|
||||
switch(custPHY)
|
||||
|
||||
@@ -9,7 +9,7 @@ class NetworkUtil
|
||||
public:
|
||||
static NetworkDeviceType GetDeviceTypeFromPreference(int hardwareDetect, int customPhy);
|
||||
static std::string GetCustomEthernetDeviceName(int custPHY);
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32)
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||
static eth_phy_type_t GetCustomEthernetType(int custPHY);
|
||||
static eth_clock_mode_t GetCustomClock(int custCLKpref);
|
||||
#endif
|
||||
|
||||
@@ -94,6 +94,23 @@ board_build.cmake_extra_args =
|
||||
extends = env:updater_esp32
|
||||
board = esp32-c6-devkitm-1
|
||||
|
||||
[env:updater_esp32-p4]
|
||||
extends = env:updater_esp32
|
||||
board_build.embed_txtfiles =
|
||||
board = esp32-p4
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_NONE
|
||||
-DCONFIG_NIMBLE_CPP_LOG_LEVEL=0
|
||||
-DCONFIG_BT_NIMBLE_LOG_LEVEL=0
|
||||
-DCONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM=7
|
||||
-DCONFIG_ESP_WIFI_CACHE_TX_BUFFER_NUM=32
|
||||
-DCONFIG_ESP_WIFI_TX_BUFFER_TYPE=0
|
||||
-DCONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=16
|
||||
-DCONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM=32
|
||||
-DCONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF=0
|
||||
-DCONFIG_ESP_WIFI_SOFTAP_SUPPORT=y
|
||||
|
||||
[env:updater_esp32-h2]
|
||||
extends = env:updater_esp32
|
||||
board = esp32-h2-devkitm-1
|
||||
|
||||
29
updater/sdkconfig.defaults.esp32-p4
Normal file
29
updater/sdkconfig.defaults.esp32-p4
Normal file
@@ -0,0 +1,29 @@
|
||||
CONFIG_SPIRAM=y
|
||||
CONFIG_SPIRAM_IGNORE_NOTFOUND=y
|
||||
CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC=y
|
||||
CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_DEFAULT=y
|
||||
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=4096
|
||||
CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=50768
|
||||
CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=16
|
||||
CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM=64
|
||||
CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM=64
|
||||
CONFIG_ESP_WIFI_AMPDU_TX_ENABLED=y
|
||||
CONFIG_ESP_WIFI_TX_BA_WIN=32
|
||||
CONFIG_ESP_WIFI_AMPDU_RX_ENABLED=y
|
||||
CONFIG_ESP_WIFI_RX_BA_WIN=32
|
||||
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=65534
|
||||
CONFIG_LWIP_TCP_WND_DEFAULT=65534
|
||||
CONFIG_LWIP_TCP_RECVMBOX_SIZE=64
|
||||
CONFIG_LWIP_UDP_RECVMBOX_SIZE=64
|
||||
CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=64
|
||||
CONFIG_LWIP_TCP_SACK_OUT=y
|
||||
CONFIG_BT_NIMBLE_TRANSPORT_UART=n
|
||||
CONFIG_ESP_HCI_VHCI=y
|
||||
CONFIG_ESP_WIFI_REMOTE_ENABLED=y
|
||||
CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED=y
|
||||
CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM=7
|
||||
CONFIG_ESP_WIFI_CACHE_TX_BUFFER_NUM=32
|
||||
CONFIG_ESP_WIFI_TX_BUFFER_TYPE=0
|
||||
CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=16
|
||||
CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM=32
|
||||
CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF=0
|
||||
46
updater/src/idf_component.yml
Normal file
46
updater/src/idf_component.yml
Normal file
@@ -0,0 +1,46 @@
|
||||
dependencies:
|
||||
# Required IDF version
|
||||
idf: ">=5.2"
|
||||
|
||||
espressif/esp_hosted:
|
||||
version: "*"
|
||||
rules:
|
||||
- if: "target in [esp32p4]"
|
||||
|
||||
espressif/esp_wifi_remote:
|
||||
version: "*"
|
||||
rules:
|
||||
- if: "target in [esp32p4]"
|
||||
|
||||
# # Defining a dependency from the registry:
|
||||
# # https://components.espressif.com/component/example/cmp
|
||||
# example/cmp: "^3.3.3" # Automatically update minor releases
|
||||
#
|
||||
# # Other ways to define dependencies
|
||||
#
|
||||
# # For components maintained by Espressif only name can be used.
|
||||
# # Same as `espressif/cmp`
|
||||
# component: "~1.0.0" # Automatically update bugfix releases
|
||||
#
|
||||
# # Or in a longer form with extra parameters
|
||||
# component2:
|
||||
# version: ">=2.0.0"
|
||||
#
|
||||
# # For transient dependencies `public` flag can be set.
|
||||
# # `public` flag doesn't have an effect for the `main` component.
|
||||
# # All dependencies of `main` are public by default.
|
||||
# public: true
|
||||
#
|
||||
# # For components hosted on non-default registry:
|
||||
# service_url: "https://componentregistry.company.com"
|
||||
#
|
||||
# # For components in git repository:
|
||||
# test_component:
|
||||
# path: test_component
|
||||
# git: ssh://git@gitlab.com/user/components.git
|
||||
#
|
||||
# # For test projects during component development
|
||||
# # components can be used from a local directory
|
||||
# # with relative or absolute path
|
||||
# some_local_component:
|
||||
# path: ../../projects/component
|
||||
Reference in New Issue
Block a user