RP2040 firmware doesn't work

I'm trying to write a program for my own board with a RP2040, and I don't want to use the rp-pico crate, because it defines pins which are not available in my board. This is the code so far:

I'm testing it with the RP Pico at the moment. Using the official blinky example code works, so my toolchain and hardware etc. all works, but my code doesn't work: When I flash it by writing the UF2 file to the RP Pico, it doesn't blink, and after a few seconds the USB drive appears again, as if the boot loader didn't found it, or after a reset.

I've copied parts from GitHub - rp-rs/sample-project and updated the crates, and it works, I have no idea what I'm doing. Now I can't get the led_pin.set_low().unwrap(); working anymore, but p.IO_BANK0.gpio[led_pin].gpio_ctrl.write(|w| { w.oeover().enable(); w.outover().low(); w }); looks nice, too, more Rust-like.

I suspect that the issue with the original version was this line. Without either removing that line or adding and enabling a boot2 feature flag for the crate, the bootloader code wouldn't be included.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.