From f0d79459d6ab0ee430325a93fdb8bbf0adfada27 Mon Sep 17 00:00:00 2001 From: Vishwanath Martur <64204611+vishwamartur@users.noreply.github.com> Date: Mon, 4 Nov 2024 21:51:51 +0530 Subject: [PATCH] Fix SMP debugging issue on rp2040 (#1174) * Fix SMP debugging issue on rp2040 Related to #1172 Add `multicore_reset_core1` before `multicore_launch_core1` in `xPortStartScheduler` function to fix debugging issue on rp2040 with SMP enabled. * Modify `portable/ThirdParty/GCC/RP2040/port.c` to include a call to `multicore_reset_core1` before `multicore_launch_core1` within the `#if portRUNNING_ON_BOTH_CORES` block. * Recover comments back --------- Co-authored-by: ActoryOu Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com> Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com> --- portable/ThirdParty/GCC/RP2040/port.c | 1 + 1 file changed, 1 insertion(+) diff --git a/portable/ThirdParty/GCC/RP2040/port.c b/portable/ThirdParty/GCC/RP2040/port.c index 6c5d0e513..78c11bd63 100644 --- a/portable/ThirdParty/GCC/RP2040/port.c +++ b/portable/ThirdParty/GCC/RP2040/port.c @@ -378,6 +378,7 @@ void vPortStartFirstTask( void ) #if portRUNNING_ON_BOTH_CORES ucPrimaryCoreNum = configTICK_CORE; configASSERT( get_core_num() == 0 ); /* we must be started on core 0 */ + multicore_reset_core1(); multicore_launch_core1( prvDisableInterruptsAndPortStartSchedulerOnCore ); #else ucPrimaryCoreNum = get_core_num();