Skip to content

Commit b0f842a

Browse files
committed
IDF 5.2.2 upgrade
1 parent aa925c9 commit b0f842a

13 files changed

+34
-24
lines changed

.devcontainer/All/Dockerfile.All.SRC

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ RUN git clone --branch V10.4.1-kernel-only https://github.com/FreeRTOS/FreeRTOS-
9090
RUN git clone --branch STABLE-2_1_3_RELEASE https://github.com/lwip-tcpip/lwip.git --depth 1 ./sources/lwip
9191

9292
# Clone ESP-IDF
93-
RUN git clone --branch v5.1.4 https://github.com/espressif/esp-idf --depth 1 --recursive ./sources/esp-idf
93+
RUN git clone --branch v5.2.2 https://github.com/espressif/esp-idf --depth 1 --recursive ./sources/esp-idf
9494

9595
# Clone what is needed for TI
9696
RUN git clone --branch 4.10.00.07 https://github.com/nanoframework/SimpleLink_CC32xx_SDK.git --depth 1 ./sources/SimpleLinkCC32 \

.devcontainer/ESP32/Dockerfile.ESP32.SRC

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ RUN mkdir -p /usr/local/bin/gcc
4848
RUN git clone --branch R0.15 https://github.com/abbrev/fatfs.git --depth 1 ./sources/fatfs
4949

5050
# Clone ESP-IDF
51-
RUN git clone --branch v5.1.4 https://github.com/espressif/esp-idf --depth 1 --recursive ./sources/esp-idf
51+
RUN git clone --branch v5.2.2 https://github.com/espressif/esp-idf --depth 1 --recursive ./sources/esp-idf
5252

5353
# Creating static link python for pyhton3
5454
RUN ln -fs /usr/bin/python3 /usr/bin/python \

CMake/Modules/FindESP32_IDF.cmake

+3-1
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,10 @@ include(${TARGET_SERIES}_GCC_options)
114114
# freertos #
115115
############
116116

117+
list(APPEND ESP32_IDF_INCLUDE_DIRS ${esp32_idf_SOURCE_DIR}/components/freertos/config/include)
118+
list(APPEND ESP32_IDF_INCLUDE_DIRS ${esp32_idf_SOURCE_DIR}/components/freertos/config/include/freertos)
119+
list(APPEND ESP32_IDF_INCLUDE_DIRS ${esp32_idf_SOURCE_DIR}/components/freertos/config/${ESP32_CPU_TYPE}/include)
117120
list(APPEND ESP32_IDF_INCLUDE_DIRS ${esp32_idf_SOURCE_DIR}/components/freertos/FreeRTOS-Kernel/include)
118-
list(APPEND ESP32_IDF_INCLUDE_DIRS ${esp32_idf_SOURCE_DIR}/components/freertos/include/esp_additions)
119121
list(APPEND ESP32_IDF_INCLUDE_DIRS ${esp32_idf_SOURCE_DIR}/components/freertos/esp_additions/include)
120122
list(APPEND ESP32_IDF_INCLUDE_DIRS ${esp32_idf_SOURCE_DIR}/components/freertos/esp_additions/include/freertos)
121123
list(APPEND ESP32_IDF_INCLUDE_DIRS ${esp32_idf_SOURCE_DIR}/components/freertos/esp_additions/arch/${ESP32_CPU_TYPE}/include)

CMake/binutils.ESP32.cmake

-4
Original file line numberDiff line numberDiff line change
@@ -707,10 +707,6 @@ macro(nf_add_idf_as_library)
707707

708708
if(ESP32_USB_CDC)
709709

710-
#idf_build_set_property(IDF_COMPONENT_MANAGER 1)
711-
#idf_build_set_property(__COMPONENT_MANAGER_INTERFACE_VERSION 2)
712-
#message(STATUS "Support for component manager enabled")
713-
714710
# add IDF components specific to ESP32S2/S3 series
715711
# They have to be added in a specific order so they compile/link ok
716712
list(APPEND IDF_COMPONENTS_TO_ADD tinyusb)

azure-pipelines-nightly.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ resources:
1717
type: github
1818
name: espressif/esp-idf
1919
endpoint: nanoframework
20-
ref: refs/tags/v5.1.4
20+
ref: refs/tags/v5.2.2
2121

2222
# scheduled build
2323
# the schedule is defined at the AZDO web interface because of inconsistencies with time zones

azure-pipelines.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ resources:
4848
type: github
4949
name: espressif/esp-idf
5050
endpoint: nanoframework
51-
ref: 'refs/tags/v5.1.4'
51+
ref: 'refs/tags/v5.2.2'
5252
- repository: mscorlib
5353
type: github
5454
name: nanoframework/CoreLibrary

targets/ESP32/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ endif()
6060
# WHEN CHANGING THIS MAKE SURE TO UPDATE:
6161
# 1. the dev containers
6262
# 2. ref in AZDO pipeline yaml in Community Targets repo
63-
set(ESP32_IDF_TAG "5.1.4" CACHE INTERNAL "ESP32 IDF tag")
63+
set(ESP32_IDF_TAG "5.2.2" CACHE INTERNAL "ESP32 IDF tag")
6464

6565
if(NO_ESP32_IDF_PATH)
6666
# no ESP32 IDF source specified, download it from official repo

targets/ESP32/_Network/NF_ESP32_OpenThread.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ extern void ThreadSetInterfaceNumber(int networkInterfaceNumber);
4343
.host_connection_mode = HOST_CONNECTION_MODE_RCP_UART, \
4444
.host_uart_config = \
4545
{ \
46-
.port = 0, \
46+
.port = (uart_port_t)0, \
4747
.uart_config = \
4848
{ \
4949
.baud_rate = 460800, \
@@ -72,7 +72,7 @@ extern void ThreadSetInterfaceNumber(int networkInterfaceNumber);
7272
.sclk_io_num = 0, \
7373
.quadwp_io_num = -1, \
7474
.quadhd_io_num = -1, \
75-
.isr_cpu_id = INTR_CPU_ID_0, \
75+
.isr_cpu_id = ESP_INTR_CPU_AFFINITY_0, \
7676
}, \
7777
.slave_config = \
7878
{ \
@@ -384,7 +384,7 @@ esp_err_t initOpenThread(ThreadDeviceType deviceType, esp_openthread_radio_mode_
384384
config.host_config = ESP_OPENTHREAD_DEFAULT_UART_HOST_CONFIG();
385385

386386
// Set COM port using ESP32 configured pins
387-
config.host_config.host_uart_config.port = port;
387+
config.host_config.host_uart_config.port = (uart_port_t)port;
388388

389389
config.host_config.host_uart_config.uart_config.baud_rate = baud_rate;
390390

targets/ESP32/_nanoCLR/System.Device.Pwm/sys_dev_pwm_native_System_Device_Pwm_PwmChannel.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ HRESULT sys_dev_pwm_native_System_Device_Pwm_PwmChannelHelpers::ConfigureAndStar
160160

161161
duty_res = (ledc_timer_bit_t)optimumDutyResolution;
162162

163-
timer_conf = {mode, duty_res, timer_sel, (uint32_t)desiredFrequency, LEDC_AUTO_CLK};
163+
timer_conf = {mode, duty_res, timer_sel, (uint32_t)desiredFrequency, LEDC_AUTO_CLK, true};
164164

165165
result = ledc_timer_config(&timer_conf);
166166

@@ -316,7 +316,7 @@ HRESULT Library_sys_dev_pwm_native_System_Device_Pwm_PwmChannel::NativeSetDesire
316316

317317
duty_res = (ledc_timer_bit_t)optimumDutyResolution;
318318

319-
timer_conf = {mode, duty_res, timer, (uint32_t)desiredFrequency, LEDC_AUTO_CLK};
319+
timer_conf = {mode, duty_res, timer, (uint32_t)desiredFrequency, LEDC_AUTO_CLK, true};
320320

321321
result = ledc_timer_config(&timer_conf);
322322

targets/ESP32/_nanoCLR/System.Device.Spi/cpu_spi.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ bool CPU_SPI_Initialize(uint8_t busIndex, const SPI_DEVICE_CONFIGURATION &spiDev
174174
max_transfer_sz : 16384,
175175
// SPICOMMON_BUSFLAG_* flags
176176
flags : 0,
177-
isr_cpu_id : INTR_CPU_ID_0,
177+
isr_cpu_id : ESP_INTR_CPU_AFFINITY_AUTO,
178178
intr_flags : ESP_INTR_FLAG_IRAM
179179
};
180180

targets/ESP32/_nanoCLR/System.IO.Ports/sys_io_ser_native_System_IO_Ports_SerialPort.cpp

+16-4
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,12 @@ static const char *TAG = "SerialDevice";
2020

2121
NF_PAL_UART Uart0_PAL;
2222
NF_PAL_UART Uart1_PAL;
23-
#if defined(UART_NUM_2)
23+
#if SOC_UART_HP_NUM > 2
2424
NF_PAL_UART Uart2_PAL;
2525
#endif
26+
#if SOC_UART_HP_NUM > 3
27+
NF_PAL_UART Uart3_PAL;
28+
#endif
2629

2730
NF_PAL_UART *GetPalUartFromUartNum_sys(int uart_num)
2831
{
@@ -36,12 +39,18 @@ NF_PAL_UART *GetPalUartFromUartNum_sys(int uart_num)
3639
// set UART PAL
3740
return &Uart1_PAL;
3841

39-
#if defined(UART_NUM_2)
42+
#if SOC_UART_HP_NUM > 2
4043
case UART_NUM_2:
4144
// set UART PAL
4245
return &Uart2_PAL;
4346
#endif
4447

48+
#if SOC_UART_HP_NUM > 3
49+
case UART_NUM_2:
50+
// set UART PAL
51+
return &Uart3_PAL;
52+
#endif
53+
4554
default:
4655
break;
4756
}
@@ -1433,11 +1442,14 @@ HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::GetDeviceSelector_
14331442
#if defined(CONFIG_TINYUSB_CDC_ENABLED) || defined(CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG_ENABLED)
14341443
"COM1,"
14351444
#endif
1436-
#if defined(UART_NUM_1)
1445+
#if SOC_UART_HP_NUM > 1
14371446
"COM2,"
14381447
#endif
1439-
#if defined(UART_NUM_2)
1448+
#if SOC_UART_HP_NUM > 2
14401449
"COM3,"
1450+
#endif
1451+
#if SOC_UART_HP_NUM > 3
1452+
"COM4,"
14411453
#endif
14421454
;
14431455

targets/ESP32/_nanoCLR/nanoFramework.Hardware.ESP32/nanoFramework_hardware_esp32_native_Hardware_Esp32_Sleep.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,11 @@ HRESULT Library_nanoFramework_hardware_esp32_native_nanoFramework_Hardware_Esp32
239239
NANOCLR_HEADER();
240240
{
241241
esp_err_t err;
242-
int uartNum;
242+
uart_port_t uartNum;
243243
int threshold;
244244

245245
// Static arguments starts at 0
246-
uartNum = stack.Arg0().NumericByRef().s4;
246+
uartNum = (uart_port_t)stack.Arg0().NumericByRef().s4;
247247
threshold = stack.Arg1().NumericByRef().s4;
248248
uart_set_wakeup_threshold(uartNum, threshold);
249249
err = esp_sleep_enable_uart_wakeup(uartNum);

targets/ESP32/_nanoCLR/nanoFramework.Hardware.ESP32/nanoFramework_hardware_esp32_native_nanoFramework_Hardware_Esp32_Touch_TouchPad.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ static void IsrCallBack(void *arg)
3838
#if defined(CONFIG_IDF_TARGET_ESP32)
3939
touch_pad_intr_clear();
4040
#else
41-
touch_pad_intr_clear(TOUCH_PAD_INTR_MASK_ACTIVE | TOUCH_PAD_INTR_MASK_INACTIVE | TOUCH_PAD_INTR_MASK_TIMEOUT);
41+
touch_pad_intr_clear((touch_pad_intr_mask_t)(TOUCH_PAD_INTR_MASK_ACTIVE | TOUCH_PAD_INTR_MASK_INACTIVE | TOUCH_PAD_INTR_MASK_TIMEOUT));
4242
#endif
4343
for (int i = 0; i < TOUCH_PAD_MAX; i++)
4444
{
@@ -71,7 +71,7 @@ static void TouchPad_Uninitialize()
7171
#if defined(CONFIG_IDF_TARGET_ESP32)
7272
touch_pad_intr_disable();
7373
#else
74-
touch_pad_intr_disable(TOUCH_PAD_INTR_MASK_ACTIVE | TOUCH_PAD_INTR_MASK_INACTIVE | TOUCH_PAD_INTR_MASK_TIMEOUT);
74+
touch_pad_intr_disable((touch_pad_intr_mask_t)(TOUCH_PAD_INTR_MASK_ACTIVE | TOUCH_PAD_INTR_MASK_INACTIVE | TOUCH_PAD_INTR_MASK_TIMEOUT));
7575
#endif
7676
touch_pad_isr_deregister(IsrCallBack, NULL);
7777
// Clean filter and uninstall the driver

0 commit comments

Comments
 (0)