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:
screen /dev/cu.usbserial-110 115200
Hit return a few times and get no response.
I've tried rebooting the controller, disconnecting and reconnecting the
serial cable, doing both. Nothing seems to make any difference. I've
tried swapping the RX/TX connections just in case there was a pin
assignment setting different than the pico-sdk and arduino setups but it
didn't make any difference.
I've tried also using the usbnsh code but there is never a second device
created in /dev/ to connect to. That is, /dev/cu.usbserial* device is
present from the serial cable connection but the "modem" device that
gets created by using the arduino passthrough, for example,
/dev/cu.usbmodem101 does not exist when the usbnsh configured RP2040 is
connected to a USB port.
I figure that I'm missing some step, perhaps something I need to set
using the optional mkconfig step that I'm skipping over but the solution
eludes me.
Thanks for any advice,
Rich.