RP2040 FEATHER NOT RUNNING BLINK CODE

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Steven_Torres
 
Posts: 4
Joined: Tue Aug 17, 2021 8:55 pm

RP2040 FEATHER NOT RUNNING BLINK CODE

Post by Steven_Torres »

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!

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: RP2040 FEATHER NOT RUNNING BLINK CODE

Post by mikeysklar »

Let's start with the bootloader and seeing the device on your machine.

Have you used your USB cable with other data devices?

Try the combo of Bootself + Reset as the pinout page suggests:
The BOOTSEL button is used to enter the bootloader. To enter the bootloader, press and hold BOOTSEL and then power up the board (either by plugging it into USB or pressing RESET). The bootloader is used to install/update CircuitPython.

The RESET button restarts the board and helps enter the bootloader. You can click it to reset the board without unplugging the USB cable or battery.
https://learn.adafruit.com/adafruit-fea ... 3084847-16

User avatar
Steven_Torres
 
Posts: 4
Joined: Tue Aug 17, 2021 8:55 pm

Re: RP2040 FEATHER NOT RUNNING BLINK CODE

Post by Steven_Torres »

Hey, thanks for your reply.

So I've used the cable with other data devices and I have even tried different cables to see what would work.

With each of the cables I tried both ways of entering bootloader mode (holding BOOTSEL while pugging in, and holding the BOOTSEL and pressing reset) and I can see its drive mount on my system. Once I drag in my uf2 file though, the drive dismounts, as expected, but does nothing.

Is there something I'm missing?

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: RP2040 FEATHER NOT RUNNING BLINK CODE

Post by mikeysklar »

What is the name of the UF2 file you have been dropping on it?

User avatar
Steven_Torres
 
Posts: 4
Joined: Tue Aug 17, 2021 8:55 pm

Re: RP2040 FEATHER NOT RUNNING BLINK CODE

Post by Steven_Torres »

PicoTest.uf2
(41.5 KiB) Downloaded 3 times
It's just PicoTest.uf2. I uploaded it as well if that helps.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: RP2040 FEATHER NOT RUNNING BLINK CODE

Post by mikeysklar »

@Steven_Torres,

I suspect that the PicoTest.uf2 is highly specific the the Pico board itself. Even though the RP2040 processor is the same on your Feather and Pico the are plenty of other component and pin choices that will be incompatible.

If you want to start fresh with the feather use our flash_nuke.uf2 (bottom of page):

https://learn.adafruit.com/adafruit-fea ... cuitpython

We have a guide for getting you started with Arduino on the Feather RP2040 using Earle Philhower's core.

https://learn.adafruit.com/rp2040-ardui ... e/overview

User avatar
Steven_Torres
 
Posts: 4
Joined: Tue Aug 17, 2021 8:55 pm

Re: RP2040 FEATHER NOT RUNNING BLINK CODE

Post by Steven_Torres »

Thanks so much for your help @mikeysklar,

but it turns out that I was just using the wrong compiler, instead of using the linux GNU compiler I needed to use the arm-none-eabi compiler (which makes a lot of sense in hindsight). Although I do think the flash_nuke.uf2 file helped as well given that now the neopixel led also turns on while plugged in.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: RP2040 FEATHER NOT RUNNING BLINK CODE

Post by mikeysklar »

Oh great. So the PicoTest.uf2 was successful at coming up on a Feather RP2040?

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”