Author Topic: Newbie with Vivado and XMD Console questions please?  (Read 2297 times)

0 Members and 1 Guest are viewing this topic.

Offline Chris WilsonTopic starter

  • Super Contributor
  • ***
  • Posts: 1082
  • Country: gb
  • Race car engineer, dog lover, hoarder.
Newbie with Vivado and XMD Console questions please?
« on: June 09, 2022, 11:45:47 am »
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/fpga

Thanks, 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 PlutoSDR ;)

Thanks, 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.



« Last Edit: June 09, 2022, 01:21:13 pm by Chris Wilson »
Best regards,

                 Chris Wilson.
 

Online pcprogrammer

  • Super Contributor
  • ***
  • Posts: 3996
  • Country: nl
Re: Newbie with Vivado and XMD Console questions please?
« Reply #1 on: June 09, 2022, 01:51:53 pm »
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.

Offline Chris WilsonTopic starter

  • Super Contributor
  • ***
  • Posts: 1082
  • Country: gb
  • Race car engineer, dog lover, hoarder.
Re: Newbie with Vivado and XMD Console questions please?
« Reply #2 on: June 09, 2022, 02:31:36 pm »
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.
Best regards,

                 Chris Wilson.
 

Online pcprogrammer

  • Super Contributor
  • ***
  • Posts: 3996
  • Country: nl
Re: Newbie with Vivado and XMD Console questions please?
« Reply #3 on: June 09, 2022, 03:19:33 pm »
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: [Select]
## JTAG bootstrap u-boot for initial SF/SPI flash programming
## Open Xilinx Command Line Tool
## type: xmd -tcl run.tcl

#fpga -f system_top.bit

connect arm hw
stop
xreset 64

source ps7_init.tcl
ps7_init
ps7_post_config

dow u-boot.elf
run
disconnect 64

It 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.

Offline Chris WilsonTopic starter

  • Super Contributor
  • ***
  • Posts: 1082
  • Country: gb
  • Race car engineer, dog lover, hoarder.
Re: Newbie with Vivado and XMD Console questions please?
« Reply #4 on: June 09, 2022, 03:52:10 pm »
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 :)
« Last Edit: June 09, 2022, 03:55:36 pm by Chris Wilson »
Best regards,

                 Chris Wilson.
 

Online pcprogrammer

  • Super Contributor
  • ***
  • Posts: 3996
  • Country: nl
Re: Newbie with Vivado and XMD Console questions please?
« Reply #5 on: June 09, 2022, 04:27:43 pm »
Hi Chris,

I noticed I used XDM instead of XMD :palm: Did 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-Mode for 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: [Select]
xsct run.tcl

Edit: 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
« Last Edit: June 09, 2022, 04:32:45 pm by pcprogrammer »
 

Offline Chris WilsonTopic starter

  • Super Contributor
  • ***
  • Posts: 1082
  • Country: gb
  • Race car engineer, dog lover, hoarder.
Re: Newbie with Vivado and XMD Console questions please?
« Reply #6 on: June 11, 2022, 09:48:48 am »
Thanks for the help so far :)

I have come back to this after getting a headache and getting nowhere in the week ;)

I 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.1

xsdb% connect -host localhost -port 3121 tcfchan#0
::tcfchan#0
xsdb% targets
  1  xc7z010
  2  APU
     3  ARM Cortex-A9 MPCore #0 (Stopped: Suspended)
     4  ARM Cortex-A9 MPCore #1 (Running)
xsdb% target 1
xsdb% targets
  1* xc7z010
  2  APU
     3  ARM Cortex-A9 MPCore #0 (Stopped: Suspended)
     4  ARM Cortex-A9 MPCore #1 (Running)
xsdb% cd C:/workspace
xsdb% dir
 Volume in drive C has no label.
 Volume Serial Number is D080-C2AD

 Directory of C:\workspace

11/06/2022  09:50    <DIR>          .
11/06/2022  09:50    <DIR>          ..
10/06/2022  10:31    <DIR>          .metadata
20/08/2021  13:12            31,486 ps7_init.tcl
10/06/2022  12:28    <DIR>          RemoteSystemsTempFiles
03/03/2017  08:56               257 run.tcl
11/06/2022  10:11               567 SDK.log
20/08/2021  13:12           964,144 system_top.bit
20/08/2021  13:13           448,084 u-boot.elf
               5 File(s)      1,444,538 bytes
               4 Dir(s)  422,109,966,336 bytes free
xsdb% xmd source -tcl run.tcl

****** Xilinx Microprocessor Debugger (XMD) EngineExecuting user script : run.tcl

JTAG chain configuration
--------------------------------------------------
Device   ID Code        IR Length    Part Name
 1       4ba00477           4        arm_dap
 2       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.............................0x00000003
User ID.............................0x00000000
No of PC Breakpoints................6
No of Addr/Data Watchpoints.........4

Connected to "arm" target. id = 64
Starting GDB server for "arm" target (id = 64) at TCP port no 1234
Processor stopped

Error Executing User Script : run.tcl
Error :: 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%
Best regards,

                 Chris Wilson.
 

Online pcprogrammer

  • Super Contributor
  • ***
  • Posts: 3996
  • Country: nl
Re: Newbie with Vivado and XMD Console questions please?
« Reply #7 on: June 11, 2022, 10:47:00 am »
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 downloading

What 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.

Offline jemp

  • Contributor
  • Posts: 32
  • Country: be
Re: Newbie with Vivado and XMD Console questions please?
« Reply #8 on: June 18, 2024, 04:59:52 pm »
Hi Chris
did you manage to get it done ?
I have a broken Pluto here and a Xilinx Jtag programmer
Nay step by step guide to unbrick ?
Did you find the right software for it ?

Tnx for help

JP, Sint-Niklaas, Belgium
 

Offline Chris WilsonTopic starter

  • Super Contributor
  • ***
  • Posts: 1082
  • Country: gb
  • Race car engineer, dog lover, hoarder.
Re: Newbie with Vivado and XMD Console questions please?
« Reply #9 on: June 19, 2024, 10:24:34 am »
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#post25466

Somewhere on the Analog Devices site is a basic set of instructions on using JTAG. VERY basic...But should help.
Best regards,

                 Chris Wilson.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf