rust-raspberrypi-OS-tutorials: Can't get past `sudo screen /dev/ttyUSB0 230400` with RaspPi 3 A+

Ive had not problems with any of the first 5 tutorials but on Tutorial 6 I can’t get the screen part to work.

I get Cannot exec '/dev/ttyUSB0': No such file or directory

I have tried ls /dev/ttyUSB* and it doesn’t return any results.

Can it have anything to do with using a USB->Thunderbolt adapter?

Any ideas?

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 18 (7 by maintainers)

Most upvoted comments

Running out of ideas for now…

Will try on a Mac this weekend. Stay tuned.

Hi,

some thoughts on that: It’s true that Mac support is only experimental at the moment, but even that is not documented right now.

The problem with device names on Linux and Mac is that you never know what you are getting. /dev/ttyUSB0 is a good bet on Linux, but even there you sometimes get other names. On Mac, I’ve seen /dev/tty.usbmodem* or /dev/ttyAMA0, among others.

For that reason the Makefile has the quoted section you’ve already modified:

# Default to /dev/ttyUSB0
ifndef DEV_SERIAL
	DEV_SERIAL = /dev/ttyUSB0
endif

The way this is written also allows you to override it from commandline: DEV_SERIAL=tty.SLAB_USBtoUART make chainboot.

About the Minipush issue: One of the main philosophies of the tutorials is that beginners should not have hassles with installing third party stuff on their machines apart from Docker, which handles all the rest. Hence the strategy to pack everything into Docker containers. That this falls apart for Mac because we can`t pass through the USB device is a bit unfortunate.

I agree with Ryan that there’s a good chance you can run Minipush native, though, once you installed the dependencies on your Mac. It should be something like:

sudo gem install bundler
bundle install --path .vendor/bundle #From the root directory

And then:

$ ruby ../utils/minipush.rb /dev/tty.SLAB_USBtoUART kernel8.img

Let me know if that works.

I’ll take an action item to add notes about Mac support. I will CC you for review once I’ve done that 👍

P.S.: Please not that tutorial 9 will be a stumble again, because it uses OpenOCD and GDB inside Docker, and those again expect the USB device. You can again try to install them locally.

yep, you can see here it’s trying to bind the usb device into the docker container.

unfortunately this is not supported on docker for mac, looking at what that command is actually doing, you may be able to install and execute minipush on your native system instead.

I’ll submit a PR when I get through 7 to make sure other differences don’t come up with the chain loader.

On Mon, Apr 6, 2020 at 8:37 PM Ryan notifications@github.com wrote:

I am not sure why it’s called this instead

this is probably because macos names serial devices differently to linux (and windows, which is also different), it would perhaps be useful to update the docs to indicate you will need to find the respective serial device

— You are receiving this because you authored the thread.

Reply to this email directly, view it on GitHub https://github.com/rust-embedded/rust-raspberrypi-OS-tutorials/issues/53#issuecomment-610124146, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABAWOLH6GSVG5VTXLIOXMHLRLJ7W5ANCNFSM4MCWNXVQ .