On Thu, Jul 20, 2023 at 3:28 PM Richard Fox <nu...@richfox.org> wrote:

> Hi,
>
> I'm new to NuttX and to the pico-sdk, (and RTOSs in general). I have an
> Adafruit Feather RP2040 that I was using to experiment with NuttX and I
> haven't been able to get either the nsh or usbnsh apps to work, (and I
> haven't really tried anything else).
>
> I have the Feather RP2040 connected to my Mac using an Adafruit #954 USB
> to TTL serial cable (pre 2014). I have the device wired so that the
> serial cable is connected to GND, Green TX to rp2040:GPIO1, white RX to
> rp2040:GPIO0.
>
> Using this configuration, I have successfully built installed, and
> tested the pico-sdk "pico-examples/build/uart/hello_uart" example that
> prints a string via the serial cable to a terminal emulator on the Mac.
> This was operating at 115200 baud.
>
> I've also successfully built and installed the bi-directional example
> from the Arduino distribution: Arduino:Built-in Examples:4.
> Communications:SerialPassThrough and am able to send to and receive from
> the Feather RP2040 through the serial cable and through the
> cu.usbmodem101 device that gets created when the controller is attached
> to my Mac with a USB cable. Communications were at 9600 baud.
>
> I have the following environment variables set in my build terminal.
>         export PICO_SDK_PATH=/opt/pico/pico-sdk
>         export HOST_PLATFORM=mac
>
> I can start the build process and it seems to succeed:
>
> make distclean
> ./tools/configure.sh -m adafruit-feather-rp2040:nsh
> make -j4
> ...
> LN: platform/board to
>
> /Users/rfox/Documents/Computers/rtos/apache-nuttx/nuttxspace/apps/platform/dummy
> Register: hello
> Register: nsh
> Register: getprime
> Register: sh
> Register: ostest
> CPP:
> /Users/rfox/Documents/Computers/rtos/apache-nuttx/nuttxspace/nuttx/boards/arm/rp2040/adafruit-feather-rp2040/scripts/adafruit-feather-rp2040-flash.ld->
>
> /Users/rfox/Documents/Computers/rtos/apacheLD: nuttx
>
>
> Generating: nuttx.uf2
> tools/rp2040/elf2uf2 nuttx nuttx.uf2;
> Done.
>
> Then I copy the uf2 binary over to the mounted controller volume using
> the handy BOOTSEL feature.
> After the volume is disconnected and my Mac has harped at me for doing
> it wrong, I open a screen to the device:



I'm not familiar with this board or BOOTSEL so this might be a dumb
question, but is it supposed to be the nuttx.uf2 file? (Note: It is
possible to produce several different types of binary images. On my boards,
I use "nuttx" -- no extension.)

More ideas below...


        screen /dev/cu.usbserial-110 115200
>
> Hit return a few times and get no response.
>

By chance do you have sn oscilloscope or logic analyzer to look at the
serial signals and see if anything is being transmitted, and at what baud
rate?

Have you tried running "make menuconfig" (after configure.sh and before
make) to verify that the serial driver is in fact enabled and that the
console is configured to use it? (Maybe the output is going elsewhere.)

Does the board have software-controlled LEDs and if so do they light up,
blink, or stay off? l

Do you have ability to try single step debugging, at least for the first
part of bootup, to see if anything is running?

Maybe others will have other ideas.

Especially, input from someone familiar with this board will be helpful!!

Hope this helps,
Nathan

Reply via email to