I recently got the RP2040 from adafruit and I have not been able to get my compiled C code to run on it:
Code: Select all
#include <stdio.h>
#include "pico/stdlib.h"
int main()
{
stdio_init_all();
const uint LED_PIN = 13;
gpio_init(LED_PIN);
gpio_set_dir(LED_PIN, GPIO_OUT);
while (true)
{
gpio_put(LED_PIN, 1);
sleep_ms(1000);
gpio_put(LED_PIN, 0);
sleep_ms(1000);
}
return 0;
}
I setup my project using the official raspberry pi project setup gui and I am compiling it in WSL2 on windows 10 using the GCC 9.3.0 x86_64 linux GNU complier. The only thing that happens when I plug in the feather is a quick flash from the charge light. It does still mount as a mass storage device when holding down the BOOTSEL button however. I have also checked with a multimeter that the board has not been shorted at all. I've also tested the code on a normal pico as well with just switching out the pin number to 25 instead of 13 in my code. I am still very much a noob when it comes to embedded development so any and all help is appreciated, thanks!