QEMU: UART RX/TX
Posted: Tue Dec 01, 2020 10:36 am
HI,
We are watching to use QEMU to run our ESP32 software "without the hardware". It will be mainly used for debugging.
We try the Ebiroll implementation of QEMU but we can't get it working using the instructions from the README. So currently we are using the espressif implementation of ESP32 on QEMU:
https://github.com/espressif/qemu
If I'm not wrong, this is the implementation used on the CHIP project.
Our software run on this QEMU implementation but we are not able to emulate the UART's as expected.
This is how the UART's are used on our board:
PROBLEM:
I can receive the data transmit by the emulated ESP32 software (for each uarts), but when I transmit the responses, the esp32 software don't receive anything uart_read_bytes() always return 0.
I have used all of these methods to read/write with the UART's:
Did you have any ideas ?
Something not implemented somewhere ?
We are watching to use QEMU to run our ESP32 software "without the hardware". It will be mainly used for debugging.
We try the Ebiroll implementation of QEMU but we can't get it working using the instructions from the README. So currently we are using the espressif implementation of ESP32 on QEMU:
https://github.com/espressif/qemu
If I'm not wrong, this is the implementation used on the CHIP project.
Our software run on this QEMU implementation but we are not able to emulate the UART's as expected.
This is how the UART's are used on our board:
- UART[0]: Log output/Programming (ESP32 > USB Serial Adapter)
- UART[1]: Communication with a Zigbee module. (ESP32 <> Zigbee module)
PROBLEM:
I can receive the data transmit by the emulated ESP32 software (for each uarts), but when I transmit the responses, the esp32 software don't receive anything uart_read_bytes() always return 0.
I have used all of these methods to read/write with the UART's:
Code: Select all
qemu/xtensa-softmmu/qemu-system-xtensa -nographic -s -S -machine esp32 -drive file=final.bin,if=mtd,format=raw -nic user,model=open_eth -serial /dev/ttyS4 -serial /dev/ttyS5
qemu/xtensa-softmmu/qemu-system-xtensa -nographic -s -S -machine esp32 -drive file=final.bin,if=mtd,format=raw -nic user,model=open_eth -serial udp::4555@:4556 -serial udp::4557@:4558
qemu/xtensa-softmmu/qemu-system-xtensa -nographic -s -S -machine esp32 -drive file=final.bin,if=mtd,format=raw -nic user,model=open_eth -serial tcp::8880,server,nowait -serial tcp::8881,server,nowait
qemu/xtensa-softmmu/qemu-system-xtensa -nographic -s -S -machine esp32 -drive file=final.bin,if=mtd,format=raw -nic user,model=open_eth -serial file:/tmp/uart0.txt -serial file:/tmp/uart1.txt
Something not implemented somewhere ?