AW: rtems-test with serial device and run.cfg
Jan.Sommer at dlr.de
Jan.Sommer at dlr.de
Wed Apr 8 14:47:38 UTC 2020
> -----Ursprüngliche Nachricht-----
> Von: Chris Johns [mailto:chrisj at rtems.org]
> Gesendet: Mittwoch, 8. April 2020 02:57
> An: Sommer, Jan; users at rtems.org
> Betreff: Re: rtems-test with serial device and run.cfg
>
> On 2020-04-07 23:37, Jan.Sommer at dlr.de wrote:
> > I have trouble figuring out how to run rtems-test with a custom command
> where the output is captured through a serial console.
>
> Does this help ...
>
> https://docs.rtems.org/branches/master/user/testing/consoles.html
>
> ?
>
It does. Thank you very much.
I was reading here yesterday: https://docs.rtems.org/branches/master/user/testing/configuration.html#bsp-and-user-configuration
The explanation for "bsp_tty_dev" sounded like you can pass a tty-device directly.
I even clicked on the consoles link, but the first few paragraphs were just explaining what a serial interface is, so I lost interest and missed the important part :-/.
> > In my ini-file I used
> >
> > bsp_tty_dev = /dev/ttyUSB2
> > tester = %{_rtscripts}/run.cfg
> > bsp_run_cmd = i386-run
> > target_off_command = i386-stop
> >
> > We have a custom command which prepares the target device.
> > The device is connected to the development machine (running Linux) via a
> serial connection.
>
> Great. I suggest you run `set2net` as documented and have it convert the
> tty to TCP.
>
Yes. It works now very nicely.
I will send a patch with the small addition I had to make.
Cheers,
Jan
> > Now, the above did not work, since the run.cfg ignores the "bsp_tty_dev"
> setting and always assumes results via stdout.
> > When I change that, rtems-test tries to open the /dev/ttyUSB2 device, but
> fails to do so with:
> > error: opening tty dev: /dev/ttyUSB2: unknown
> >
> > Which seems to be caused by this:
> >
> > Traceback (most recent call last):
> > File "stty.py", line 77, in __init__
> > self.fd = open(dev, 'rw')
> > ValueError: must have exactly one of create/read/write/append mode
> >
> > I am not that familiar with the rtems-test internals. Do I need a different
> kind of configuration?
> > How do others use the "bsp_tty_dev" option (e.g. in the tftp tester)?
>
> The issue with direct tty access and the need to port PySerial to
> rtems-test via the rtemstoolkit. The requirements of the rtems-tools
> repo make depending on external packages for specific functionality
> problematic.
>
> Adding PySerial is a welcome addition to the toolkit but I have not had
> the time to complete this task as `ser2net` has been a suitable and
> stable alternative. I use ser2net for PC testing from it's serial port.
>
> I hope this helps.
>
> Chris
More information about the users
mailing list