fomu-workshop icon indicating copy to clipboard operation
fomu-workshop copied to clipboard

fomu looses programming

Open arblake opened this issue 3 years ago • 16 comments

I have uploaded the code using dfu -D build.dfu. Success and reported that ttyACM0 is available. dmesg also reports ttyACM0 is available. Attempts to communicate with minicom fail. device /dev/ttyACM0 no longer present. see below

Device returned transfer size 1024 Copying data from PC to DFU device Download [=========================] 100% 104090 bytes Download done. state(7) = dfuMANIFEST, status(0) = No error condition is present state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present Done! ....... new full-speed USB device number 10 using xhci_hcd [ 6706.026844] usb 1-3.4: New USB device found, idVendor=1d50, idProduct=6130, bcdDevice= 0.00 [ 6706.026853] usb 1-3.4: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 6706.688830] cdc_acm 1-3.4:1.0: ttyACM0: USB ACM device ........ minicom: cannot open /dev/ttyACM0: Input/output error ........ new full-speed USB device number 14 using xhci_hcd [ 7687.769675] usb 1-3.4: Device not responding to setup address. [ 7687.977344] usb 1-3.4: Device not responding to setup address. [ 7688.185311] usb 1-3.4: device not accepting address 14, error -71 [ 7688.186262] usb 1-3-port4: unable to enumerate USB device ... any suggestions welcome.

arblake avatar Oct 05 '20 05:10 arblake

Hi @arblake , is this with the micropython example?

tcal-x avatar Oct 13 '20 16:10 tcal-x

No,  FOMU  pvt  trying to load eforth

Adrian

On 13/10/20 7:22 pm, Other Tim wrote:

Hi @arblake https://github.com/arblake , is this with the micropython example?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/im-tomu/fomu-workshop/issues/318#issuecomment-707856641, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABNKKWZVP73ZTPHRCE5BVLSKR5ENANCNFSM4SEHWRRQ.

-- Adrian Blake, VK2ALF 101 Mulach St Cooma, NSW, 2630 Australia Mobile +61 407232978

Pärna tn 3 Otepää Valgamaa 67404 Estonia Mobile +372 51971441

arblake avatar Oct 13 '20 16:10 arblake

Maybe @rob-ng15 has advice for debugging the hw/sw USB stack used by eforth?

Another thing you can try looking at: before programming, try running dfu-util -l a few times. Hopefully you'll always see

Found DFU: [1209:5bf0] ver=0101, devnum=12, cfg=1, intf=0, path="1-2.1", alt=0, name="Fomu PVT running DFU Bootloader v2.0.3", serial="UNKNOWN"

If you sometimes see Failed to retrieve string descriptor 2 and name="UNKNOWN", you may be seeing an issue I've observed but haven't diagnosed.

tcal-x avatar Oct 13 '20 16:10 tcal-x

Sorry, it was a borrowed USB stack, and not experienced enough in verilog to assist in debugging.

On Tue, 13 Oct 2020, 17:56 Other Tim, [email protected] wrote:

Maybe @rob-ng15 https://github.com/rob-ng15 has advice for debugging the hw/sw USB stack used by eforth?

Another thing you can try looking at: before programming, try running dfu-util -l a few times. Hopefully you'll always see

Found DFU: [1209:5bf0] ver=0101, devnum=12, cfg=1, intf=0, path="1-2.1", alt=0, name="Fomu PVT running DFU Bootloader v2.0.3", serial="UNKNOWN"

If you sometimes see Failed to retrieve string descriptor 2 and name="UNKNOWN", you may be seeing an issue I've observed but haven't diagnosed.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/im-tomu/fomu-workshop/issues/318#issuecomment-707877923, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN4SYT7RP2F6HYNNMDKUYHLSKSBEXANCNFSM4SEHWRRQ .

rob-ng15 avatar Oct 13 '20 17:10 rob-ng15

@arblake, can you connect after loading the micropython executable? It also has a TTY USB interface, although it has some limitations (see issue #92 ).

tcal-x avatar Oct 14 '20 04:10 tcal-x

loaded micropython: Copying data from PC to DFU device Download [=========================] 100% 136164 bytes Download done. state(7) = dfuMANIFEST, status(0) = No error condition is present state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present Resetting USB to switch back to runtime mode Done! Unable to connect to tty interface ... no ttyACM0 or similar

arblake avatar Oct 14 '20 05:10 arblake

Interesting, I don't get the line Resetting USB to switch back to runtime mode.

tcal-x avatar Oct 14 '20 05:10 tcal-x

Ok, a few more questions:

  • Which OS are you using?
  • Which foboot version are you using (use dfu-util -l to see)?
  • Did you have to do the udev stuff ? This might or might not be necessary.

tcal-x avatar Oct 14 '20 05:10 tcal-x

Ubuntu , latest foboot v2.0.2 udev stuff done

arblake avatar Oct 14 '20 05:10 arblake

upgraded to foboot v2.0.3 I cannot remove the device and restart micropython. I needs to be reloaded

arblake avatar Oct 14 '20 06:10 arblake

If I use Rob's j1eforth, gtkterm needs to be started before loading software and I cannot stop gtkterm then restart and expect it to communicate with j1eforth

arblake avatar Oct 14 '20 06:10 arblake

I'm guessing the problem with j1eforth is due to it not meeting timing: https://github.com/rob-ng15/Silice-Playground/issues/8 -- when a design doesn't meet timing, it tends to fail in mysterious ways such as you're seeing. If you try a different Fomu it could work, but since it's running it way outside of spec, it's not guaranteed to work.

For the micropython issue, this sounds like it's as-designed. With Fomu, it runs the bootloader every time you plug it in. To run a program, you either need to load it using dfu-util -D [file.dfu], or start the program that's already loaded with dfu-util -e

xobs avatar Oct 15 '20 03:10 xobs

I have redesigned and rebuilt j1eforth for the FOMU and have it up and running on my HACKER board. I have built the bitstream for PVT, but I am unable to test.

rob-ng15 avatar Aug 30 '21 15:08 rob-ng15

@rob-ng15 maybe you can update or recreate #310?

umarcor avatar Aug 30 '21 15:08 umarcor

I'm sticking with Silice version at the moment, as that I understand!

rob-ng15 avatar Aug 30 '21 15:08 rob-ng15

My bad! :wink:

umarcor avatar Aug 30 '21 15:08 umarcor