buserror / simavr

simavr is a lean, mean and hackable AVR simulator for linux & OSX
GNU General Public License v3.0
1.56k stars 365 forks source link

Hooking up UART to stdin/stdout? #157

Open tengyifei opened 8 years ago

tengyifei commented 8 years ago

Hi, I found this simulator very useful, but I couldn't figure out a way to send/receive data via the UART from the host computer to the microcontroller. Is there a way to do it?

augusteiner commented 8 years ago

I've also been trying to do the same without much success anyway :'(

At last using picocom on linux I could see data flowing to the mcu (with the board_simduino example)

ricardojlrufino commented 7 years ago

Use: board_simduino example

export SIMAVR_UART_XTERM=1 ./obj-x86_64-linux-gnu/simduino.elf File.cpp.hex

this will create virtual/serial port: /tmp/simavr-uart0

Harvie commented 5 years ago

@ricardojlrufino is there reason why "simavr" command can't do this? I am happy with following command:

simavr -f 16000000 -m atmega328p grbl.hex

It starts to print out UART output to console, but it cannot accept any input, nor it does create virtual serial port. I would love to have this in simavr directly... Both STDIN/OUT mode and virtual port, depending on commandline arguments.

MarcinWieczorek commented 5 years ago

I'd love to see that feature too.

phd commented 5 years ago

+1