Impossible to flash qf_bootloader.bin

Post Reply
SilverHawk
Posts: 2
Joined: Thu Mar 11, 2021 5:20 pm

Hi,

As my green led was not breathing I followed the step of this video to "unbrick" my board.
https://www.youtube.com/watch?v=Q5GIZUsXb3I

Once the qf_loadflash.bin is being run my green led is breathing but once I disconnect the J-link, remove the jumpers J1 and J7 and unplug then plug the board, when I press the usr button while the blue led is flashing my green Led is not breathing (it just stays green) as if the board is still bricked. And I can't flash any .bin in the board while it this state.

Therefore I tried to follow this tutorial :
viewtopic.php?f=4&t=29

So i tried to flash the bootloader with the jumpers and the J-link still connected and the green led breathing but I got the same result.

Here is what I get when I try to flash the bootloader, it just stays like that forever :

qfprog --port /dev/ttyACM0 --bootloader qf_bootloader.bin --mode m4
CLI mode
ports = ['/dev/ttyACM0 (QuickFeather)'] 1
Using port /dev/ttyACM0 (QuickFeather)
Programming bootloader with qf_bootloader.bin
Erasing designated flash pages
Erase 32.0 KiB ( 0x52 ) at 0x0


I'm not sure of what I'm doing wrong so if anyone have a clue please let me know.

Best regards
Last edited by SilverHawk on Tue Mar 16, 2021 11:14 am, edited 1 time in total.
coolbreeze413
Posts: 3
Joined: Tue Feb 16, 2021 5:13 pm

If I understood your problem correctly, it is that no matter whether you are running qf_loadflash (via the J-Link) or whether the qf_bootloader is running (boot from flash) - you are not able to get the board to flash anything, and it gets stuck at the "erasing flash" stage itself.

We have also seen this issue a couple of times with certain OS+PC Hardware combination, but were not definitively able to get to the root cause of it, but is has something to do with the Host side drivers or configuration.
On a couple of machines running Ubuntu 18.04, an upgrade to 20.04 solved the problem, and on others, it persisted even with an upgrade.

Could you please let us know what OS version you are using?

There is a possibility that the modem manager is interfering with the process, if so the steps below to add udev rules should fix it (assuming Debian/Ubuntu flavors)

Code: Select all

sudo cp 71-QuickFeather.rules /etc/udev/rules.d
sudo udevadm control --reload-rules
sudo systemctl restart ModemManager.service
The rules file is here: https://github.com/QuickLogic-Corp/Tiny ... ther.rules

You may want to restart the machine once it is done, in some cases.

If this doesn't work for you as well, we can look at the usb logs and try to figure out the issue further.

Another option is switch to the EOSS3 UART based flashing (as opposed to the regular USBSERIAL) - where you would use the EOSS3 UART pins and a USB-UART converter connected to them and to the PC, rather than the Quickfeather microUSB.

- From J-Link, run the qf_loadflash_uart (instead of the qf_loadflash)
- Flash the qf_bootloader_uart binary with --bootloader (instead of the qf_bootloader), use the USB-UART port(/dev/ttyUSBx) with the programmer not the Quickfeather USB (/dev/ttyACMx) to flash

Now, once the board is reset and run with boot from flash, you should be able to enter flashing mode, and can flash any program using the USB-UART.
SilverHawk
Posts: 2
Joined: Thu Mar 11, 2021 5:20 pm

Hi, thanks for your help.
I'm using Linux Mint 20.1 Ulyssa, I managed to make it work after adding the udev rule and using the --mfgpkg option with TinyFPGA-Programmer while using the USBSERIAL communication, so it's work perfectly now.
coolbreeze413
Posts: 3
Joined: Tue Feb 16, 2021 5:13 pm

Thanks for the update, glad to hear that the the udev rules solved the problem.
Post Reply