Date
1 - 2 of 2
Development Environment
Kevin Stöckl <k_stoeckl@...>
Hello to all,
|
|
Andersen, John <john.s.andersen@...>
Hi Keven,
toggle quoted messageShow quoted text
You would probably want to flash Zephyr onto the Due and then on the Linux host side, connected with a serial cable (UART) talk to the Due using python or something anything with a library to help you talk UART. For instance on the host with python you would have ``` with serial.Serial('/dev/ttyS1', 19200, timeout=1) as ser: x = ser.read() # read one byte from Due s = ser.read(10) # read up to ten bytes (timeout) from Due line = ser.readline() # read a '\n' terminated line from Due ser.write(b'hello') # write a string to the Due ``` (From: https://pythonhosted.org/pyserial/shortintro.html) Then in Zephyr anything you printk would be sent to the python (or other) process running on the Linux machine attached to it. ``` Serial Port The Atmel SAM3X8E processor has a single UART that is used by the SAM-BA bootloader. This UART has only two wires for RX/TX and does not have flow control (CTS/RTS) or FIFO. The RX/TX pins are connected to the ATmega16U2, which provides USB-to-TTL serial function. The Zephyr console output, by default, is utilizing this controller. ``` (From: https://www.zephyrproject.org/doc/latest/board/arduino_due.html) Really all that is happening is that what you normally see through the Arduino IDE when you run the program, the serial output. Is now just getting received by the python program on Linux. Only you're not using the Arduino framework you're using Zephyr so instead of Serial.write() (i think it is) you just use printk. To write to the python on the Linux host I think this issue is pertinent (https://jira.zephyrproject.org/browse/ZEP-89). Someone else please chime in here. (Andy CC'd because assigned to him). - John
On Wed, Apr 19, 2017 at 09:12:37AM +0000, Kevin Stöckl wrote:
Hello to all, _______________________________________________
|
|