Closed Adnan-Elhammoudi closed 6 months ago
I would avoid doing that. This "enter without a command does something special" behavior of U-Boot is an optimization for allowing CLI users to type less. But tbot doesn't care about how much "typing" it has to do. So it is a better idea to send explicit commands every time rather than relying on such convenience features on the other side. This also gives you a lot more flexibility should you ever want to adjust your code.
So I'd rather do something like this:
START_ADDR = 0x10000000
READ_SIZE = 0x100
addr = START_ADDR
for i in range(10):
output = ub.exec0("md.b", hex(addr), hex(READ_SIZE))
addr += READ_SIZE
@Adnan-Elhammoudi is this topic resolved for you? If yes, please close the issue :)
Is there any way to send the Enter key as an arbitrary command via u-boot console? My purpose here is to make the
md
increment the next result address and read it back.