I'm try to reproduce the result of benchmarking at here
I use STM32F429 Nucleo-144 board and Ubuntu 20.04 with VMWare on Windows10.
When I run benchmarks.py
in terminal, Serial.read()
returns empty bytes, b''.
Here is the snippet of the code:
import serial
dev = serial.Serial("/dev/ttyACM0", 115200,timeout=10)
def benchmarkBinary(binary):
print("Flashing {}..".format(binary))
subprocess.run(["st-flash", "write", binary, "0x8000000"],
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
print("Flashed, now running benchmarks..".format(binary))
state = 'waiting'
marker = b''
# This parses test vector output starting with a number of leading '=',
# and expects a hashtag '#' after the test vector output.
while True:
x = dev.read()
if x == b'' and state == 'waiting':
print('x =', x)
print('state =', state)
print("timed out while waiting for the markers")
return benchmarkBinary(binary)
And the printed result is as following:
Flashing benchmark-kindi256342.bin..
Flashed, now running benchmarks..
x = b''
state = waiting
timed out while waiting for the markers
Flashing benchmark-kindi256342.bin..
What should I do? Is there any way to run the binaries?
x = b''
state = waiting
is added by me and it is not in the original code.
And the message above is printed repeatedly since x
and state
values are fixed.
I checked the initial baud rate of STM32F429 Nucleo-144 is 115200, which is written in the original code.
And I changed /dev/ttyUSB0
to /dev/ttyACM0
since there is no /dev/ttyUSB0
in the board.
I checked there is no problem with ST-link
and gcc-arm-none-eabi
.
Also I checked the board is connected correctly.
I assume that there may be some problems with virtual environments, but I can't sure.
I also tried to run other binary code, but there is no messages even codes are flashed well, and pressed RESET button.