-
Hi All, Another day and another issue. I've had some fun over the last few days getting my build environment working and can now compile binaries for the RP6502. I can't send the program to the PicoComputer via serial though. I can confirm I can connect to the PicoComputer via miniterm or screen, but the rp6502.py script fails to communicate. The port looks okay in ,rp6502 and is set as /dev/ttyACM0 which appears to work fine connecting via minicom. I did have to adjust permissions to allow access. I'm not certain if my issue is a result of not being able to install pyserial. I can confirm that python3-serial is installed and "appears" to work, but not smart enough to be completely sure. I can see initially there is an issue with an invalid escape character that I can get to go away if I swap ^$ to ^/$ but still no comms with the RP6502. The following is the terminal output building "advent" Executing task: python3 rp6502.py -c /home/mick/Build/adventure/.rp6502 run /home/mick/Build/adventure/build/advent.rp6502 /home/mick/Build/adventure/tools/rp6502.py:180: SyntaxWarning: invalid escape sequence '$'
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 24 replies
-
Be sure to exit minicom fully before using the python script. If minicom is up and has been allocated the serial-port, the python script cannot allocate the serial-port for its usage. |
Beta Was this translation helpful? Give feedback.
-
Can you run or copy the resulting binary manually via the command line?
|
Beta Was this translation helpful? Give feedback.
-
So that works okay, I had the PicoComputer display help on the screen. I didn't run as sudo. mick@mick-XPS-9315:~$ ls /dev/ttyA*
ls: cannot access '/dev/ttyA*': No such file or directory
mick@mick-XPS-9315:~$ ls /dev/ttyA*
/dev/ttyACM0
mick@mick-XPS-9315:~$ python
Command 'python' not found, did you mean:
command 'python3' from deb python3
command 'python' from deb python-is-python3
mick@mick-XPS-9315:~$ python3
Python 3.12.3 (main, Apr 10 2024, 05:33:47) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import serial
>>> s = serial.Serial()
>>> s.setPort("/dev/ttyACM0")
>>> s.timeout = 0.5
>>> s.baudrate = 115200
>>> s.open()
>>> s.write(b"help\r")
5
>>> s.close()
>>> quit
Use quit() or Ctrl-D (i.e. EOF) to exit
>>> quit()
|
Beta Was this translation helpful? Give feedback.
-
I've read through and followed @vruumllc's and your attempts to debug your serial issue. Tony's suggestions have been quite thorough. IIRC, I had (what I believe to be) the same issue a few months ago (when I was beating on the HW and using the pico6502's tool-chain more rigorously than recently). I racked my brains out when the issue affected me, that only the night before I knew had worked fine. I think I then recalled that my Linux OS kernel had updated overnight; it was a "minor' update. I manually reverted the kernel upgrade to 1-previous; my problem resolved (localized in my case to kernel / python3 issue.) (I run LMDE Linux Mint Debian Edition, not Ubuntu.) As a suggestion, perhaps try rolling -back to another kernel (or move forward) with your host OS kernel. (I know it sounds crazy, but I believe the regression I experienced then I isolated to the kernel update.) Update: After I wrote the above, I tracked-down my log of my recollection; the issue was with running kernel: linux-image-6.1.0-18-amd64. Attached are my log notes of that day. Hope this helps. |
Beta Was this translation helpful? Give feedback.
-
Success, many thanks guys for pointing the way. I've done a clean build of Ubuntu 22.04.4 and managed to get everything working. Hopefully someone finds this information useful in future builds. Thanks @vruumllc and @netzerohero appreciate you sticking with me to get this far |
Beta Was this translation helpful? Give feedback.
-
Hi everybody. I ran into the same issue after I upgraded Ubuntu on my Linux dev system to 24.04, and investigated. TL;DR: need to use a newer TinyUSB stack (dated after April 30) in the firmware (VGA at least, both RIA and VGA to be safe?) More detail:
@rumbledethumps is there a chance the firmware can be updated to reference a newer version of tinyusb than 86c416d ? |
Beta Was this translation helpful? Give feedback.
Success, many thanks guys for pointing the way.
I've done a clean build of Ubuntu 22.04.4 and managed to get everything working.
Hopefully someone finds this information useful in future builds.
Thanks @vruumllc and @netzerohero appreciate you sticking with me to get this far