Skip to content

Commit 575aebb

Browse files
committed
Update to IDF 5.4.1 and add basic ESP32_P4
1 parent ddbf89a commit 575aebb

File tree

9 files changed

+8332
-1
lines changed

9 files changed

+8332
-1
lines changed

CMake/binutils.ESP32.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -974,6 +974,10 @@ macro(nf_add_idf_as_library)
974974
PROPERTY COMPILE_DEFINITIONS ${IDF_LWIP_COMPILE_DEFINITIONS}
975975
)
976976

977+
#Enable Smartconfig
978+
set(ESP32_ENABLE_SMARTCONFIG "ON" CACHE INTERNAL "Enable support for Smartconfig")
979+
980+
977981
endif()
978982

979983
# need to add include path to find our ffconfig.h and target_platform.h

src/PAL/COM/sockets/ssl/MbedTLS/ssl_generic.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ __nfweak void mbedtls_net_free(mbedtls_net_context *ctx)
190190

191191
ctx->fd = -1;
192192
}
193+
*/
193194

194195
// get Unix Epoch time from HAL SystemTime
195196
time_t nf_get_unix_epoch()
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
//
2+
// Copyright (c) .NET Foundation and Contributors
3+
// See LICENSE file in the project root for full license information.
4+
//
5+

targets/ESP32/_IDF/esp32/partitions_nanoclr_2mb.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ nvs, data, nvs, 0x9000, 0x6000,
88
phy_init, data, phy, 0xf000, 0x1000,
99
# Factory area for nanoCLR - 1728k
1010
factory, app, factory, 0x10000, 0x1B0000,
11-
# Deployment area for Managed code 192k
11+
# Deployment area for Managed code 12k
1212
deploy, data, 0x84, 0x1C0000, 0x30000,
1313
# Config data for Network, Wireless, certificates, user data 64k
1414
config, data, littlefs, 0x1F0000, 0x10000,

targets/ESP32/_Network/NF_ESP32_Ethernet.cpp

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,69 @@ esp_eth_handle_t eth_handle = NULL;
9292
#endif // CONFIG_IDF_TARGET_ESP32P4
9393

9494

95+
#if CONFIG_IDF_TARGET_ESP32
96+
#define NANO_ETH_ESP32_EMAC_DEFAULT_CONFIG() \
97+
{ \
98+
.smi_gpio = \
99+
{ \
100+
.mdc_num = 23, \
101+
.mdio_num = 18 \
102+
}, \
103+
.interface = EMAC_DATA_INTERFACE_RMII, \
104+
.clock_config = \
105+
{ \
106+
.rmii = \
107+
{ \
108+
.clock_mode = DEFAULT_RMII_CLK_MODE, \
109+
.clock_gpio = (emac_rmii_clock_gpio_t)DEFAULT_RMII_CLK_GPIO \
110+
} \
111+
}, \
112+
.dma_burst_len = ETH_DMA_BURST_LEN_32, \
113+
.intr_priority = 0, \
114+
}
115+
#elif CONFIG_IDF_TARGET_ESP32P4
116+
#define NANO_ETH_ESP32_EMAC_DEFAULT_CONFIG() \
117+
{ \
118+
.smi_gpio = \
119+
{ \
120+
.mdc_num = 31, \
121+
.mdio_num = 27 \
122+
}, \
123+
.interface = EMAC_DATA_INTERFACE_RMII, \
124+
.clock_config = \
125+
{ \
126+
.rmii = \
127+
{ \
128+
.clock_mode = EMAC_CLK_EXT_IN, \
129+
.clock_gpio = 50 \
130+
} \
131+
}, \
132+
.dma_burst_len = ETH_DMA_BURST_LEN_32, \
133+
.intr_priority = 0, \
134+
.emac_dataif_gpio = \
135+
{ \
136+
.rmii = \
137+
{ \
138+
.tx_en_num = 49, \
139+
.txd0_num = 34, \
140+
.txd1_num = 35, \
141+
.crs_dv_num = 28, \
142+
.rxd0_num = 29, \
143+
.rxd1_num = 30 \
144+
} \
145+
}, \
146+
.clock_config_out_in = \
147+
{ \
148+
.rmii = \
149+
{ \
150+
.clock_mode = EMAC_CLK_EXT_IN, \
151+
.clock_gpio = -1 \
152+
} \
153+
}, \
154+
}
155+
#endif // CONFIG_IDF_TARGET_ESP32P4
156+
157+
95158
esp_err_t NF_ESP32_InitialiseEthernet(uint8_t *pMacAdr)
96159
{
97160
(void)pMacAdr;

0 commit comments

Comments
 (0)