Skip to content

Commit 39738fe

Browse files
committed
fix(ota): Make sure that ArduinoOTA.end() is called in the destructor espressif#10932
1 parent 4146808 commit 39738fe

File tree

159 files changed

+189102
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+189102
-4
lines changed

cores/esp32/esp32-hal-misc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ void enableCore0WDT(){
9292

9393
void disableCore0WDT(){
9494
TaskHandle_t idle_0 = xTaskGetIdleTaskHandleForCPU(0);
95-
if(idle_0 == NULL || esp_task_wdt_delete(idle_0) != ESP_OK){
95+
if(idle_0 == NULL || esp_task_wdt_status(idle_0) || esp_task_wdt_delete(idle_0) != ESP_OK){
9696
log_e("Failed to remove Core 0 IDLE task from WDT");
9797
}
9898
}
@@ -107,7 +107,7 @@ void enableCore1WDT(){
107107

108108
void disableCore1WDT(){
109109
TaskHandle_t idle_1 = xTaskGetIdleTaskHandleForCPU(1);
110-
if(idle_1 == NULL || esp_task_wdt_delete(idle_1) != ESP_OK){
110+
if(idle_1 == NULL || esp_task_wdt_status(idle_1) || esp_task_wdt_delete(idle_1) != ESP_OK){
111111
log_e("Failed to remove Core 1 IDLE task from WDT");
112112
}
113113
}

libraries/ArduinoOTA/src/ArduinoOTA.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ArduinoOTAClass::ArduinoOTAClass()
2929
}
3030

3131
ArduinoOTAClass::~ArduinoOTAClass(){
32-
_udp_ota.stop();
32+
end();
3333
}
3434

3535
ArduinoOTAClass& ArduinoOTAClass::onStart(THandlerFunction fn) {
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# SPDX-License-Identifier: GPL-2.0-or-later
2+
#
3+
# configuration file for Advantech IMX8QM DMSSE20
4+
#
5+
6+
# only JTAG supported
7+
transport select jtag
8+
9+
# set a safe JTAG clock speed, can be overridden
10+
adapter speed 1000
11+
12+
# default JTAG configuration has only SRST and no TRST
13+
reset_config srst_only srst_push_pull
14+
15+
# delay after SRST goes inactive
16+
adapter srst delay 70
17+
18+
# board has an i.MX8QM with 4 Cortex-A53 cores and 2 Cortex-A72
19+
set CHIPNAME imx8qm
20+
set CHIPCORES 6
21+
22+
# source SoC configuration
23+
source [find tcl/target/imx8qm.cfg]
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# SPDX-License-Identifier: GPL-2.0-or-later
2+
3+
# digilent CMOD S7
4+
# https://digilent.com/reference/programmable-logic/cmod-s7/reference-manual
5+
6+
7+
adapter driver ftdi
8+
ftdi channel 0
9+
ftdi layout_init 0x0008 0x008b
10+
ftdi vid_pid 0x0403 0x6010
11+
reset_config none
12+
transport select jtag
13+
14+
adapter speed 10000
15+
16+
source [find cpld/xilinx-xc7.cfg]
17+
18+
# "ipdbg -start -tap xc7.tap -hub 0x02 -tool 0 -port 5555"
19+
#openocd -f board/digilent_cmod_s7.cfg -c "init" -c "pld load xc7.pld shared_folder/cmod_s7_fast.bit"
20+
21+
set JTAGSPI_CHAIN_ID xc7.pld
22+
source [find cpld/jtagspi.cfg]
23+
24+
#jtagspi_init xc7.pld "shared_folder/bscan_spi_xc7s25.bit" 0xab
25+
#jtagspi_program shared_folder/cmod_s7_fast.bit 0
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# SPDX-License-Identifier: GPL-2.0-or-later
2+
#
3+
# Example OpenOCD configuration file for ESP32-P4 connected via ESP USB Bridge board
4+
#
5+
# For example, OpenOCD can be started for ESP32-P4 debugging on
6+
#
7+
# openocd -f board/esp32p4-bridge.cfg
8+
#
9+
10+
# Source the JTAG interface configuration file
11+
source [find interface/esp_usb_bridge.cfg]
12+
# ESP32-P4 chip id defined in the idf esp_chip_model_t
13+
espusbjtag chip_id 18
14+
# Source the ESP32-P4 configuration file
15+
source [find target/esp32p4.cfg]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# SPDX-License-Identifier: GPL-2.0-or-later
2+
#
3+
# Example OpenOCD configuration file for ESP32-P4 connected via builtin USB-JTAG adapter.
4+
#
5+
# For example, OpenOCD can be started for ESP32-P4 debugging on
6+
#
7+
# openocd -f board/esp32p4-builtin.cfg
8+
#
9+
10+
# Source the JTAG interface configuration file
11+
source [find interface/esp_usb_jtag.cfg]
12+
# Source the ESP32-P4 configuration file
13+
source [find target/esp32p4.cfg]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# SPDX-License-Identifier: GPL-2.0-or-later
2+
#
3+
# Example OpenOCD configuration file for ESP32-P4 connected via ESP-Prog.
4+
#
5+
# For example, OpenOCD can be started for ESP32-P4 debugging on
6+
#
7+
# openocd -f board/esp32p4-ftdi.cfg
8+
#
9+
10+
# Source the JTAG interface configuration file
11+
source [find interface/ftdi/esp32p4_ftdi.cfg]
12+
# Source the ESP32-P4 configuration file
13+
source [find target/esp32p4.cfg]
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# SPDX-License-Identifier: GPL-2.0-or-later
2+
# Copyright (C) 2023 Texas Instruments Incorporated - http://www.ti.com/
3+
#
4+
# Texas Instruments AM243 Launchpad
5+
# https://www.ti.com/tool/LP-AM243
6+
#
7+
8+
# AM243 Launchpad has an xds110 onboard.
9+
source [find interface/xds110.cfg]
10+
11+
transport select jtag
12+
13+
# default JTAG configuration has only SRST and no TRST
14+
reset_config srst_only srst_push_pull
15+
16+
# delay after SRST goes inactive
17+
adapter srst delay 20
18+
19+
if { ![info exists SOC] } {
20+
set SOC am243
21+
}
22+
23+
source [find target/ti_k3.cfg]
24+
25+
adapter speed 250
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# SPDX-License-Identifier: GPL-2.0-or-later
2+
# Copyright (C) 2023 Texas Instruments Incorporated - http://www.ti.com/
3+
#
4+
# Texas Instruments AM263 Launchpad
5+
# https://www.ti.com/tool/LP-AM263
6+
#
7+
8+
# AM263 Launchpad has an xds110 onboard.
9+
source [find interface/xds110.cfg]
10+
11+
transport select jtag
12+
13+
# default JTAG configuration has only SRST and no TRST
14+
reset_config srst_only srst_push_pull
15+
16+
# delay after SRST goes inactive
17+
adapter srst delay 20
18+
19+
if { ![info exists SOC] } {
20+
set SOC am263
21+
}
22+
23+
source [find target/ti_k3.cfg]
24+
25+
adapter speed 250
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# SPDX-License-Identifier: GPL-2.0-or-later
2+
# Copyright (C) 2023 Texas Instruments Incorporated - http://www.ti.com/
3+
#
4+
# Texas Instruments AM273 Launchpad
5+
# https://www.ti.com/tool/LP-AM273
6+
#
7+
8+
# AM273 Launchpad has an xds110 onboard.
9+
source [find interface/xds110.cfg]
10+
11+
transport select jtag
12+
13+
# default JTAG configuration has only SRST and no TRST
14+
reset_config srst_only srst_push_pull
15+
16+
# delay after SRST goes inactive
17+
adapter srst delay 20
18+
19+
if { ![info exists SOC] } {
20+
set SOC am273
21+
}
22+
23+
source [find target/ti_k3.cfg]
24+
25+
adapter speed 250

0 commit comments

Comments
 (0)