using arduino libraries, baudrate appear to be wrong
using this patch: https://github.com/pat1/simulavr/commit/1a918c7b3ecdbccde7b991a11813c7677cb4f971
and a standardard build for arduino uno defining a serial device working at 9600 baudrate I have to use this command to get the serial stdin/stout to work well:
simulavr -d atmega328 -z -b 9600 -F 32000000 --file mqtt_ethernet.cpp.elf
but the arduino uno board is a board with 16Mhz clock
using: simulavr -d atmega328 -z -b 9600 -F 16000000 --file mqtt_ethernet.cpp.elf puts wrong character in the stdout serial monitor
Any suggestions ?
Looks like Arduino libraries use the U2X flag (double speed serial) even for low speed serial communications. Unfortunately, this flag doesn't work in SimulAVR. With Teacup, I have to limit baud rate to 38400 to avoid this flag.