Newbie with Vivado and XMD Console questions please? - Page 1
Forum section: electronics / general

author: Chris Wilson
author_rank: Super Contributor
timestamp: June 09, 2022, 11:45:47 am
content: I have bricked my Analog Devices Pluto SDR and AD have told me, in very brief terms, how to unbrick it. They have supplied a run.tcl file and told me I need to run it from an XMD console in Vivado. I initially downloaded the current version, but once I launched the .exe it unpacked then plain disappeared. It seems a not uncommon problem, and it's defeated me. OS in Win 10 64 bit Pro. I also think that only earlier versions have the XMD console.So I downloaded the "Lab" version 2014.1 which should have the XMD console I believe, based on age? It also has a conventional installer.I can launch and run it, and it sees my Pluto using a JTAG lead and adapter board. But I have been unable to find, let alone launch an XMD console and AD tell me the run.tcl file needs to be in an XMD console, hence some errors on trying to run it from the GUI.I am again downloading another big file from Xilinx, the 2014.1 Xilinx Vivado SDK. I have also got what I hope is the right temporary 30 day licence for it.Is this what I need and will it run an XMD console please?These are the instructions AD linked to:https://wiki.analog.com/university/tools/pluto/devs/fpgaThanks, needless to say I am way out of my comfort zone here, I don't want or need to become a Vivado expert, I just want tu unbrick my PlutoSDRThanks, treat me like an idiot please!EDIT, I have had a look at the SDK options for installation, what if any are needed to run the console and unbrick my Pluto please, see attachment screenshot of options panel.

author: pcprogrammer
author_rank: Super Contributor
timestamp: June 09, 2022, 01:51:53 pm
content: Hi Chris,I'm not familiar with Vivado and XDM, so can't help there, but you write about a .tcl script you need to run. For what I know of it such a script contains commands that the suite needs to perform, and maybe someone can tell you what to do if they see the contents of the script.So either attach it to, or put the content in a # code block in a new post.It may well be possible to execute the actions one by one in the GUI to get it done.

author: Chris Wilson
author_rank: Super Contributor
timestamp: June 09, 2022, 02:31:36 pm
content: Thanks for your reply, the zip file for bootstrapping the device contains more than just the .tcl script, but I have not seen any instruction to run the other file, but I'll attach the lot. This is a dedicated zip from AD with the purpose of resurrecting a bricked Pluto.

author: pcprogrammer
author_rank: Super Contributor
timestamp: June 09, 2022, 03:19:33 pm
content: Hi Chris,I looked at the files in the zip and it holds the bitstream for the FPGA part of the I guess ZYNQxx device in your SDR. This is the system_top.bit file and is most likely loaded into a FLASH chip on the board. Then there is an u-boot.elf file which holds the boot loader for loading I guess Linux. It also needs to be loaded to some FLASH either inside or outside the FPGA.Then there are two scripts and the first one is run.tcl which also loads the other script ps7_init.tcl. And I think it is this second script that needs the XDM command line interface to do the job.The run.tcl script is not that complex.Code:## JTAG bootstrap u-boot for initial SF/SPI flash programming## Open Xilinx Command Line Tool## type: xmd -tcl run.tcl#fpga -f system_top.bitconnect arm hwstopxreset 64source ps7_init.tclps7_initps7_post_configdow u-boot.elfrundisconnect 64It stops and resets the processors, runs the other script and then loads and starts the u-boot.elf code. Leaves the question where the Linux kernel and the rest of the OS are stored that need to be loaded.Maybe another user here knows more about how to get the ZYNQ up and running with these files.

author: Chris Wilson
author_rank: Super Contributor
timestamp: June 09, 2022, 03:52:10 pm
content: OK, thanks again, pure guesswork here, but I THINK that once this "stuff" is loaded I need to set it in dfu mode, open something like PUTTY and then load the "other stuff" as it should then be receptive to "other stuff". (Technical terms TM)I really need to know what Xilinx apps need loading in order to get to an XMD console, to me it's very daunting, badly documented and mainly guesswork at the moment. I also need to know if I need to put ALL the files in the zip somewhere, and just where somewhere is...?I'm a glorified mechanic by trade <LOL> All the best pcprogrammer

author: pcprogrammer
author_rank: Super Contributor
timestamp: June 09, 2022, 04:27:43 pm
content: Hi Chris,I noticed I used XDM instead of XMDDid a quick search on google for it and read that XMD is superseded by XSCT, so there is a good chance that with the install of Vivado you did, the XSCT command line tool is installed too. If so try to run the script with that tool.See:https://docs.xilinx.com/r/en-US/ug1400-vitis-embedded/Running-an-Application-in-Non-Interactive-Modefor more information.I think the way to go is to create a directory where you unzip the archive, and then open a terminal or console window and run the script with:Code:xsct run.tclEdit: Make sure you run the command from within the directory you unzipped the files in. So change the path before typing the xsct command.Then follow the Pluto unbrick wiki

author: Chris Wilson
author_rank: Super Contributor
timestamp: June 11, 2022, 09:48:48 am
content: Thanks for the help so farI have come back to this after getting a headache and getting nowhere in the weekI seem close, but no cigars... I *THINK* it's trying to programme the wrong device or in the wrong order, but what do I know?I am finding on Google others have issues with forcing a target, but maybe I am way off course. Below I copy past the results of trying to run the run.tcl file AD supply in a zip with other files. I set the Xilinx workspace to C:/workspace and unzipped the supplied files in there, and before trying to run the run.tcl I ensured I was in the workspace directory. Does this give a clues as to what's gone wrong please? Even when the none running core is running the same happens. To get it running I have to power down the PlutoSDR and power it up again.****** Xilinx System Debugger (XSDB) v2014.1**** Build date : Apr 4 2014-14:07:09** Copyright 1986-2014 Xilinx, Inc. All Rights Reserved.Got $XILINX_SDK: C:/XilinxSDK/SDK/2014.1xsdb% connect -host localhost -port 3121 tcfchan#0::tcfchan#0xsdb% targets1 xc7z0102 APU3 ARM Cortex-A9 MPCore #0 (Stopped: Suspended)4 ARM Cortex-A9 MPCore #1 (Running)xsdb% target 1xsdb% targets1* xc7z0102 APU3 ARM Cortex-A9 MPCore #0 (Stopped: Suspended)4 ARM Cortex-A9 MPCore #1 (Running)xsdb% cd C:/workspacexsdb% dirVolume in drive C has no label.Volume Serial Number is D080-C2ADDirectory of C:\workspace11/06/2022 09:50 <DIR> .11/06/2022 09:50 <DIR> ..10/06/2022 10:31 <DIR> .metadata20/08/2021 13:12 31,486 ps7_init.tcl10/06/2022 12:28 <DIR> RemoteSystemsTempFiles03/03/2017 08:56 257 run.tcl11/06/2022 10:11 567 SDK.log20/08/2021 13:12 964,144 system_top.bit20/08/2021 13:13 448,084 u-boot.elf5 File(s) 1,444,538 bytes4 Dir(s) 422,109,966,336 bytes freexsdb% xmd source -tcl run.tcl****** Xilinx Microprocessor Debugger (XMD) EngineExecuting user script : run.tclJTAG chain configuration--------------------------------------------------Device ID Code IR Length Part Name1 4ba00477 4 arm_dap2 13722093 6 xc7z010--------------------------------------------------Enabling extended memory access checks for Zynq.Writes to reserved memory are not permitted and reads return 0.To disable this feature, run "debugconfig -memory_access_check disable".--------------------------------------------------CortexA9 Processor Configuration-------------------------------------Version.............................0x00000003User ID.............................0x00000000No of PC Breakpoints................6No of Addr/Data Watchpoints.........4Connected to "arm" target. id = 64Starting GDB server for "arm" target (id = 64) at TCP port no 1234Processor stoppedError Executing User Script : run.tclError :: ERROR: No Elf file associated with target****** XMD v2014.1 (64-bit)**** SW Build 881834 on Fri Apr 4 14:06:19 MDT 2014** Copyright 1986-2014 Xilinx, Inc. All Rights Reserved.xsdb%

author: pcprogrammer
author_rank: Super Contributor
timestamp: June 11, 2022, 10:47:00 am
content: Hi Chris,I don't have experience with Zynq devices, but looking at the output there is some mention of writes to reserved memory not permitted. Did you try the suggested run "debugconfig -memory_access_check disable".It seems to be able to communicate with the debug part of the CPU, but what I don't understand is the "ERROR: No Elf file associated with target" because in the script it refers to the "u-boot.elf" file for downloadingWhat comes to mind is that maybe the commands have changed that can be used in the .tcl scripts. Though the dow command seems to be still there.Maybe another forum member knows more about this.

author: jemp
author_rank: Contributor
timestamp: June 18, 2024, 04:59:52 pm
content: Hi Chrisdid you manage to get it done ?I have a broken Pluto here and a Xilinx Jtag programmerNay step by step guide to unbrick ?Did you find the right software for it ?Tnx for helpJP, Sint-Niklaas, Belgium

author: Chris Wilson
author_rank: Super Contributor
timestamp: June 19, 2024, 10:24:34 am
content: Apart from in this thread all I have and have learned is here:https://forum.amsat-dl.org/index.php?thread/4118-help-sought-with-jtag-stuff-to-unbrick-my-pluto-please/&postID=25463#post25466Somewhere on the Analog Devices site is a basic set of instructions on using JTAG. VERY basic...But should help.