QuickLogic-Corp / TinyFPGA-Programmer-Application

Desktop application for programming TinyFPGA boards and now QuickFeather
GNU General Public License v3.0
7 stars 3 forks source link

unable to flash under debian 10 Host #10

Open mhanuel26 opened 3 years ago

mhanuel26 commented 3 years ago

Hi, I am unable to Flash under debian 10 host, I have tried the instruction for python 3.7.3 and 3.9.1 with same result. The board can be flashed as I have done it on my Windows 10 PC.

The output is getting stuck on the below step

CLI mode
ports =  ['/dev/ttyACM0 (QuickFeather)'] 1
Using port  /dev/ttyACM0 (QuickFeather)

After long time the next shows up

Programming m4 application with  quickfeather-simple-stream-data-collection.bin
Erasing designated flash pages
Erase  32.0 KiB ( 0x52 ) at  0x80000

The command I am using to Flash is

python tinyfpga-programmer-gui.py --port=/dev/ttyACM0 --m4 quickfeather-simple-stream-data-collection.bin --mode m4

My device looks correctly mounted, before trying to Flash I verified the default formware from factory and I was able to toggle LED and see the diag command line on my debian Host.

I have verified the output of lsusb to be

~/development/QuickLogic/TinyFPGA-Programmer-Application$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 021: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP2102/CP2109 UART Bridge Controller [CP210x family]
Bus 001 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 022: ID 1d50:6140 OpenMoko, Inc. 
Bus 001 Device 005: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
Bus 001 Device 004: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
Bus 001 Device 003: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Would you please let me know how this can be further debugged.

Thanks,

jublin commented 3 years ago

This looks like it could be related to https://github.com/QuickLogic-Corp/qorc-sdk/issues/91 (knowing Deb10 and Ubuntu18.04 are different).

When you hit this, have you tried canceling the run (Ctrl+C) and re-starting? The worst case you will hit is the previous M4 application will not run until you can update (which you are trying to do anyway).

kishangondaliya commented 3 years ago

@mhanuel26 I'm also facing same issue with Ubuntu 18. Are you able to solve it?

@jublin I tried cancelling it and starting the process again but it's same behaviour.

Actually a bit different flashing I'm trying but that dosen't affect I think. Below is my log. I'm trying to flash my custom zephyr firmware onto m4.

(gpu) k$ qfprog --port /dev/ttyACM0 --mode --m4app build/zephyr/zephyr.bin CLI mode ports = ['/dev/ttyACM0 (QuickFeather)'] 1 Using port /dev/ttyACM0 (QuickFeather) Programming m4 application with build/zephyr/zephyr.bin Erasing designated flash pages Erase 4.0 KiB ( 0x20 ) at 0x80000

timsaxe commented 3 years ago

BTW, the QuickFeather programming software prints status messages during programming, so if you have a serial to USB adaptor and you connect it to the HW UART at 115,200 baud you should see it responding to the programming sequence (for instance in this case there should be some message about erasing 4KiB). Perhaps this will help track down the issue.

From: Kishan Gondaliya notifications@github.com Sent: Friday, January 22, 2021 9:18 AM To: QuickLogic-Corp/TinyFPGA-Programmer-Application TinyFPGA-Programmer-Application@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [QuickLogic-Corp/TinyFPGA-Programmer-Application] unable to flash under debian 10 Host (#10)

@mhanuel26https://github.com/mhanuel26 I'm also facing same issue. Are you able to solve it?

@jublinhttps://github.com/jublin I tried cancelling it and starting the process again but it's same behaviour.

Actually a bit different flashing I'm trying but that dosen't affect I think. Below is my log. I'm trying to flash my custom zephyr firmware onto m4.

(gpu) k$ qfprog --port /dev/ttyACM0 --mode --m4app build/zephyr/zephyr.bin CLI mode ports = ['/dev/ttyACM0 (QuickFeather)'] 1 Using port /dev/ttyACM0 (QuickFeather) Programming m4 application with build/zephyr/zephyr.bin Erasing designated flash pages Erase 4.0 KiB ( 0x20 ) at 0x80000

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/QuickLogic-Corp/TinyFPGA-Programmer-Application/issues/10#issuecomment-765564336, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AO4FHEKTDSGMFCDCUGMIEZ3S3GXNFANCNFSM4WC5BFMA.

coolbreeze413 commented 3 years ago

Please have a look at this: https://github.com/QuickLogic-Corp/qorc-sdk/issues/91#issuecomment-775338239

Hope it might be helpful to work around this kind of issue.

coolbreeze413 commented 3 years ago

@mhanuel26

It looks possibly like the modem manager is interfering with the usbserial driver, we may need to add udev rules to mitigate this: https://github.com/QuickLogic-Corp/TinyFPGA-Programmer-Application/blob/master/71-QuickFeather.rules

The instructions to add the rules are in the top of the file.

Could you try this on the Ubuntu/Debian sytems where flashing over the serial port does not work?