Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8597

General • Re: Custom Bootloader Jump to Application Issues on RP2040 and RP2350

$
0
0
What am I doing wrong?
Your Approach 2 isn't working because `watchdog_reboot` doesn't set up Flash on the reboot, so can only reboot to a vector in SRAM
Ah ok, that's good to know
Why does USB stdio and UART0 (with interrupts) fail in the application when started via the bootloader?
Interrupts won't work in your application because you're disabling them from the bootloader (which is correct), but not enabling them in the application. On RP2350 this is fixed in the develop branch of the SDK (see `runtime_init_per_core_irq_priorities`), but on RP2040 you'll need to call it manually at the start of your application.
I didn't think of that because the interrupts just work on a normal restart
Is there a better or more reliable way to jump from a custom bootloader to an application on the RP2040/RP2350?
On RP2350 there is a `rom_chain_image` bootrom function for exactly this purpose - see the `enc_bootloader` pico-example for a demonstration of it's usage
I've looked at the example several times. Since encryption is also shown there, the simple boot process isn't clearly visible. But I'll take another look.

@caspar11 Yes, I know Hunter Adams' article; it helped me a lot with my bootloader for the RP2040, which works exactly as I imagined. I'll take a look at your approach as well. Thanks.

Statistics: Posted by derGerd — Mon Jul 28, 2025 5:13 am



Viewing all articles
Browse latest Browse all 8597

Trending Articles