Closed tomverbeure closed 6 years ago
I think Matt Venn's excerpt from ken is rather old (notice the mystorm 0.1). Originally we had no native STM32 USB and had to use either serial adaptors or later the USB/Serial chips like the CH340. Now however with the Native USB via the STM32 we do not need the extra serial adaptor to program the Ice40 bitfile. However many folks frequently build in Uarts as part of their FPGA projects, Thus this becomes the prime use of the 2nd USB feature, we have actively de-featured it on BlackIce II, as it is now hardwired into PMOD1 and the FPGA. It is also still connected to the STM32 and can be used by user programs if they so wish, but for our standard firmware it is unlikely to be activated moving forward.
Ok! So my understanding is correct then.
I've already indicated in the documentation that the /dev/ttyUSB0 method doesn't work anymore.
Closing.
Executive summary:
Has bitstream downloading over /dev/ttyUSB0 been defeatured?
If so, this should probably be made more clear!
The Long Story:
There are plenty of places that mention that you can download a bitstream via both /dev/ttyACM0 (which works for me) and /dev/ttyUSB0.
Here's one such case: https://gist.github.com/mattvenn/293c3007fae978cfb3c3eb81c7464349
The iceboot source code says the same as well. As can be seen here: https://github.com/mystorm-org/BlackIce-II/blob/3051631468404d1505e2d82c021b8d2c9acc7d34/firmware/iceboot/iceboot.c#L4 and here: https://github.com/mystorm-org/BlackIce-II/blob/3051631468404d1505e2d82c021b8d2c9acc7d34/firmware/iceboot/iceboot.c#L529
The problem is: I just can't get it to work.
After doing
stty -F /dev/ttyUSB0 115200
,stty -F /dev/ttyUSB0 raw
, and pressing the reset button, I see the following just fine:And doing
sudo cat chip.bin > /dev/ttyUSB0
returns after a while, so I think that's executing fine as well.But no bitstream is being updated.
Diving further into the
iceboot
source code, I see the following insetup()
: https://github.com/mystorm-org/BlackIce-II/blob/3051631468404d1505e2d82c021b8d2c9acc7d34/firmware/iceboot/iceboot.c#L524And: https://github.com/mystorm-org/BlackIce-II/blob/3051631468404d1505e2d82c021b8d2c9acc7d34/firmware/iceboot/iceboot.c#L263-L267
And in
loop()
, I don't see anything that's actually accessing the real UART.So my current conclusion is that this feature simply doesn't exist anymore.
Is that correct?
Thanks! Tom