News:

Attention: For security reasons,please choose a user name *different* from your login name.
Also make sure to choose a secure password and change it regularly.

Main Menu

TE0726-03 flashing issues

Started by Andrei, September 11, 2020, 08:20:40 PM

Previous topic - Next topic

Andrei

Hello, I am having troubles with flashing my TE0726-03 board in Vivado 2019.2

At first I was able to flash and run demo1. It worked perfectly.
But then I built my own BIN file with petalinux tools. Used this command:
   petalinux-package --boot --fsbl images/linux/zynq_fsbl.elf --fpga images/linux/system.bit --u-boot
I successfully programmed BIN to the flash with
   TE::pr_program_flash -swapp <my-app>
The board boots up normaly. But now when I try to program the flash with any prebuilt BIN files it complains:
Start Flash Programming
INFO: [Labtools 27-1434] Device xc7z010 (JTAG device index = 1) is programmed with a design that has no supported debug core(s) in it.
WARNING: [Labtoolstcl 44-653] Creating new cfgmem for device xc7z010_1 will delete cfgmem object cfgmem_4 currently associated with it.
INFO: [Labtools 27-1434] Device xc7z010 (JTAG device index = 1) is programmed with a design that has no supported debug core(s) in it.
WARNING: [Xicom 50-100] The current boot mode is QSPI.
If flash programming fails, configure device for JTAG boot mode and try again.
Problem in running uboot
Flash programming initialization failed.
ERROR: [Labtools 27-3161] Flash Programming Unsuccessful
ERROR: [TE_PR-108] Script (TE::VLAB::hw_program_flash) failed: ERROR: [Common 17-39] 'program_hw_cfgmem' failed due to earlier errors.
.
ERROR: (TE_PR-108) Script (TE::VLAB::hw_program_flash) failed: ERROR: [Common 17-39] 'program_hw_cfgmem' failed due to earlier errors.
.


It looks like the board got stuck in non-programmable state.
Is there any way to flash the board now?

JH

Hi,

unfortunately there are new problems with the 19.2 variant with the QSPI Flash programming, see:
https://wiki.trenz-electronic.de/display/PD/TE0726+Test+Board#TE0726TestBoard-ReleaseNotesandKnowIssues


A more detailed description of what works with which Vivado version can be found here:
https://wiki.trenz-electronic.de/pages/viewpage.action?pageId=105689937

br
John

Andrei

Hi John,

Sorry, but I can't make sense of these solutions:
Case 2: flash contains bootable design
Problem 1:  Vivado starts design from QSPI Flash before selected FSBL will be programmed. This seems to prevent Vivado from starting the selected FSBL correctly, which leads to inconsistencies and terminates the programming
Solution 1: use the same FSBL which was used on the design which was programmed
Solution 2: change boot mode some other a mode which does not boot any design and use special FSBL
Possible Problem 2: running OS zynq can prevent vivado to get access to QSPI
Solution 1: Stop booting for example on uboot console and try again
Solution 2: change boot mode some other a mode which does not boot any design


Looks like you need to change FSBL code to change boot mode. But even If I do that, I will not be able to flash it, because flashing doesn't work for me.
Maybe there is a way to flash fsbl separately without using regular TE script:
TE::pr_program_flash -swapp <my-app>
Maybe I am missing something ?




JH

Hi,
this page mean you should program manually.
Scripts use solution 1 (this was working fine until 18.3): We provide 2 FSBL binaries, one which is used in the boot.bin an one for  QSPI programming.

For manual programming use following user guides(UG908  and UG940), see also:
https://wiki.trenz-electronic.de/display/PD/Xilinx+Development+Tools#XilinxDevelopmentTools-XilinxSoftwareProgrammingandDebugging

In vivado you must setup correct flash name, there is a list with correct names in the ./board_files/TE0726_board_files.csv of the reference design. Inside your Boot.bin do always the default FSBL. On device  programming part you must select FSBL again, in this case ise def. FSBL, in case the flash is not empty or the fsbl_flash in case the the flash is empty.


You can also install older Vivado lab tools Version to program flash manually. In this case fsbl_flash  works in both cases
br
John


Andrei

#4
Hi John,

Thanks for the valuable tips.
I am still struggling to find how to select proper FSBL binary during manual programming. I looked through UG908, UG940, unfortunately  didn't find the answer there.
Is my assumption right that there should be a dialog window somewhere in Vivado 2019 that allows me to select fsbl.elf or fsbl_flash.elf (which are located in prebuilt/software/m_512MB) ?
I did find a place where a type of flash is specified and it matches to the board file  ./board_files/TE0726_board_files.csv you mentioned. (Picture is attached)

I was able to recover my board using Vivado 2018.2, thank you for the tip
what I did was:
- installed vivado 2018.2,
- downloaded one of the TRENZ demos for vivado 2018
- copied working 2019.2 BOOT.BIN to <2018.2_demo>/prebuilt/boot_images/m/my-boot
- in Vivado 2018.2 flashed the board with
  TE::pr_program_flash_binfile -swapp my-boot

Andrei

It seems I have found what my problem was and how to solve it.
The problem was at the stage of generating BIN file:
petalinux-package --boot --fsbl images/linux/zynq_fsbl.elf --fpga images/linux/system.bit --u-boot
I used images/linux/zynq_fsbl.elf provided by Xilinx with Petalinux.
And it was wrong, as John pointed out.
After I started using fsbl.elf provided by Trenz (located in demo1/prebuilt/software/m_512MB) while generating BIN file, the problem was solved.
Now I can flash my BIN file in Vivado 2019.2 multiple times with no issues


JH

Hi Andrei,
this works on 19.2 only as long as the used FSBL is nearly the same like this one which is programmed into the Flash. So when you modify to much on FSBL, it can make trouble again. In this case erase or program one time with the older Vivado version (Xilinx offer also Programmer part only which is much smaller than full vivado installation --> check Vivado LabTools). for 19.x and older it's separately available on Xilinx download. Since 2020.x it's selectable in the Vivado/Vitis installation menue.
br
John