Skip to content

Commit d1b34a4

Browse files
committed
rtos/freertos: don't clean esp32p4 memory in post_reset_cleanup
1 parent 9ea8df2 commit d1b34a4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/rtos/FreeRTOS.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1366,7 +1366,11 @@ static int freertos_post_reset_cleanup(struct target *target)
13661366
struct freertos_data *rtos_data =
13671367
(struct freertos_data *)target->rtos->rtos_specific_params;
13681368

1369-
if ((target->rtos->symbols != NULL) &&
1369+
// TODO: refactor and test here for the SMP riscv targets. Do we still need to clear target memory?
1370+
if (!strcmp(target_type_name(target), "esp32p4")) {
1371+
rtos_free_threadlist(target->rtos);
1372+
// writing esp32p4 memory causes a reset issue. OCD-989
1373+
} else if (target->rtos->symbols &&
13701374
(target->rtos->symbols[FREERTOS_VAL_UX_CURRENT_NUMBER_OF_TASKS].address != 0)) {
13711375
int ret = target_buffer_write_uint(target,
13721376
target->rtos->symbols[FREERTOS_VAL_UX_CURRENT_NUMBER_OF_TASKS].address,

0 commit comments

Comments
 (0)