Hi,
Firstly, a big THANK YOU for the amazing project! Glad to see that @platformio users found it useful.
See initial platformio/platformio-core#3965 posted by @adbancroft.
There is a problem with data buffering on the SimAVR/Windows side. Possible solutions:
Please note that it works great on Unix.
How to reproduce?
I've just created a simple Python script and tried to redirect standard streams to the PIPE. Subsequent reading of 1 byte hangs Python script. See code
simavr.py
import sys
import subprocess
if __name__ == "__main__":
with subprocess.Popen(
sys.argv[1:],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
bufsize=0,
) as proc:
print("reading...")
proc.stdout.read(1)
print("reading is done.")
Call SimAVR using Python bridge/script:
python simavr.py bin/simavr -m atmega328p -f 16000000L firmware.elf
Hi,
Firstly, a big THANK YOU for the amazing project! Glad to see that @platformio users found it useful.
See initial platformio/platformio-core#3965 posted by @adbancroft.
There is a problem with data buffering on the SimAVR/Windows side. Possible solutions:
Please note that it works great on Unix.
How to reproduce?
I've just created a simple Python script and tried to redirect standard streams to the PIPE. Subsequent reading of 1 byte hangs Python script. See code
simavr.pyCall SimAVR using Python bridge/script: