skordal / potato

A simple RISC-V processor for use in FPGA designs.
BSD 3-Clause "New" or "Revised" License
263 stars 41 forks source link

Bootloader stall when uploading bin files #17

Closed Izmno closed 5 years ago

Izmno commented 5 years ago

I built the example SOC on a Digilent Cmod A7 (35T) board.

When running the bootloader and uploading a .bin file the processor or UART seems to crash after a couple of bytes sent. After a reset, I again get the welcome message of the bootloader on the serial port, but no further input is accepted. It takes a couple of resets before making a new connection to the device with putty is possible.

The same does not happen when uploading non binary files. The bootloader accepts all 128 kB and then tries to run the code. Error messages are output to the UART as is expected.

skordal commented 5 years ago

Hi, What command/tools do you use when sending the .bin file to the bootloader?

Izmno commented 5 years ago

The issue is fixed. I used the recommended command cat file.bin /dev/zero | head -c 128k | pv -s 128k -L 14400 > /dev/ttyUSB1 The problem lies with Digilent's Adept2 drivers which set up the terminal devices in cooked mode. stty -f /dev/ttyUSB1 raw fixes that.