You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But, this ends in an infinite loop without anything on the output and I can't Ctrl+C the terminal, I must close the window or my CPU just burns in place, any idea?
I don't know if I can ping you in every of my issues @Premik, you're so helpful, thank you in advance.
The text was updated successfully, but these errors were encountered:
get_serial() is just a selector which gives you the Uart object. I think you are probably calling it in an endless loop. Which is not what you want. You only call the get_serial once and it should run the simulation on a background thread (if my understanding is correct). So instead of the while loop you can just do for example input("Press Enter to exit...")
I really recomend you to peek into the sources of pysimavr. It is pretty self-documenting :-). The sim.py is just like two pages of code. In the tests there are test_sim.py and test_udp.py which might give you some better clue about the serial usage.
It could also happen the simavr core has crashed before you even get the Uart object back. In some cases the python main thread could die silently and then only sigkill helps. This was fixed in Set child thread to daemon to avoid python hang. #25 but not released yet.
It might be worth try loading the .elf file instead of the .hex. It should be in the same folder.
Well.. my arduino sketch contains this code:
And my first try in Python looks like this:
But, this ends in an infinite loop without anything on the output and I can't Ctrl+C the terminal, I must close the window or my CPU just burns in place, any idea?
I don't know if I can ping you in every of my issues @Premik, you're so helpful, thank you in advance.
The text was updated successfully, but these errors were encountered: