UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Adventurer
Adventurer
564 Views
Registered: ‎03-03-2014

JTAG Speed for petalinux-boot --jtag

Jump to solution

Hi all,

I'm looking for a way to know and change the JTAG speed used when launching the command petalinux-boot --jtag --kernel.

Any help on this ?

Thanks.

Stéphane.

0 Kudos
1 Solution

Accepted Solutions
Adventurer
Adventurer
512 Views
Registered: ‎03-03-2014

Re: JTAG Speed for petalinux-boot --jtag

Jump to solution

Hi,

OK, I thing I found some clues about this.

Open a terminal and switch to xsdb.

 

$ xsdb
rlwrap: warning: your $TERM is 'xterm-256color' but rlwrap couldn't find it in the terminfo database. Expect some problems.
                                                                                                                                             
****** Xilinx System Debugger (XSDB) v2018.3
  **** Build date : Nov 15 2018-19:36:05
    ** Copyright 1986-2018 Xilinx, Inc. All Rights Reserved.

xsdb%                                           

 

 

Then connect to the JTAG Hw Server.

 

xsdb% connect                                                                                                                                
attempting to launch hw_server                                                                                                               
                                                                                                                                             
****** Xilinx hw_server v2018.3
  **** Build date : Nov 15 2018-19:35:59
    ** Copyright 1986-2018 Xilinx, Inc. All Rights Reserved.

INFO: hw_server application started
INFO: Use Ctrl-C to exit hw_server application

INFO: To connect to this hw_server instance use url: TCP:127.0.0.1:3121

tcfchan#0
xsdb%  

 

 

Now can have access to JTAG stuffs. To get some help on commands type 'help'

 

xsdb% help                                                                                                                                   
Available Help Categories

breakpoints   - Target Breakpoints/Watchpoints.
connections   - Target Connection Management.
download      - Target Download FPGA/BINARY.
jtag          - JTAG Access.
memory        - Target Memory.
miscellaneous - Miscellaneous.
registers     - Target Registers.
reset         - Target Reset.
running       - Program Execution.
streams       - Jtag UART.
svf           - SVF Operations.
tfile         - Target File System.

Type "help" followed by above "category" for more details or
help" followed by the keyword "commands" to list all the commands

xsdb%    

 

 

For specific help, request specific help, for example about JTAG

 

xsdb% help jtag                                                                                                                              
Category commands

jtag claim             - Claim JTAG device.
jtag device_properties - Get/set device properties.
jtag disclaim          - Disclaim JTAG device.
jtag frequency         - Get/set JTAG frequency.
jtag lock              - Lock JTAG scan chain.
jtag sequence          - Create JTAG sequence object.
jtag servers           - List, open or close JTAG servers.
jtag skew              - Get/set JTAG skew.
jtag targets           - List JTAG targets or switch between JTAG targets.
jtag unlock            - Unlock JTAG scan chain.

Type "help" followed by above "command", or the above "command" followed by
"-help" for more details

xsdb%  

 

 

Ok, to see see what is the current JTAG speed setting, first you have to select te JTAG device.

xsdb% jtag targets                                                                                                                           
  1  Avnet MiniZed V1 1234-oj1A                                                                                                              
     2  arm_dap (idcode 4ba00477 irlen 4)
     3  xc7z007s (idcode 13723093 irlen 6 fpga)
xsdb%  

Then connect to it.

xsdb% jtag targets 1 

Now get the JTAG speed setting.

xsdb% jtag frequency                                                                                                                         
15000000                                                                                                                                     
xsdb%  

Now we want to change it, but first let's see wat are the available values.

xsdb% jtag frequency -list                                                                                                                   
125000 250000 500000 1000000 2000000 3000000 3750000 5000000 6000000 7500000 10000000 15000000 30000000                                      
xsdb%

Let's see if we can change this. To see the effects let's try the smalest value

xsdb% jtag frequency 125000                                                                                                                  
125000                                                                                                                                       
xsdb% jtag frequency                                                                                                                         
125000
xsdb%

If I try to download the Kernel image with various JTAG speeds we get the expected transfert time. My kernel image is 10MB.

125000 => 24'26

1000000 => 7'46

15000000 => 4'58

30000000 => 4'58

So as a conclusion, it is possible to change the JTAG speed, but it seems that the tool chooses the maximum speed !

And the speeds above the maximum speed allowed can not be used. Probably because of transmission error detection.

 

ok I got my answer !

Thanks.

Stéphane.

 

View solution in original post

0 Kudos
3 Replies
Moderator
Moderator
537 Views
Registered: ‎10-06-2016

Re: JTAG Speed for petalinux-boot --jtag

Jump to solution

Hi @adeneo_sju 

In theory you can use --before-connect and --after-connect options described in the UG1157.

i.e.

/home/ibaie/Workspace/BSP/2018.3/petalinux-zcu102 $ petalinux-boot --jtag --after-connect "jtag targets 1" --after-connect "jtag frequency 20000000" --prebuilt 1

I just tested on my side and looks to be broken as I don't see the extra commands be added in the XSDB script. I reported internally to development but you can I only tested on 2018.3 release so it might be working on previous ones.

Regards


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
Highlighted
Adventurer
Adventurer
515 Views
Registered: ‎03-03-2014

Re: JTAG Speed for petalinux-boot --jtag

Jump to solution

Hi Ibaie,

Thank you for your answer.

I tried the following command line on 2018.3 :

petalinux-boot -v --jtag --after-connect "jtag targets 1" --after-connect "jtag frequency 20000" --kernel

It seems that the xsdb script generated is corrupted :

rst -processor; after 2000
puts stderr "INFO: Loading image: /home/mtvl/fpga/test_proj_petalinux/images/linux/system.dtb at 0x00008000"
dow -data "/home/mtvl/fpga/test_proj_petalinux/images/linux/system.dtb" 0x00008000
after 2000
rwr pc 0x00008000
rwr r2 0x08008000
con
after 5000after 5000
exit

because it gives the following error :

INFO: Loading image: /home/mtvl/fpga/test_proj_petalinux/images/linux/system.dtb at 0x08008000
100% 0MB 0.0MB/s 00:00
Successfully downloaded /home/mtvl/fpga/test_proj_petalinux/images/linux/system.dtb
INFO: Loading image: /home/mtvl/fpga/test_proj_petalinux/images/linux/system.dtb at 0x00008000
100% 0MB 0.0MB/s 00:00
Successfully downloaded /home/mtvl/fpga/test_proj_petalinux/images/linux/system.dtb
bad argument "5000after": must be cancel, idle, info, or an integer
while executing
"after 5000after 5000"
(file "/tmp/tmp.cxo28ZQZHY" line 30)

 

Anyway, I'll make some more tests with this later.

If someone has some clues on this !

Stéphane

 

0 Kudos
Adventurer
Adventurer
513 Views
Registered: ‎03-03-2014

Re: JTAG Speed for petalinux-boot --jtag

Jump to solution

Hi,

OK, I thing I found some clues about this.

Open a terminal and switch to xsdb.

 

$ xsdb
rlwrap: warning: your $TERM is 'xterm-256color' but rlwrap couldn't find it in the terminfo database. Expect some problems.
                                                                                                                                             
****** Xilinx System Debugger (XSDB) v2018.3
  **** Build date : Nov 15 2018-19:36:05
    ** Copyright 1986-2018 Xilinx, Inc. All Rights Reserved.

xsdb%                                           

 

 

Then connect to the JTAG Hw Server.

 

xsdb% connect                                                                                                                                
attempting to launch hw_server                                                                                                               
                                                                                                                                             
****** Xilinx hw_server v2018.3
  **** Build date : Nov 15 2018-19:35:59
    ** Copyright 1986-2018 Xilinx, Inc. All Rights Reserved.

INFO: hw_server application started
INFO: Use Ctrl-C to exit hw_server application

INFO: To connect to this hw_server instance use url: TCP:127.0.0.1:3121

tcfchan#0
xsdb%  

 

 

Now can have access to JTAG stuffs. To get some help on commands type 'help'

 

xsdb% help                                                                                                                                   
Available Help Categories

breakpoints   - Target Breakpoints/Watchpoints.
connections   - Target Connection Management.
download      - Target Download FPGA/BINARY.
jtag          - JTAG Access.
memory        - Target Memory.
miscellaneous - Miscellaneous.
registers     - Target Registers.
reset         - Target Reset.
running       - Program Execution.
streams       - Jtag UART.
svf           - SVF Operations.
tfile         - Target File System.

Type "help" followed by above "category" for more details or
help" followed by the keyword "commands" to list all the commands

xsdb%    

 

 

For specific help, request specific help, for example about JTAG

 

xsdb% help jtag                                                                                                                              
Category commands

jtag claim             - Claim JTAG device.
jtag device_properties - Get/set device properties.
jtag disclaim          - Disclaim JTAG device.
jtag frequency         - Get/set JTAG frequency.
jtag lock              - Lock JTAG scan chain.
jtag sequence          - Create JTAG sequence object.
jtag servers           - List, open or close JTAG servers.
jtag skew              - Get/set JTAG skew.
jtag targets           - List JTAG targets or switch between JTAG targets.
jtag unlock            - Unlock JTAG scan chain.

Type "help" followed by above "command", or the above "command" followed by
"-help" for more details

xsdb%  

 

 

Ok, to see see what is the current JTAG speed setting, first you have to select te JTAG device.

xsdb% jtag targets                                                                                                                           
  1  Avnet MiniZed V1 1234-oj1A                                                                                                              
     2  arm_dap (idcode 4ba00477 irlen 4)
     3  xc7z007s (idcode 13723093 irlen 6 fpga)
xsdb%  

Then connect to it.

xsdb% jtag targets 1 

Now get the JTAG speed setting.

xsdb% jtag frequency                                                                                                                         
15000000                                                                                                                                     
xsdb%  

Now we want to change it, but first let's see wat are the available values.

xsdb% jtag frequency -list                                                                                                                   
125000 250000 500000 1000000 2000000 3000000 3750000 5000000 6000000 7500000 10000000 15000000 30000000                                      
xsdb%

Let's see if we can change this. To see the effects let's try the smalest value

xsdb% jtag frequency 125000                                                                                                                  
125000                                                                                                                                       
xsdb% jtag frequency                                                                                                                         
125000
xsdb%

If I try to download the Kernel image with various JTAG speeds we get the expected transfert time. My kernel image is 10MB.

125000 => 24'26

1000000 => 7'46

15000000 => 4'58

30000000 => 4'58

So as a conclusion, it is possible to change the JTAG speed, but it seems that the tool chooses the maximum speed !

And the speeds above the maximum speed allowed can not be used. Probably because of transmission error detection.

 

ok I got my answer !

Thanks.

Stéphane.

 

View solution in original post

0 Kudos