Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try several serial devices, in sequence, at runtime? #6

Open
nimblemachines opened this issue Oct 7, 2016 · 1 comment
Open

try several serial devices, in sequence, at runtime? #6

nimblemachines opened this issue Oct 7, 2016 · 1 comment
Assignees

Comments

@nimblemachines
Copy link
Owner

The support for serial targets can be confusing and frustrating. Currently muforth connects to the device specified by a symbolic link - mu/serial-target. One issue with this is that when using USB-to-serial converters (ftdi, pl2303, etc) if the device gets wedged it will often re-enumerate and come up as a different device. Eg, muforth is connected to /dev/ttyUSB0, which wedges and re-enumerates as ttyUSB1. Now you quit muforth and re-run it, and you can't connect. It's ugly and awkward.

However, sometimes - like when using the *-peer code to test a serial protocol, you want muforth to honor the serial-target symlink (which in that case will point to /dev/pty/). Though even in this case re-enumeration (on the peer side) can occur and be confusing.

Probably the best solution is for serial-target to somehow be a template or prefix, and at runtime, muforth tries several variations (at least two: 0 and 1) before giving up.

Sadly, for this work, the exception code has to change, so that the serial interface code can "catch" thrown exceptions, rather than having them totally unwind the stack.

@nimblemachines nimblemachines self-assigned this Oct 7, 2016
@larsbrinkhoff
Copy link
Contributor

for this work, the exception code has to change, so that the serial interface code can "catch" thrown exceptions, rather than having them totally unwind the stack.

Perhaps the Common Lisp exception handling system can be an inspiration:
http://schemer.in/aeh.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants