"reproduced. it's rtt buffer..." <- > <@9names:matrix.org> reproduced. it's rtt buffer being full and blocking the second core. recovery requires that the spinlock is cleared before main. > > ``` > #[cortex_m_rt::pre_init] > unsafe fn before_main() { > // Soft-reset doesn't clear spinlocks. Clear the one used by critical-section > // before we hit main to avoid deadlocks when using a debugger > embassy_rp::pac::SIO.spinlock(31).write_value(1); > } > ``` > > I think this is also a probe-rs issue, it should not be leaving RTT in blocking mode when disconnecting Why is it necessary to clear the lock before main? Shouldn't it be sufficient to do it at the first command within main? (AFAIK using rust code in pre_init is dubious at least. Probably UB.)