<JamesMunns[m]>
Yeah part of the trick is that all interrupts/exceptions in cortex-m switch back to the MSP, which means if thread mode is using the PSP you can fiddle with it in interrupt context so when you return you return elsewhere
<JamesMunns[m]>
so you could safely call something like svcall, but you'd need to do unsafe trickery to change the return location in the svcall handler
korken89[m] has quit [Quit: Idle timeout reached: 172800s]
rainingmessages has joined #rust-embedded
pcs38 has joined #rust-embedded
Ralph[m] has quit [Quit: Idle timeout reached: 172800s]
<dngrs[m]>
What are my (HW and SW) options for HS USB host these days? SW wise I've been eyeing cotton, but embassy also seems to be making forays?
<jackwilsdon[m]>
From what I can tell probe-rs isn't catching the hard fault that panic-probe is triggering. Not really clear as to why (just using the Raspberry Pi Debug Probe).
<danielb[m]>
technically main is there ERROR panicked at src/main.rs:74:9: š
<danielb[m]>
yeah I'm not fluent enough in ARM to debug this, but there were some changes done since the last release that you might try (by installing probe-rs from git).
<jackwilsdon[m]>
I can raise an issue on GitHub if that helps?
<danielb[m]>
I'll 100% forget this next week, so if you'd open an issue that would be helpful
<jackwilsdon[m]>
Are there 2 issues? One that it's requiring always-print-stacktrace to print the stack trace on an unexpected halt and the other that the stacktrace is not right.
<jackwilsdon[m]>
Or is it expected that it no longer prints a stacktrace?
<danielb[m]>
I'd consider this a regression
<danielb[m]>
(for the record, it was probably me who broke it)
<jackwilsdon[m]>
At least you're owning up to it š
<danielb[m]>
i might get to that part of the issue today, but no promises
ouilemur has joined #rust-embedded
RobinMueller[m] has quit [Quit: Idle timeout reached: 172800s]
patrickh[m] has quit [Quit: Idle timeout reached: 172800s]
sroemer has quit [Ping timeout: 260 seconds]
sroemer has joined #rust-embedded
sroemer has quit [Changing host]
sroemer has joined #rust-embedded
sroemer has quit [Quit: WeeChat 4.5.2]
U007D[m] has quit [Quit: Idle timeout reached: 172800s]
KevinPFleming[m] has quit [Quit: Idle timeout reached: 172800s]
ragarnoy[m] has joined #rust-embedded
<ragarnoy[m]>
Hey, it's the first time i use raspberry picos, if you don't have access to swd pins do you have to use the bootloader by drag and dropping the file ? or is there a way to use probe-rs or some other tool
<jackwilsdon[m]>
If you don't have a debug probe or access to the debug pins, you need to use the USB UF2 upload yeah.
<JamesMunns[m]>
I use picotool for both the rp2040 and rp2350, when not using probe-rs
<JamesMunns[m]>
same command will work for both
<danielb[m]>
technically one core could debug the other, right?
<JamesMunns[m]>
danielb[m]: yeah, I've seen projects that run a gdbstub on one core, which you can use to debug the other one
<ragarnoy[m]>
Then how do you get the defmt logs from it ?
<JamesMunns[m]>
I have no idea, practically
<ragarnoy[m]>
also are elf2uf2 and picotool basically the same ?
<JamesMunns[m]>
ragarnoy[m]: they do similar things
<JamesMunns[m]>
picotool is actually published/maintained by the raspberry pi folks themselves
<JamesMunns[m]>
for a while, elf2uf2 didn't support rp2350, I think it might now?
<ragarnoy[m]>
<JamesMunns[m]> "for a while, elf2uf2 didn't..." <- from what i can see there's a pr open to add support
<ragarnoy[m]>
well if anyone has experience with debugging an rp2350 and knows how to see the defmt logs i'm all ears
<thejpster[m]>
elf2uf2-rs does one thing picotool does (make UF2 files and optionally copy them somewhere). Picotool does about 10 additional things (such as sign images)
<JamesMunns[m]>
oh, I think someone made a usb defmt impl? not sure
<JamesMunns[m]>
I really need to make that defmt sink for postcard-rpc...
<JamesMunns[m]>
I often use postcard-rpc for usb comms, with no debugger attached. You can send whatever topics you want over postcard-rpc, which I typically use instead of defmt
<JamesMunns[m]>
you can also add a "go to bootloader" command, so you can tell the app to go back to bootloader for reflashing
<thejpster[m]>
ragarnoy[m]: As someone who has debugged a 2350 whilst looking at defmt logs (and before probe-rs had support) Iām pretty sure I used their openocd fork, which has RTT support.
<JamesMunns[m]>
that still requires a probe, which the original commenter said they didn't have IIRC
<JamesMunns[m]>
or rather, they don't have access to the swd pins
<ragarnoy[m]>
JamesMunns[m]: i have probes but the rp i have is really limited in terms of pins
ManuelHatzl[m] has joined #rust-embedded
<ManuelHatzl[m]>
ragarnoy[m]: if you are able to use openocd, I created embedded-runner which shows defmt logs in your console and writes them to a json file if you run tests.