Xilinx Software Command Line Tools (XSCT): Reference Guide (UG1208) Ug1208 Xsct

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 83

XilinxSoftware
Command-LineTool
(XSCT)
ReferenceGuide
UG1208(v2016.2)June8,2016
RevisionHistory
Thefollowingtableshowstherevisionhistoryforthisdocument.
DateVersionRevision
June08,20162016.2Initialpublicrelease
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com2
UG1208(v2016.2)June8,2016
TableofContents
RevisionHistory.............................................................................................................2
TableofContents...........................................................................................................3
Chapter1:XilinxSoftwareCommand-LineTool(XSCT)............................5
SystemRequirements....................................................................................................6
Chapter2:InstallingandLaunchingXSCT................................................7
InstallingandLaunchingXSCTonWindows.....................................................................7
InstallingandLaunchingXSCTonLinux...........................................................................8
Chapter3:XSCTCommands....................................................................10
TargetConnectionManagement.....................................................................................10
TargetRegisters.............................................................................................................14
ProgramExecution.........................................................................................................15
TargetMemory..............................................................................................................23
TargetDownloadFPGA/BINARY.....................................................................................29
TargetReset...................................................................................................................31
TargetBreakpoints/Watchpoints....................................................................................32
JTAGUART.....................................................................................................................37
Miscellaneous................................................................................................................38
JTAGAccess...................................................................................................................44
SDKProjects..................................................................................................................51
HSICommands..............................................................................................................70
Chapter4:WorkingwithXSCT................................................................72
RunningTclScripts.........................................................................................................72
CreatinganApplicationProjectUsinganApplicationTemplate.......................................73
ModifyingBSPSettings..................................................................................................73
ChangingCompilerOptionsofanApplicationProject......................................................74
AddingLibrariestoBSP..................................................................................................74
CreatingaBootableImageandProgramtheFlash..........................................................75
SwitchingBetweenXSCTandXilinxSDKDevelopmentEnvironment................................75
PerformingStandaloneApplicationDebug......................................................................75
RunninganApplicationinNon-InteractiveMode............................................................78
DebuggingaProgramAlreadyRunningontheTarget......................................................78
UsingJTAGUART............................................................................................................79
DebuggingApplicationsonZynqUltraScale+MPSoC.......................................................80
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com3
UG1208(v2016.2)June8,2016
AppendixA:AdditionalResourcesandLegalNotices..............................83
XilinxResources.............................................................................................................83
SolutionCenters............................................................................................................83
PleaseRead:ImportantLegalNotices.............................................................................83
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com4
UG1208(v2016.2)June8,2016
Chapter1
XilinxSoftwareCommand-LineTool(XSCT)
GraphicaldevelopmentenvironmentssuchastheXilinx®SoftwareDevelopmentKit(XilinxSDK)
areusefulforgettinguptospeedondevelopmentforanewprocessorarchitecture.Ithelps
toabstractawayandgroupmostofthecommonfunctionsintologicalwizardsthateventhe
novicecanuse.However,scriptabilityofatoolisalsoessentialforprovidingtheexibilityto
extendwhatisdonewiththattool.Itisparticularlyusefulwhendevelopingregressiontests
thatwillberunnightlyorrunningasetofcommandsthatareusedoftenbythedeveloper.
XilinxSoftwareCommand-lineTool(XSCT)isaninteractiveandscriptablecommand-line
interfacetoXilinxSoftwareDevelopmentKit(XilinxSDK).AswithotherXilinxtools,thescripting
languageforXSCTisbasedonToolsCommandLanguage(Tcl).YoucanrunXSCTcommands
interactivelyorscriptthecommandsforautomation.XSCTsupportsthefollowingactions:
CreateHardware,boardsupportpackages(BSPs),andApplicationprojects
Managerepositories
Settoolchainpreferences
CongureandbuildBSPs/Applications
Downloadandrunapplicationsonhardwaretargets
CreateandashbootimagesbyrunningBootgenandprogram_ashtools.
Thisreferenceguideisintendedtoprovideyouwiththeinformationyouneedtodevelop
scriptsforsoftwaredevelopmentanddebugtargetingtheXilinxfamilyofprocessors.
Asyoureadthedocumentyouwillnoticeusageofsomeabbreviationsforvariousproducts
producedbyXilinx.Forexample:
Useofps7inthesourcecodeimpliesthattheselesaretargetingtheZynq®-7000AP
SoCfamilyofproducts,andspecicallythedual-coreCortex®ARMA9processorsin
theSoC.
UseofpsuinthesourcecodeimpliesthatthiscodeistargetingaZynq®UltraScale+™
MPSoCdevice,whichcontainsaCortexQuad-coreARMA53,dual-coreARMR5,ARMMali
400GPU,andaplatformmanagementunit(PMU).
Hardwaredenition(HDF)lesareusedtotransfertheinformationaboutthehardware
systemthatincludesaprocessortotheXilinxSDK.Itincludesinformationaboutwhich
peripheralsareinstantiated,clocks,memoryinterfaces,andmemorymaps.
MicroprocessorSoftwareSpecication(MSS)lesareusedtostoreinformationabout
theBSP .TheycontainOSinformationfortheBSP ,softwaredriversassociatedwitheach
peripheralofthehardwaredesign,STDIOsettings,andcompileragslikeoptimizationand
debuginformationlevel.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com5
UG1208(v2016.2)June8,2016
Chapter1:XilinxSoftwareCommand-LineTool(XSCT)
SystemRequirements
IfyouplantousecapabilitiesthatareofferedthroughtheXilinxSoftwareCommand-Line
Tool(XSCT),thenyoualsoneedtomeetthehardwareandsoftwarerequirementsthatare
specictothatcapability.
ThefollowingtableliststhehardwareandsoftwarerequirementsforXSCT:
CPUSpeed2.2GHzminimumorhigher;
Hyper-threading(HHT)or
Multi-corerecommended.
ProcessorIntelPentium4,IntelCoreDuo,or
XeonProcessors;SSE2minimum
Memory/RAM2GBorhigher
HardwareRequirements
DisplayResolution1024×768orhigheratnormalsize
(96dpi)
WindowsWindows7SP1(64-bit)
Windows8.1(64-bit)
Windows10Pro(64-bit)
SupportedOperatingSystems
NOTE:32-bitmachinesupport
isnowonlyavailablethrough
LabToolsandHardwareServer
standaloneproductinstallers.
LinuxRedHatEnterpriseLinux:
6.6-6.7(64-bit)
7.0-7.1(64-bit)
CentOS:
6.7(64-bit)
7.1(64-bit)
SUSELinuxEnterprise:
11.4(64-bit)
12.0(64-bit)
UbantuLinux14.04.3LTS
(64-bit)
NOTE:Additionallibrary
installationrequired.
DiskSpaceBasedonthecomponentsselectedduringinstallation.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com6
UG1208(v2016.2)June8,2016
Chapter2
InstallingandLaunchingXSCT
TheXilinxSoftwareCommand-LineTool(XSCT)canbeinstalledbothasapartoftheXilinx
SDKinstallerandasaseparatecommand-linetoolonlyinstallation.XSCTisavailableforthe
followingplatforms:
MicrosoftWindows
Linux
Thefollowingsectionsexplaintheinstallationprocessforeachoftheseplatforms.
InstallingandLaunchingXSCTonWindows
XilinxSoftwareCommand-lineTool(XSCT)canbeinstalledusingtheWindowsexecutable
installer.TheinstallerexecutablebearsthenameXilinx_SDK_<version>_Win64.EXE,
where<version>indicatestheXilinxSoftwareDevelopmentKit(XilinxSDK)versionnumber.
NOTE:InstallingXSCTonMicrosoftWindowsoperatingsystemmightrequireadministrator
rights.Inaddition,yourprojectworkspaceneedstobesetupinanyfolderthatyoucan
fullyaccess.
1.ToinstallXSCT,double-clicktheWindowsinstallerexecutablele.
2.Theinstalleracceptsyourlogincredentialsandallowsyoutoselectspecictool
components.Theclientthenautomaticallydownloadsonlywhatyou’veselectedand
installsitonyourlocalmachine.
3.IntheSelectEditiontoInstallwindow,selecttheXilinxSoftwareCommand-LineTool
(XSCT)optiontoinstallXSCTasaseperatecommand-linetoolonly.Alternatively,you
canalsoselecttheXilinxSoftwareDevelopmentKit(XSDK)optiontoinstallXSCTasa
partoftheXilinxSDK,anEclipse-basedintegrateddevelopmentenvironment.
4.Unlessyouchooseotherwise,XSCTisinstalledintheC:\Xilinxdirectory.
5.TolaunchXSCTonWindows,selectStart>Programs>XilinxDesignTools>SDK
<version>andthenselectXilinxSoftwareCommandLineTool.WhereSDK<version>
indicatestheXilinxSoftwareDevelopmentKitversionnumber.
6.YoucanalsolaunchXSCTfromthecommandline.
cdC:\Xilinx\SDK\<version>\bin
xsct.bat
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com7
UG1208(v2016.2)June8,2016
Chapter2:InstallingandLaunchingXSCT
7.Toviewtheavailablecommand-lineoptions,issuethehelpcommandattheXSCT
commandprompt.
******XilinxSoftwareCommandlineTool(XSCT)
**Copyright1986-2016Xilinx,Inc.AllRightsReserved.
xsct%help
AvailableHelpCategories
connections-TargetConnectionManagement
registers-TargetRegisters
running-ProgramExecution
memory-TargetMemory
download-TargetDownloadFPGA/BINARY
reset-TargetReset
breakpoints-TargetBreakpoints/Watchpoints
streams-JtagUART
miscellaneous-Miscellaneous
jtag-JTAGAccess
sdk-SDKProjects
petalinux-Petalinuxcommands
hsi-HSIcommands
Type"help"followedbyabove"category"formoredetailsor
help"followedbythekeyword"commands"tolistallthecommands
xsct%
InstallingandLaunchingXSCTonLinux
XilinxSoftwareCommand-lineTool(XSCT)canbeinstalledusingthesmallself-extracting
webinstallexecutablebinarydistributionle.Theinstallerlebearsthename
Xilinx_SDK_<version>_Lin64.BIN,where<version>indicatestheXilinxSoftware
DevelopmentKit(XilinxSDK)versionnumber.
NOTE:TheprocedureforinstallingXSCTonLinuxdependsonwhichLinuxdistributionyou
areusing.Ensurethattheinstallationfolderhastheappropriatepermissions.Inaddition,your
projectworkspaceneedstobesetupinanyfolderthatyoucanfullyaccess.
1.ToinstallXSCT,launchtheterminalandchangethepermissionoftheself-extracting
binaryexecutable.
$chmod+xXilinx_SDK_<version>_Lin64.BIN
2.Starttheinstallationprocessorrunthe.BINle.
./Xilinx_SDK_<version>_Lin64.BIN
3.Theinstalleracceptsyourlogincredentialsandallowsyoutoselectspecictool
components.Theclientthenautomaticallydownloadsonlywhatyou’veselectedand
installsitonyourlocalmachine.
4.IntheSelectEditiontoInstallwindow,selecttheXilinxSoftwareCommand-LineTool
(XSCT)optiontoinstallXSCTasaseperatecommand-linetoolonly.Alternatively,you
canalsoselecttheXilinxSoftwareDevelopmentKit(XSDK)optiontoinstallXSCTasa
partoftheXilinxSDK,anEclipse-basedintegrateddevelopmentenvironment.
5.Unlessyouchooseotherwise,XSCTisinstalledinthe/opt/Xilinxdirectory.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com8
UG1208(v2016.2)June8,2016
Chapter2:InstallingandLaunchingXSCT
6.TolaunchXSCTonLinux,selectApplications>OtherandthenselectXilinxSoftware
CommandLineTool<version>.Where<version>istheversionnumberoftheXSCT.
7.YoucanalsolaunchXSCTfromthecommandline.
cd/opt/Xilinx/SDK/<version>/bin
./xsct
8.Toviewtheavailablecommand-lineoptions,issuethehelpcommandattheXSCT
commandprompt.
******XilinxSoftwareCommandlineTool(XSCT)
**Copyright1986-2016Xilinx,Inc.AllRightsReserved.
xsct%help
AvailableHelpCategories
connections-TargetConnectionManagement
registers-TargetRegisters
running-ProgramExecution
memory-TargetMemory
download-TargetDownloadFPGA/BINARY
reset-TargetReset
breakpoints-TargetBreakpoints/Watchpoints
streams-JtagUART
miscellaneous-Miscellaneous
jtag-JTAGAccess
sdk-SDKProjects
petalinux-Petalinuxcommands
hsi-HSIcommands
Type"help"followedbyabove"category"formoredetailsor
help"followedbythekeyword"commands"tolistallthecommands
xsct%
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com9
UG1208(v2016.2)June8,2016
Chapter3
XSCTCommands
TheXilinxSoftwareCommand-LinetoolallowsyoutocreatecompleteXilinxSDKworkspaces
usingthebatchmode,investigatethehardwareandsoftware,debugandruntheproject,
allfromthecommandline.
XSCTcommandsarebroadlyclassiedintothefollowingcategories.Commandsineach
categoryaredescribedsubsequently.
TargetConnectionManagement
TargetRegisters
ProgramExecution
TargetMemory
TargetDownloadFPGA/BINARY
TargetReset
TargetBreakpoints/Watchpoints
JTAGUART
Miscellaneous
JTAGAcccess
SDKProjects
HSICommands
TIP:
YoucanuseCtrl+Ctoterminatelongrunningcommandslikefpgaorelfdownloador
for/whileloops.
YoucanterminateXSCTbypressingCtrl+Ctwiceinsuccession.
Windowsstylepathsaresupportedwhenthepathisenclosedwithincurlybrackets{}.
TargetConnectionManagement
Usethesecommandstoconnecttoordisconnectfromhw_serverandlistorselectactivetargets.
Thefollowingisalistofconnectionscommands:
connect
disconnect
targets
gdbremoteconnect
gdbremotedisconnect
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com10
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
connect
Connecttohw_server.
NOTE:TheconnectcommandinXSDBdoesn’tconnecttoadebugtargetonthehardware.
Youmustusethetargetscommandtolisttheavailabletargetsandselectadebugtarget
beforeissuingcommandstothedebugtarget.
Ifnooptionsareusedwiththeconnectcommand,XSDBlauncheshw_serveratlocalhost:3121
andconnectstoit.TheconnectcommandreturnsthechannelIDoftheconnectionto
thehw_server.
Synopsis
connect[Options]
Options
OptionDescription
-host<hostname/ip>Name/IPaddressofthehostmachine.
-port<portnum>TCPportnumber
-url<url>URLdescriptionofhw_server
-listListopenconnections
-set<channel-id>Setactiveconnection
Returns
Dependsontheoptionsspecied:
<channel-id>ofthenewconnectionorerroriftheconnectionfails,when-port,
-host,-url,-newoptionsarespecied.
Listofopenchannelsornothingwhentherearenoopenchannels,whenthe-list
optionisspecied.
Nothingwhenthe-setoptionisspecied.
Example
Connecttohw_serveronhostlocalhostandport3121.
connect-hostlocalhost-port3121
ConnecttoTCFagentonhostlocalhostandport3121.
connect-urltcp:localhost:3121
disconnect
Disconnectfromhw_server.Aswiththeconnectcommand,disconnectdoesnotclosea
connectiontothedebugtarget,butwillclosetheconnectiontohw_server.
Synopsis
disconnect[Options]
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com11
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
Options
OptionDescription
disconnectDisconnectfromactivechannel.
disconnect<channel-id>Disconnectfromspeciedchannel.
targets
Listtargetsorswitchbetweentargets.
Synopsis
targets[Options]
targets<targetid>
Options
OptionDescription
-setSetcurrenttargettoentrysingleentryinlist.Thisis
usefulincomibinationwith-lteroption.Anerror
willbegenerateiflistisemptyorcontainsmore
thanoneentry.
-regexpUseregexpforltermatching.
-nocaseUsecaseinsensitiveltermatching.
-filter<filter-expression>Specifylterexpressiontocontrolwhichtargets
areincludedinlistbasedonitsproperties.Filter
expressionsaresimilartoTclexprsyntax.Target
propertiesarereferencesbyname,whileTclvariables
areaccessedusingthe$syntax,stringmustbe
quoted.Operators==,!=,<=,>=,<,>,&&and||
aresupportedaswellas().Thereoperatorsbehave
likeTclexproperators.Stringmatchingoperator=~
and!~matchlhsstringwithrhspatternusingeither
regexporstringmatch.
-target-propertiesReturnsaTcllistofdict’scontainingtargetproperties.
-index<index>Includetargetsbasedonjtagscanchain
position.Thisisidenticaltospecifying-lter
{jtag_device_index==<index>}.
Returns
Thereturnvaluedependsontheoptionsused.
<none>-Targetslistwhennooptionsareused.
-lter-Filteredtargetslist.
-target-properties-Tcllistconsistingoftargetproperties.
Anerrorisreturnedwhentargetselectionfails.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com12
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
Example
Listalltargets.
targets
Listtargetswithnamestartingwith"ARM"andendingwith"#1"
targets-filter{name=~"ARM*#1"}
Settargetwithid2asthecurrenttarget.
targets2
Setcurrenttargettotargetwithnamestartingwith"ARM"andendingwith"#1".
targets-set-filter{name=~"ARM*#1"}
Setcurrenttargettotargetwithnamestartingwith"MicroBlaze"andwhichison1stJtagDevice
targets-set-filter{name=~"MicroBlaze*"}-index0
gdbremoteconnect
ConnecttoGDBremoteserver.
Synopsis
gdbremoteconnect[options]<server>
Options
OptionDescription
-architecture<name>Specifydefaultarchitectureiftheremoteserverdoes
notprovideit.
Returns
Nothing,iftheconnectionissuccessful.Errorstring,iftheconnectionfails.
gdbremotedisconnect
DisconnectfromGDBremoteserver.
Synopsis
gdbremotedisconnect[target-id]
Returns
Nothing,iftheconnectionisclose.Errorstring,ifthereisnoactiveconnection.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com13
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
TargetRegisters
Thesecommandscanbeusedtoreadandwritetothetargetregisters.
Thefollowingisalistofregisterscommands:
rrd
rwr
Thesecommandscanaccessgeneralpurposeregisters,systemregisterslikeARMco-processor
registers.
TIP:
IOUregistersinZynq-7000APSoCdevicescanbeaccessedbyrunningthesecommandsonAPU
target’.rrdcanalsoreadregisterdenitions,insteadoftheirvalues.
rrd
Readregisterdenitionsorvaluesfortheactivetarget.
Synopsis
rrd[Options][reg]
Options
OptionDescription
-defsReadregisterdenitionsinsteadofvalues.
-no-bitsDon’tshowbiteldsalongwithregistervalues.By
default,biteldsareshown,whenavailable.
Returns
Registernamesandvalues,orregisterdenitionsifsuccessful.Errorstring,iftheregisterscan’t
bereadorifaninvalidregisterisspecied.
Example
Readtoplevelregistersorgroups.
rrd
Readregisterr0.
rrdr0
Readregisterr0ingroupusr.
rrdusrr8
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com14
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
Readdenitionsfortoplevelregistersorgroups.
rrd-defs
rwr
Writethe<value>toactivetargetregisterspeciedby<reg>.
Synopsis
rwr<reg><value>
Returns
Nothing,ifsuccessful.
Errorstring,ifaninvalidregisterisspeciedortheregistercan’tbewritten.
Example
Write0x0toregisterr8
rwrr80x0
Write0x0toregisterr8ingroupusr.
rwrusrr80x0
ProgramExecution
Thesecommandscanbeusedforprogramexecution,targetstate,anddisassembly.
Thefollowingisalistofrunningcommands:
state
stop
con
stp
nxt
stpi
nxti
stpout
dis
print
locals
backtrace
prole
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com15
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
state
Displaythecurrentstateofthetarget.
Synopsis
state
Returns
Returnthecurrentexecutionstateoftarget.
stop
Suspendexecutionofactivetarget.
Synopsis
stop
Returns
Nothing,ifthetargetissuspended.
Errorstring,ifthetargetisalreadystoppedorcan’tbestopped.Aninfomessageisprintedon
theconsolewhenthetargetissuspended
con
Resumeexecutionofactivetarget.
Synopsis
con[Options]
Options
OptionDescription
-addr<address>Resumeexecutionfromaddressspeciedby
<address>.
-blockBlockuntilthetargetstopsoratimeoutisreached.
-timeout<sec>Timeoutvalueinseconds.
Returns
Nothing,ifthetargetisresumed.
Errorstring,ifthetargetisalreadyrunningorcan’tberesumedordoesnothaltwithintimeout,
afterbeingresumed.Aninfomessageisprintedontheconsolewhenthetargetisresumed.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com16
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
Example
Resumeexecutionoftheactivetargetfromaddress0x100000.
con-addr0x100000
Resumeexecutionoftheactivetargetandwaituntilthetargetstops.
con-block
Resumeexecutionoftheactivetargetandwaituntilthetargetstopsoruntilthe5sectimeout
isreached.
con-block-timeout5
stp
Resumeexecutionoftheactivetargetuntilcontrolreachesinstructionthatbelongstodifferent
lineofsourcecode.Ifafunctioniscalled,stopatrstlineofthefunctioncode.Erroris
returnediflinenumberinformationnotavailable.
Synopsis
stp[count]
Options
OptionDescription
[count]If<count>isgreaterthan1,repeat<count>times.
Defaultvalueofcountis1.
Returns
Nothing,ifthetargethassinglestepped.
Errorstring,ifthetargetisalreadyrunningorcan’tberesumed.Aninfomessageisprintedon
theconsolewhenthetargetstopsatthenextaddress.
nxt
Resumeexecutionoftheactivetargetuntilcontrolreachesinstructionthatbelongstoa
differentlineofsourcecode,butrunsanyfunctionscalledatfullspeed.Errorisreturnedifline
numberinformationnotavailable.
Synopsis
nxt[count]
Options
OptionDescription
[count]If<count>isgreaterthan1,repeat<count>times.
Defaultvalueofcountis1.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com17
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
Returns
Nothing,ifthetargethassteppedtothenextsourceline.
Errorstring,ifthetargetisalreadyrunningorcan’tberesumed.Aninfomessageisprintedon
theconsolewhenthetargetstopsatthenextaddress.
stpi
Executeasinglemachineinstruction.Iftheinstructionisafunctioncall,stopattherst
instructionofthefunctioncode.
Synopsis
stpi[count]
Options
OptionDescription
[count]If<count>isgreaterthan1,repeat<count>times.
Defaultvalueofcountis1.
Returns
Nothing,ifthetargethassinglestepped.
Errorstring,ifthetargetisalreadyrunningorcan’tberesumed.Aninfomessageisprintedon
theconsolewhenthetargetstopsatthenextaddress.
nxti
Stepoverasinglemachineinstruction.Ifinstructionisfunctioncall,executioncontinuesuntil
controlreturnsfromthefunction.
Synopsis
nxti[count]
Options
OptionDescription
[count]If<count>isgreaterthan1,repeat<count>times.
Defaultvalueofcountis1.
Returns
Nothing,ifthetargethassteppedtothenextaddress.
Errorstring,ifthetargetisalreadyrunningorcan’tberesumed.Aninfomessageisprintedon
theconsolewhenthetargetstopsatthenextaddress.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com18
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
stpout
Resumeexecutionofcurrenttargetuntilcontrolreturnsfromcurrentfunction.
Synopsis
nxti[count]
Options
OptionDescription
[count]If<count>isgreaterthan1,repeat<count>times.
Defaultvalueofcountis1.
Returns
Nothing,ifthetargethassteppedoutofthecurrentfunction.
Errorstring,ifthetargetisalreadyrunningorcan’tberesumed.Aninfomessageisprintedon
theconsolewhenthetargetstopsatthenextaddress.
dis
Disassemble<num>instructionsataddressspeciedby<address>.Thekeywordpccanbe
usedtodisassembleinstructionsatcurrentPC.Defaultvaluefor<num>is1.
Synopsis
dis<address><num>
Returns
Disassembledinstructionsifsuccessful.
Errorstring,ifthetargetinstructionscan’tberead
Example
DisassembleaninstructionatthecurrentPCvalue.
dis
DisassembletwoinstructionsatthecurrentPCvalue.
dispc2
Disassembletwoinstructionsataddress0x0.
dis0x02
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com19
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
print
Getorsetthevalueofanexpressionspeciedby<expression>.The<expression>can
includeconstants,local/globalvariables,CPUregisters,oranyoperator,butpre-processor
macrosdenedthrough#denearenotsupported.CPUregisterscanbespeciedinthe
format{$r1},wherer1istheregistername.
Elementsofacomplexdatatypeslikeastructurecanbeaccessedthrough.operator.For
example,var1.int_typereferstoint_typeelementinvar1struct.
Arrayelementscanbeaccessedthroughtheirindices.Forexample,array1[0]refersto
theelementatindex0inarray1.
Synopsis
print[Options][expression]
Options
OptionDescription
-add<expression>Addthe<expression>toautoexpressionlist.
Thevaluesordenitionsoftheexpressionsinauto
expressionlistaredisplayedwhenexpressionname
isnotspecied.Frequentlyusedexpressionsshould
beaddedtotheautoexpressionlist
-defs[expression]Returntheexpressiondenitionslikeaddress,type,
sizeandRWags.
Notalldenitionsareavailableforalltheexpressions.
Forexample,addressisavailableonlyforvariables
andnotwhentheexpressionincludesanoperator.
-remove[expression]Removetheexpressionfromautoexpressionlist.
Onlyexpressionspreviouslyaddedtothelistthrough
-addoptioncanberemoved.Whentheexpression
nameisnotspecied,alltheexpressionsintheauto
expressionlistareremoved.
-set<expression>Setthevalueofavariable.Itisnotpossibletoset
thevalueofanexpressionwhichincludesconstants
oroperators.
Returns
Expressionvalue(s),ifnooptionor-addisused.
Expressiondenition(s),if-defsoptionisused.
Nothing,if-removeor-setoptionsareused.
Errorstring,ifexpressionvaluecan’tbereadorset.
Example
ReturnthevalueofvariableInt_Glob.
printInt_Glob
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com20
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
AddthevariableMicrosecondstoautoexpressionlistandreturnitsvalue.
print-aMicroseconds
Addtheexpression(Int_Glob*2+1)toautoexpressionlistandreturnitsvalue.
print-aInt_Glob*2+1
Returnthevalueofint_typeelementinvar1struct,wherevar1isamemberoftmp_var
struct.
printtmp_var.var1.int_type
Returnthevalueoftheelementatindex0inarrayarray1.array1isamemberofvar1
struct,whichisinturnamemberoftmp_varstruct.
printtmp_var.var1.array1[0]
Returnthevaluesofalltheexpressionsinautoexpressionlist.
print
Returnthedenitionsofalltheexpressionsinautoexpressionlist.
print-defs
SetthevalueofthevariableInt_Globto23.
print-setInt_Glob23
RemovetheexpressionMicrosecondsfromautoexpressionlist.
print-removeMicroseconds
ReturnthevalueofCPUregisterr1.
print{r1}
locals
Getorsetthevalueofavariablespeciedby<variable-name>.Whenvariablenameand
valuearenotspecied,valuesofallthelocalvariablesarereturned.Elementsofacomplex
datatypeslikeastructurecanbeaccessedthrough.operator.
Forexample,var1.int_typereferstoint_typeelementinvar1struct.Arrayelements
canbeaccessedthroughtheirindices.Forexample,array1[0]referstotheelementat
index0inarray1.
Synopsis
locals[options][variable-name[variable-value]]
Options
OptionDescription
-defsReturnthevariabledenitionslikeaddress,type,size
andRWags.
-dict[expression]ReturntheresultinTcldictformat,withvariable
namesasdictkeysandvariablevaluesasdictvalues.
Forcomplexdatalikestructures,namesareinthe
formofparent.child.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com21
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
Returns
Variablevalue(s),ifnooptionisused.
Variabledenition(s),if-defsoptionisused.
Nothing,whenvariablevalueisset.
Errorstring,ifvariablevaluecan’tbereadorset.
Example
ReturnthevalueofthelocalvariableInt_Loc.
localsInt_Loc
Returnthevaluesofallthelocalvariablesinthecurrentstackframe.
locals
Returndenitionsofallthelocalvariablesinthecurrentstackframe.
locals-defs
SetthevalueofthelocalvariableInt_Locto23.
localsInt_Loc23
Returnthevalueofint_typeelementinvar1struct,wherevar1isamemberoftmp_var
struct.
localstmp_var.var1.int_type
Returnthevalueoftheelementatindex0inarrayarray1.array1isamemberofvar1
struct,whichisinturnamemberoftmp_varstruct.
localstmp_var.var1.array1[0]
backtrace
Returnstacttraceforcurrenttarget.Targetmustbestopped.Usedebuginformationfor
bestresults.
Synopsis
backtrace
Returns
StackTrace,ifsuccessful.
Errorstring,ifStackTracecan’tbereadfromthetarget
prole
CongureandruntheGNUproler.Theprolingneedstoenabledwhilebuildingbspand
applicationtobeproled.
Synopsis
profile[options]
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com22
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
Options
OptionDescription
-freqSamplingfrequency.
-scratchaddrScratchmemoryforstoringtheprolingrelated
data.Itneedstobeassignedcarefully,asitshould
notoverlapwiththeprogramsections.
-outNameoftheoutputleforwritingtheprolingdata.
Thisoptionalsorunstheprolerandcollectsthe
data.Iflenameisnotspecied,prolingdatais
writtentogmon.out.
Returns
Dependsontheoptionsused:
-scratchaddr,-freq-Returnsnothingonsuccessfulconguration.Errorstring,incaseof
error.
-out-Returnsnothing,andgeneratesale.Errorstring,incaseoferror.
Example
Conguretheprolerwithasamplingfrequencyof10000andscratchmemoryat0x0.
profile-freq10000-scratchaddr0
Outputtheproledataintestgmon.out.
profile-outtestgmon.out
TargetMemory
TheXilinxSystemDebuggerCLI(XSDB)MemorycommandscanbeusedtoReadandWriteto
thetargetmemoryspace.
Thefollowingisalistofmemorycommands::
mrd
mwr
memmap
Note:The’force’optioncanbeusedtowiththesecommandstoover-writeaccessprotection.
mrd
Readmemoryaddressoftheactivetarget.
NOTE:SelectanAPUtargettoaccessARMDAPandMEM-APaddressspace.
Synopsis
mrd[Options]<address><num>
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com23
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
Read<num>wordsfromtheactivetarget’smemoryaddressspeciedby<address>.
Options
OptionDescription
-forceOverwriteaccessprotection.Bydefaultaccessesto
reservedandinvalidaddressrangesareblocked.
-size<access-size>Accesssizecanbeoneofthevaluesbelow:
b=Bytesaccesses
h=Half-wordaccesses
w=Wordaccesses
Defaultaccesssizeisw.Addresswillbealignedto
access-sizebeforereadingmemory.
-valueReturnaTcllistofvalues,insteadofdisplayingthe
resultonconsole.
-binReturndatareadfromthetargetinbinaryformat.
-file<file-name>Writebinarydatareadfromthetargetto
<file-name>.
-address-space<name>Accessspeciedmemoryspaceinsteaddefault
memoryspaceofcurrenttarget.
ForARMDAPtargets,addressspacesDPR,APR
andAP<n>canbeusedtoaccessDPRegisters,
APRegistersandMEM-APaddresses,respectively.
Forbackwardscompatibility-arm-dapand
-arm-apoptionscanbeusedasshorthandfor
-address-spaceAPRand-address-space
AP<n>,respectively.TheAPRaddressrangeis0x0-
0xfffc,wherethehigher8bitsselectanAPandlower
8bitsaretheregisteraddressforthatAP .
-unaligned-accessMemoryaddressisnotalignedtoaccesssize,before
performingareadoperation.Supportforunaligned
accessesistargetarchitecturedependent.Ifthis
optionisnotspecied,addressesareautomatically
alignedtoaccesssize
Returns
Memoryaddressesanddatainrequestedformat,ifsuccessful.
Errorstring,ifthetargetmemorycan’tberead.
Example
Readawordat0x0
mrd0x0
Read10wordsat0x0
mrd0x010
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com24
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
Read10wordsat0x0andreturnaTcllistofvalues.
mrd-value0x010
Read3bytesataddress0x1
mrd-sizeb0x13
Read2half-wordsataddress0x2
mrd-sizeh0x22
Read100wordsataddress0x0andwritethebinarydatatomem.bin.
mrd-bin-filemem.bin0100
ReadAPB-APCSWonZynq.Thehigher8bits(0x1)selecttheAPB-APandlower8bits(0x0)is
theaddressofCSW.
mrd-address-spaceAPR0x100
ReadAHB-APTARonZynq.Thehigher8bits(0x0)selecttheAHB-APandlower8bits(0x4)is
theaddressofTAR.
mrd-address-spaceAPR0x04
Readaddress0x80090088onDAPAPB-AP .0x80090088correspondstoDBGDSCRregisterof
Cortex-A9#0,onZynq.AP1selectstheAPB-AP .
mrd-address-spaceAP10x80090088
Readaddress0xe000d000onDAPAHB-AP .0xe000d000correspondstoQSPIdeviceon
Zynq.AP0selectstheAHB-AP .
mrd-address-spaceAP00xe000d000
mwr
Addorremoveamemorymapentryfortheactivetarget.
Synopsis
memmap[Options]
Options
OptionDescription
-forceOverwriteaccessprotection.Bydefault,accessesto
reservedandinvalidaddressrangesareblocked.
-size<access-size>Accesssizecanbeoneofthevaluesbelow:
b=Bytesaccesses
h=Half-wordaccesses
w=Wordaccesses
Defaultaccesssizeisw.
Addresswillbealignedtoaccess-sizebeforewriting
tomemory.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com25
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
OptionDescription
-binReadbinarydatafromaleandwriteittotarget
addressspace.
-file<file-name>Filefromwhichbinarydataisreadbeforewriting
totargetaddressspace.
-address-space<name>Accessspeciedmemoryspaceinsteaddefault
memoryspaceofcurrenttarget.
ForARMDAPtargets,addressspacesDPR,APR
andAP<n>canbeusedtoaccessDPRegisters,
APRegistersandMEM-APaddresses,respectively.
Forbackwardscompatibility-arm-dapand
-arm-apoptionscanbeusedasshorthandfor
-address-spaceAPRand-address-space
AP<n>,respectively.TheAPRaddressrangeis0x0
-0xfffc,wherethehigher8bitsselectanAPand
lower8bitsaretheregisteraddressforthatAP .
-unaligned-accessMemoryaddressisnotalignedtoaccesssize,before
performingareadoperation.Supportforunaligned
accessesistargetarchitecturedependent.Ifthis
optionisnotspecied,addressesareautomatically
alignedtoaccesssize
Returns
Nothing,ifsuccessful.
Errorstring,ifthetargetmemorycan’tbewritten.
Example
Write0x1234toaddress0x0
mwr0x00x1234
Write4valuesfromthelistofvaluestoaddress0x0
mwr0x0{0x120x230x340x45}
Write4wordsfromthelistofvaluestoaddress0x0andllthelastwordfromthelist
atremaining6addresslocations.
mwr0x0{0x120x230x340x45}10
write3bytesfromthelistataddress0x1
mwr-sizeb0x1{0x10x20x3}3
write2half-wordsfromthelistataddress0x2
mwr-sizeh0x2{0x12340x5678}2
Read100wordsfrombinarylemem.binandwritethedataattargetaddress0x0.
mwr-bin-filemem.bin0100
Write0x80000042toAPB-APCSWonZynqThehigher8bits(0x1)selecttheAPB-APand
lower8bits(0x0)istheaddressofCSW.
mwr-arm-dap0x1000x80000042
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com26
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
Write0xf8000120toAHB-APTARonZynqThehigher8bits(0x0)selecttheAHB-APand
lower8bits(0x4)istheaddressofTAR.
mwr-arm-dap0x040xf8000120
Write0x03186003toaddress0x80090088onDAPAPB-AP0x80090088correspondsto
DBGDSCRregisterofCortex-A9#0,onZynq.AP1selectstheAPB-AP .
mwr-arm-ap10x800900880x03186003
Write0x80020001toaddress0xe000d000onDAPAHB-AP0xe000d000correspondsto
QSPIdeviceonZynq.AP0selectstheAHB-AP .
mwr-arm-ap00xe000d0000x80020001
osa
CongureOSawarenessforthesymbollespecied.Ifnosymbolleisspeciedandonlyone
symbolleexistsintarget’smemorymap,thenthatsymbolleisused.Ifnosymbolleis
speciedandmultiplesymbollesexistintarget’smemorymap,thenanerroristhrown.
Synopsis
osa[Options]
Options
OptionDescription
-disableDisableOSawarenessforasymbolle.Ifthisoption
isnotspecied,OSawarenessisenabled.
NOTE:-fast-execand-fast-stepoptionsare
notvalidwith-disableoption.
-fast-execEnablefastprocessstart.Newprocesseswillnotbe
trackedfordebugandarenotvisibleinthedebug
targetsview.
-fast-stepEnablefaststepping.Onlythecurrentprocesswill
bere-syncedafterstepping.Allotherprocesseswill
notbere-syncedwhenthisagisturnedon.
Returns
Nothing,ifOSAisconguredsuccessfully.
Error,ifambiguousoptionsarespecied.
Example
EnableOSAfor<symbole-le>andturnonfast-execandfast-stepmodes.
osa-file<symbol-file>-fast-step-fast-exec
DisableOSAfor<symbol-le>.
osa-disable-file<symbol-file>
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com27
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
memmap
CongureOSawarenessforthesymbollespecied.Ifnosymbolleisspeciedandonlyone
symbolleexistsintarget’smemorymap,thenthatsymbolleisused.Ifnosymbolleis
speciedandmultiplesymbollesexistintarget’smemorymap,thenanerroristhrown.
NOTE:Onlythememoryregionspreviouslyaddedthroughmemmapcommandcanbe
removed.
Synopsis
memmap<Options>
Options
OptionDescription
-addr<memory-address>Addressofthememoryregionthatshouldbe
added/removedfromthetarget’smemorymap.
-size<memory-size>Sizeofthememoryregion.
-flags<protection-flags>Protectionagsforthememoryregion.
<protection-flags>canbeabitwiseORofthe
valuesbelow:
0x1=Readaccessisallowed
0x2=Writeaccessisallowed
0x4=Instructionfetchaccessisallowed
Defaultvalueof<protection-flags>is0x3
(Read/WriteAccess)
-listListthememoryregionsaddedtotheactivetarget’s
memorymap.
-clearSpecifywhetherthememoryregionshouldbe
removedfromthetarget’smemorymap.
NOTE:Onlythememoryregionspreviouslyadded
throughmemmapcommandcanberemoved.
-relocate-section-map<addr>Relocatetheaddressmapoftheprogramsections
to<addr>.Thisoptionshouldbeusedwhenthe
codeisself-relocating,sothatthedebuggercannd
thedebugsymbolinfoforthecode.<addr>isthe
relativeaddress,towhichalltheprogramsections
arerelocated.
-osaEnableOSawarenessforthesymbolle.Fastprocess
startandfaststeppingoptionsareturnedoffby
default.Theseoptionscanbeenabledusingtheosa
command.Seehelposaformoredetails.
Returns
Nothing,whilesettingthememorymap,orlistofmemorymapswhen-listoptionisused.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com28
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
Example
Addthememoryregion0xfc000000-0xfc000ffftotarget’smemorymap.Read/Write
accessesareallowedtothisregion.
memmap-addr0xfc000000-size0x1000-flags3
Removethepreviouslyaddedmemoryregionat0xfc000000fromthetarget’smemorymap.
memmap-addr0xfc000000-clear
TargetDownloadFPGA/BINARY
Thesecommandscanbeusedtodownloadelf/binarylestothetargetorcongureFPGA.
Thefollowingisalistofdownloadcommands:
dow
elfverify
fpga
dow
Downloadelfandbinarylestothetarget.
Synopsis
dow[Options]<file>
DownloadELFle<file>toactivetarget.
dow-data<file><addr>
Downloadbinaryle<file>toactivetargetaddressspeciedby<addr>.
Options
OptionDescription
-clearClearuninitializeddata(.bss)
-keepsymKeeppreviouslydownloadedelfsinthelistofsymbol
les.Defaultbehavioristocleartheoldsymbolles
whiledownloadinganelf.
-forceOverwriteaccessprotection.Bydefaultaccessesto
reservedandinvalidaddressrangesareblocked.
-relocate-section-map<addr>Relocatetheaddressmapoftheprogramsections
to<addr>.Thisoptionshouldbeusedwhenthe
codeisself-relocating,sothatthedebuggercannd
thedebugsymbolinfoforthecode.<addr>isthe
relativeaddress,towhichalltheprogramsections
arerelocated.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com29
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
Returns
Nothing.
elfverify
VerifyiftheELFle<file>isdownloadedcorrectlytoactivetarget.
Synopsis
elfverify[options]<file>
Options
OptionDescription
-forceOverwriteaccessprotection.Bydefaultaccessesto
reservedandinvalidaddressrangesareblocked.
Returns
Nothing.
fpga
CongureFPGAwithabitstream.
NOTE:FPGAdeviceshouldbeselectedthroughthetargetscommandbeforerunning
thefpgacommand.
Synopsis
fpga<bitstream-file>
CongureFPGAwithgivenbitstream.
fpga[Options]
CongureFPGAwithbitstreamspeciedoptions,orreadFPGAstate.
Options
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com30
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
OptionDescription
-file<bitstream-file>Specifylecontainingbitstream.
-partialCongureFPGAwithoutrstclearingcurrent
conguration.Thisoptionsshouldbeusedwhile
conguringpartialbitstreamscreatedbefore2014.3
oranypartialbitstreamsinbinaryformat.
-stateReturnwhethertheFPGAiscongured.
-config-statusReturncongurationstatus.
-ir-statusReturnIRcapturestatus.
-boot-statusReturnboothistorystatus.
-timer-statusReturnwatchdogtimerstatus.
-cor0-statusReturncongurationoption0status.
-cor1-statusReturncongurationoption1status.
-wbstar-statusReturnwarmbootstartaddressstatus.
Returns
Dependsontheoptionsused.
-le,-partial-Nothing,iffpgaiscongured,oranerrorifthecongurationfailed.
Congurationvalue.
TargetReset
Thesecommandscanbeusedtoresetthetarget.
Thefollowingisalistofresetcommands:
rst
rst
Resettheactivetarget.Thiscommandcanbeusedtoresetaprocessororagroupof
processorsortheentiresystem.
Synopsis
rst[options]
Options
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com31
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
OptionDescription
-processorResettheactiveprocessortarget.
-coresResettheactiveprocessorgroup.Thisresettype
issupportedonlyonZynq.Aprocessorgroup
isdenedasasetofprocessorsandon-chip
peripheralslikeOCM.
-systemResettheactivesystem.
-srstGeneratesystemresetforactivetarget.WithJTAG
thisisdonebygeneratingapulseontheSRSTpin
ontheJTAGcableassocatedwiththeactivetarget.
Returns
Nothing,ifresetifsuccessful.Errorstring,ifresetisunsupported
TargetBreakpoints/Watchpoints
Thesecommandscanbeusedtoadd,remove,enable,disableorlistBreakpoints/Watchpoints.
XSDBsupportsBreakpoints/Watchpointsataddressandsourceline.
Thefollowingisalistofbreakpointcommands:
bpadd
bpremove
bpenable
bpdisable
bplist
bpstatus
bpadd
Setabreakpoint/watchpoint.
NOTE:BreakpointscanbesetinXSDBbeforeconnectingtohw_server/TCFagent.Ifthereis
anactivetargetwhenabreakpointisset,thebreakpointwillbeenabledonlyforthatactive
target.Ifthereisnoactivetarget,thebreakpointwillbeenabledforallthetargets.
Synopsis
bpadd<options>
Options
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com32
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
OptionDescription
-addr<breakpoint-address>SpecifytheaddressatwhichtheBreakpointshould
beset
-file<file-name>Specifythele-nameinwhichtheBreakpointshould
beset
-line<line-number>Specifytheline-numberwithinthele,where
Breakpointshouldbeset
-type<breakpoint-type>SpecifytheBreakpointtype.Typecanbeoneofthe
followingvalues:
auto=Auto-Breakpointtypeischosenby
hw_server.Thisisthedefaulttype
hw=HardwareBreakpoint
sw=SoftwareBreakpoint
-mode<breakpoint-mode>Specifytheaccessmodethatwilltriggerthe
breakpoint.ThemodecanbeabitwiseORoneof
thefollowingvalues:
0x1=Triggeredbyareadfromthebreakpoint
location.
0x2=Triggeredbyawritetothebreakpoint
location.
0x4=Triggeredbyaninstructionexecutionat
thebreakpointlocation.Thisisthedefaultfor
LineandAddressbreakpoints.
0x8=Triggeredbyadatachange(notan
explicitwrite)atthebreakpointlocation.
-enable<mode>Specifyinitialenablementstateofbreakpoint.When
<mode>is0thebreakpointisdisabled,otherwise
thebreakpointisenabled.Thedefaultisenabled.
-ct-input<list>
-ct-output<list>
Specifyinputandoutputcrosstriggers.<list>isa
listofnumbersidentifyingthecrosstriggerpin.For
Zynq0-7isCTIforcore0,8-15isCTIforcore1,
16-23isCTIETBandTPIU,and24-31isCTIforFTM.
-properties<dict>Specifyadvancedbreakpointproperties.
-meta-data<dict>Specifymeta-dataofadvancesbreakpointproperties.
Returns
BreakpointId.
Example
SetaBreakpointataddress0x100000.Breakpointtypeischosenbyhw_server/TCFagent.
bpadd-addr0x100000
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com33
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
SetafunctionBreakpointatmain.Breakpointtypeischosenbyhw_server/TCFagent.
bpadd-addr&main
SetaHardwareBreakpointattest.c:23.
bpadd-filetest.c-line23-typehw
SetaRead_WriteWatchpointonvariablefooVar.
bpadd-addr&fooVar-typehw-mode0x3
SetacrosstriggertostopZynqcore1whencore0stops.
bpadd-ct-input0-ct-output8
bpremove
RemoveBreakpoints/Watchpoints.
Synopsis
bpremove<id-list>|-all
Options
OptionDescription
<id-list>RemovetheBreakpoints/Watchpointsspeciedby
<id-list>.
<id-list>isalistofbreakpointIDs,whichare
returnedbythebpaddcommand.BreakpointIDs
canalsobeobtainedthroughthebplistcommand.
-allRemoveallbreakpoints.
Returns
Nothing,ifthebreakpointisremovedsuccessfully.Errorstring,ifthebreakpointspecied
by<id-list>isnotset
Example
Removebreakpoint0.
bpremove0
Removebreakpoints1and2.
bpremove12
Removeallbreakpoints.
bpremove-all
bpenable
EnableBreakpoints/Watchpoints.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com34
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
Synopsis
bpenable<id-list>|-all
Options
OptionDescription
<id-list>EnabletheBreakpoints/Watchpointsspeciedby
<id-list>.
<id-list>isalistofbreakpointIDs,whichare
returnedbythebpaddcommand.BreakpointIDs
canalsobeobtainedthroughthebplistcommand.
-allEnableallbreakpoints.
Returns
Nothing,ifthebreakpointisenabledsuccessfully.Errorstring,ifthebreakpointspecied
by<id-list>isnotset.
Example
Enablebreakpoint0.
bpenable0
Enablebreakpoints1and2.
bpenable12
Enableallbreakpoints.
bpenable-all
bpdisable
DisableBreakpoints/Watchpoints.
Synopsis
bpdisable<id-list>|-all
Options
OptionDescription
<id-list>DisabletheBreakpoints/Watchpointsspeciedby
<id-list>.
<id-list>isalistofbreakpointIDs,whichare
returnedbythebpaddcommand.BreakpointIDs
canalsobeobtainedthroughthebplistcommand.
-allDisableallbreakpoints.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com35
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
Returns
Nothing,ifthebreakpointisdisabledsuccessfully.Errorstring,ifthebreakpointspecied
by<id-list>isnotset.
Example
Enablebreakpoint0.
bpenable0
Enablebreakpoints1and2.
bpenable12
Enableallbreakpoints.
bpenable-all
bplist
ListalltheBeakpoints/WatchpointsalongwithbriefstatusforeachBreakpointandthetarget
onwhichitisset.
Synopsis
bplist
Options
None.
Returns
Listofbreakpoints
bpstatus
PrintthestatusofaBreakpoint/Watchpointspeciedby<id>.Statusincludesthetarget
informationforwhichthebreakpointisactiveandalsothebreakpointhitcountorerrormessage.
Synopsis
breakpoint<id>
Returns
Breakpointstatus,ifthebreakpointexists.
Errorstring,ifthebreakpointspeciedby<id>isnotset.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com36
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
JTAGUART
ThesecommandscanbeusedtoconnecttoJTAGUART(MDMorARMDCC).
Thefollowingisalistofstreamcommands:
jtagterminal
readjtaguart
jtagterminal
Start/StopJtagbasedhyper-terminal.
NOTE:SelectaMDMorARMprocessortargetbeforerunnningthiscommand.
Synopsis
jtagterminal[options]
Options
OptionDescription
-startStarttheJTAGUARTterminal.Thisisthedefault
option.
-stopStoptheJTAGUARTterminal.
-socketReturnthesocketportnumber,insteadofstarting
theterminal.Externalterminalprogramscanbeused
toconnecttothisport
Returns
Socketportnumber.
readjtaguart
StartorStopreadingfromJTAGUART.
NOTE:Whilerunningascriptinnon-interactivemode,outputfromJtaguartmightnotbe
writtentothelog,untilreadjtaguart-stopisused.
Synopsis
readjtaguart[options]
Options
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com37
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
OptionDescription
-startStartreadingtheJTAGUARToutput.
-stopStopreadingtheJTAGUARToutput.
-handle<file-handle>Specifythelehandletowhichthedatashouldbe
redirected.Ifnolehandleisgiven,dataisprinted
onstdout.
Returns
Nothing,ifsuccessful.Errorstring,ifdatacan’tbereadfromtheJtagUart.
Example
StartreadingfromtheJtagUartandprinttheoutputonstdout.
readjtaguart
StartreadingfromtheJTAGUARTandprinttheoutputtotest.log.
setfp\[opentest.logw\]
readjtaguart-start-handle\$fp
StopreadingfromtheJTAGUART.
readjtaguart-stop
Miscellaneous
Thefollowingisalistofmiscellaneouscommands:
loadhw
unloadhw
mdm_drwr
mb_drwr
mdm_drrd
mb_drrd
congparams
version
xsdbserverstart
xsdbserverstop
xsdbserverdisconnect
xsdbserverversion
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com38
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
loadhw
LoadaVivadoHWdesign,andsetthememorymapforthecurrenttarget.Ifthecurrent
targetisaparentforagroupofprocessors,memorymapissetforallitschildprocessors.
Ifcurrenttargetisaprocessor,memorymapissetforallthechildprocessorsofit’sparent.
ThiscommandreturnstheHWdesignobject.
Synopsis
loadhw[options]
Options
OptionDescription
-hwSpecifythehardwaredesignle.
-listReturnalistofopendesignsforthetargets.
Returns
Designobject,iftheHWdesignisloadedandmemorymapissetsuccessfullyErrorstring,if
theHWdesigncan’tbeopened.
Example
LoadtheHWdesignnameddesign.hdfandsetmemorymapforallthechildprocessors
ofAPUtarget.
targets-filter{name=~"APU"}
loadhwdesign.hdf
LoadtheHWdesignnameddesign.hdfandsetmemorymapforallthechildprocessors
forwhichxc7z045istheparent.
targets-filter{name=~"xc7z045"}
loadhwdesign.hdf
unloadhw
ClosetheVivadoHWdesignwhichwasopenedduringloadhwcommand,andclearthe
memorymapforthecurrenttarget.Ifthecurrenttargetisaparentforagroupofprocessors,
memorymapisclearedforallitschildprocessors.Ifthecurrenttargetisaprocessor,memory
mapisclearedforallthechildprocessorsofit’sparent.Thiscommanddoesn’tclearmemory
mapexplicitlysetbyusers.
Synopsis
unloadhw
Returns
Nothing
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com39
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
mdm_drwr
WritetoMDMDebugregister.
Synopsis
mdm_drwr[options]<cmd><data><bitlen>
WritetoMDMDebugRegister.<cmd>is8-bitMDMcommandtoaccessaDebugregister.
<data>istheregistervalueand<bitlen>istheregisterwidth.
Options
OptionDescription
-user<bscannumber>Specifyuserbscanportnumber.Defaultis2.
Returns
Nothing,ifsuccessful.Errorstring,ifBSCANportisinvalid
Example
WritetoMDMBreak/ResetControlregister.
mdm_drwr80x408
mb_drwr
WritetoMicroBlazedebugregister
Synopsis
mb_drwr{options]<cmd><data><bitlen>
WritetoMicroBlazeDebugRegisteravailableonMDM.<cmd>is8-bitMDMcommandto
accessaDebugregister.<data>istheregistervalueand<bitlen>istheregisterwidth.
Options
OptionDescription
-userSpecifyuserbscanportnumber.Defaultis2.
Returns
Nothing,ifsuccessful.Errorstring,ifBSCANportisinvalid
Example
WritetoMBControlregister.
mb_drwr10x28210
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com40
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
mdm_drrd
ReadfromMDMdebugregister.
Synopsis
mdm_drrd{options]<cmd><bitlen>
ReadaMDMdebugregister.<cmd>is8-bitMDMcommandtoaccessaDebugregister.
<bitlen>istheregisterwidth.
Options
OptionDescription
-user<bscannumber>Specifyuserbscanportnumber.Defaultis2.
Returns
Registervalue,ifsuccessful.Errorstring,ifBSCANportisinvalid
Example
ReadXMDCIDregister.
mdm_drrd032
mb_drrd
ReadfromMicroBlazeDebugRegister
Synopsis
mb_drrd{options]<cmd><bitlen>
ReadaMicroBlazedebugregisteravailableonMDM.<cmd>is8-bitMDMcommandtoaccess
aDebugregister.<bitlen>istheregisterwidth.
Options
OptionDescription
-user<bscannumber>Specifyuserbscanportnumber.Defaultis2.
Returns
Registervalue,ifsuccessful.Errorstring,ifBSCANportisinvalid
Example
ReadMBStatusregister.
mb_drrd328
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com41
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
congparams
List,getorsetcongurationparameters.
Synopsis
configparams<options>
Listnameanddescriptionforavailablecongurationparameters.Congurationparameterscan
beglobalorconnectionspecic,thereforethelistofavailablecongurationparametersand
theirvaluemightchangedependingoncurrentconnection.
configparams<options><name>
Getcongurationparametervalue(s).
configparams<options><name><value>
Setcongurationparametervalue.
Options
OptionDescription
-allIncludevaluesforallcontextsinresult.
-context[context]Specifycontextofvaluetogetorset.Thedefault
contextis"",whichrepresentstheglobaldefault.
Notalloptionssupportcontextspecicvalues.
Returns
Dependsontheoptionsspecied.
<none>-Listofparamtersanddescriptionofeachparameter.
<parametername>-Parametervalueorerror,ifunsupportedparamterisspecied.
<parametername><parametervalue>-Nothingifthevalueisset,orerror,ifunsupported
parameterisspecied.
Example
Disableaccessprotectionfordow,mrd,andmwrcommands.
configparamsforce-mem-accesses1
ChangetheSDKlaunchtimeoutto100second,usedforrunningSDKbatchmodecommands.
configparamssdk-launch-timeout100
version
GetSDKorTCFserverversion.Whennooptionisspecied,SDKbuildversionisreturned.
Synopsis
version[option]
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com42
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
Options
OptionDescription
-serverGettheTCFserverbuildversion,fortheactive
connection.
Returns
SDKorTCFServerversion,onsuccess.
Errorstring,ifserververisonisrequestedwhenthereisnoconnection
xsdbserverstart
StartXSDBcommandserver.
Synopsis
xsdbserverstart[options]
StartXSDBcommandserverlistener.XSDBcommandserverallowsexternalprocessesto
connecttoXSDBtoevaluatecommands.TheXSDBserverreadscommandsfromfromthe
connectedsocketonelineatthetime.Afterevaluationalineissentbackstartingwith"okay"
or"error"followedbytheresultorerrorasabackslashquotedstring.
Options
OptionDescription
-host<addr>Limitsthenetworkinterfaceonwhichtolistenfor
incomingconnections.
-port<port>Speciedporttolistenon.Ifthisoptionisnot
speciedoriftheportiszerothenadynamically
allocatedportnumberisused.
Returns
Serverdetailsaredisaplayedontheconsoleifserverisstartedsuccessfully,orerrorstring,if
aserverhasbeenalreadystarted.
Example
StartXSDBserverlistenerusingdynamicallyallocatedport.
xsdbserverstart
StartXSDBserverlistenerusingport2000andonlyallowincommingconnectionsthishost.
xsdbserverstart-hostlocalhost-port2000
xsdbserverstop
StopXSDBcommandserverlisteneranddisconnectconnectedclientifany.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com43
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
Synopsis
xsdbserverstop
Returns
Nothing,iftheserverisclosedsuccessfully.Errorstring,iftheserverhasnotbeenstarted
already
xsdbserverdisconnect
DisconnectcurrentXSDBserverconnection.
Synopsis
xsdbserverdisconnect
Returns
Nothing,iftheconnectionisclosed.Errorstring,ifthereisnoactiveconnection.
xsdbserverversion
ReturnXSDBcommandserverprotocolversion.
Synopsis
xsdbserverversion
Returns
Serverversion,ifthereisanactiveconnection.
Errorstring,ifthereisnoactiveconnection.
JTAGAccess
ThesecommandscanbeusedtoperformrawJTAGshifts,get/setdeviceproperties,lock/unlock
JTAGcable,etc.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com44
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
Thefollowingisalistofjtagcommands:
jtagtargets
jtagsequence
jtagdevice_properties
jtaglock
jtagunlock
jtagclaim
jtagdisclaim
jtagfrequency
jtagservers
jtagtargets
ListJTAGtargetsorswitchbetweenJTAGtargets.
Synopsis
jtagtargets
ListavailableJTAGtargets
jtagtargets<targetid>
Select<targetid>asactiveJTAGtarget.
Options
OptionDescription
-setSetcurrenttargettoentrysingleentryinlist.This
isusefulincombinationwith-lteroption.Anerror
willbegenerateiflistisemptyorcontainsmore
thanoneentry.
-regexpUseregexpforltermatching.
-nocaseUsecaseinsensitiveltermatching.
-filter<filter-expression>Specifylterexpressiontocontrolwhichtargets
areincludedinlistbasedonitsproperties.Filter
expressionsaresimilartoTclexprsyntax.Target
propertiesarereferencesbyname,whileTclvariables
areaccessedusingthe$syntax,stringmustbe
quoted.Operators==,!=,<=,>=,<,>,&&and||
aresupportedaswellas().Thereoperatorsbehave
likeTclexproperators.Stringmatchingoperator=~
and!~matchlhsstringwithrhspatternusingeither
regexporstringmatch.
-target-properrtiesReturnsaTcllistofdict’scontainingtargetproperties.
-openOpenalltargetsinlist.Listcanbeshortedby
specifyingtarget-idsandusinglters.
-closeClosealltargetsinlist.Listcanbeshortedby
specifyingtarget-idsandusinglters.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com45
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
Returns
Thereturnvaluedependsontheoptionsused.
<none>-Jtagtargetslistwhennooptionsareused.
-lter-Filteredjtagtargetslist.
-target-properties-Tcllistconsistingofjtagtargetproperties.
Anerrorisreturnedwhenjtagtargetselectionfails.
Example
Listalltargets.
jtagtargets
Listtargetswithname"arm_dap".
jtagtargets-filter{name=="arm_dap"}
Settargetwithid2asthecurrenttarget
jtagtargets2
Setcurrenttargettotargetwithnamestartingwith"arm"
jtagtargets-set-filter{name=~"arm*"}
ListJtagcables.
jtagtargets-set-filter{level==0}
jtagsequence
Thejtagsequencecommandcreatesanewsequenceobject.Aftercreationthesequenceis
empty.Thefollowingsequenceobjectcommandsareavailable:
Synopsis
sequencestatenew-state[count]
MoveJTAGstatemachineto<new-state>andthengenerate<count>JTAGclocks.If
<clock>isgivenand<new-state>isnotaloopingstate(RESET,IDLE,IRSHIFT,IRPAUSE,
DRSHIFTorDRPAUSE)thenstatemachinewillmovetowardsRESETstate.
sequenceirshift[options][bits[data]]
sequencedrshift[options]bits[data]
ShiftdatainIRSHIFTorDRSHIFTstate.Dataiseithergivenasthelastargumentorif-tdi
optionisgiventhendatawillbeallzerosorallonesdependingontheargumentgivento
-tdi.The<bits>and<data>argumentsarenotusedforirshiftwhenthe-registeroptionis
specied.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com46
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
OptionDescription
-register<name>Selectinstructionregisterbyname.Thisoptionis
onlysupportedforirshift.
-tdi<value>TDIvaluetouseforallclocksinSHIFTstate.
-binaryFormatof<data>isbinary,forexampledatafroma
leorfrombinaryformat.
-integerFormatof<data>isaninteger.Theleastsignicant
bitofdataisshiftedrst.
-bitsFormatof<data>isabinarytextstring.Therstbit
inthestringisshiftedrst.
-hexFormatof<data>isahexadecimaltextstring.The
leastsignicantbitoftherstbyteinthestringis
shiftedrst.
-captureCaptureTDOdataduringshiftandreturnfrom
sequenceruncommand.
-state<new-state>Statetoenteraftershiftiscomplete.Thedefault
isRESET.
sequencedelayusec
Generatedelaybetweensequencecommands.NoJTAGclockswillbegeneratedduringthe
delay.Thedelayisguaranteedtobeatleast<usec>microseconds,butcanbelongerfor
cablesthatdonotsupportdelayswithoutgeneratingJTAGclocks.
sequenceget_pin<pin>
Getvalueof<pin>.Supportedpinsiscablespecic.
sequenceset_pin<pin><value>
Setvalueof<pin>to<value>.Supportedpinsiscablespecic.
sequenceatomicenable
Setorclearatomicsequences.Thisisusefultocreatingsequencesthatareguaranteedtorun
withprecisetimingorfail.Atomicsequencesshouldbeasshortaspossibletominimize
theriskoffailure.
sequencerun[options]
RunJTAGoperationsinsequenceforthecurrentlyselectedjtagtarget.Thiscommandwill
returntheresultfromshiftcommandsusing-captureoptionandfromget_pincommands.
OptionDescription
-binaryFormatreturnvalue(s)asbinary.Therstbitshifted
outistheleastsignicantbitintherstbyte
returned.
-bitsFormatreturnvalue(s)asbinarytextstring.Therst
bitshiftedoutistherstcharacterinthestring.
-hexFormatreturnvalue(s)ashexadecimaltextstring.
Therstbitshiftedoutistheleastsignicantbitof
therstbyteoftheinthestring.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com47
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
OptionDescription
-singleCombineallreturnvaluesasasinglepieceofdata.
Withoutthisoptionthereturnvalueisalistwith
oneentryforeveryshiftwith-captureandevery
get_pin.
sequenceclear
Removeallcommandsfromsequence.
sequencedelete
Deletesequence.
Returns
Jtagsequenceobject.
Example
setseqname[jtagsequence]
$seqnamestateRESET
$seqnamedrshift-capture-tdi0256
setresult[$seqnamerun]
$seqnamedelete
jtagdevice_properties
Get/setdeviceproperties.
Synopsis
jtagdevice_properties<idcode>
GetJTAGdevicepropertiesassociatedwith<idcode>.
jtagdevice_propertieskeyvalue...
SetJTAGdeviceproperties.
Returns
Jtagdevicepropertiesforthegivenidcode,ornothing,iftheidcodeisunknown.
Example
ReturnTcldictcontainingdevicepropertiesforidcode0x4ba00477.
jtagdevice_properties0x4ba00477
Setdevicepropertiesforidcode0x4ba00477.
jtagdevice_properties{idcode0x4ba00477mask0xffffffffnamedapirlen4}
jtaglock
LockJTAGscanchaincontainingcurrentJTAGtarget.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com48
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
Synopsis
jtaglock[timeout]
Waitforscanchainlocktobeavailableandthenlockit.If<timeout>isspeciedthewait
timeislimitedto<timeout>milliseconds.
TheJTAGlockpreventsotherclientsfromperforminganyJTAGshiftsorstatechangesonthe
scanchain.Otherscanchainscanbeusedinparallel.Thejtagsequenceruncommand
willensurethatallcommandsinthesequenceareperformedinordersotheuseofjtag
lockisonlyneededwhenmultiplejtagsequenceruncommandsneedstobedone
withoutinterruption.
NOTE:Aclientshouldavoidlockingmorethanonescanchainsincethiscancausedead-lock.
Returns
Nothing
jtagunlock
UnlockJTAGscanchaincontainingcurrentJTAGtarget.
Synopsis
jtagunlock
Returns
Nothing
jtagclaim
ClaimJTAGdevice.
Synopsis
jtagclaimmask
ThiscommandwillattempttosettheclaimmaskforthecurrentJTAGdevice.Ifanysetbits
in<mask>arealreadysetintheclaimmaskthenthiscommandwillreturnerror"already
claimed".TheclaimmaskallowsclientstonegotiatecontroloverJTAGdevices.Thisisdifferent
fromjtaglockinthat
1.itisspecictoadeviceinthescanchain,and
2.anyclientscanperformJTAGoperationswhiletheclaimisineffect.
NOTE:Currentlyclaimisusedtodisablethehw_serverdebuggerfromcontrolling
microprocessorsonARMDAPdevicesandFPGAdevicescontainingMicroblazeprocessors.
Returns
Nothing.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com49
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
jtagdisclaim
DisclaimJTAGdevice.
Synopsis
jtagdisclaimmask
ClearclaimmaskforcurrentJTAGdevice.
Returns
Nothing.
jtagfrequency
Get/setJTAGfrequency.
Synopsis
jtagfrequency
GetJTAGclockfrequencyforcurrentscanchain
jtagfrequency-list
GetlistofsupportedJTAGclockfrequenciesforcurrentscanchain
jtagfrequencyfrequency
SetJTAGclockfrequencyforcurrentscanchain
Returns
Nothing,ifJtagfrequencyissuccessfullyset.
CurrentJtagfrequency,ifnoargumentsarespecied.
SupportedJtagfrequencies,if-listoptionisused.
Errorstring,ifinvalidfrequencyisspeciedorfrequencycan’tbeset.
jtagservers
List,open,andcloseJTAGservers.JTAGserversareusetoimplementsupportfordifferent
typesofJTAGcables.AnopenJTAGserverwillenumberateorconnecttoavailableJTAGports.
Synopsis
jtagservers[options]
Options
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com50
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
OptionDescription
-list
-format
-open<server>
-close<server>
Returns
Dependsontheoptionsspecied.
<none>,-list-ListofopenJtagservers.
-format-ListofsupportedJtagservers.
-close-Nothingiftheserverisclosed,oranerrorstring,ifinvalidserverisspecied.
Example
Listopenedserversandnumberofassociatedports.
jtagservers
ConnecttoXVCserveronhostlocalhostport10200.
jtagservers-openxilinx-xvc:localhost:10200
CloseXVCserverforhostlocalhostport10200.
jtagservers-closexilinx-xvc:localhost:10200
SDKProjects
SDKcommandssupportcreationofhardware,BSPandapplicationprojects.Youcanalso
usethecommandstomanagerepositories,settoolchainpreferences,andcongure,build
andrunapplications.
ThefollowingisalistofSDKprojectcommands:
openhw
closehw
openbsp
closebsp
updatemss
getaddrmap
getperipherals
congbsp
repo
setlib
getlibs
removelib
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com51
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
setdriver
getdrivers
setosversion
getos
regenbsp
projects
setws
getws
createhw
createbsp
createapp
importprojects
importsources
getprojects
deleteprojects
congapp
toolchain
openhw
OpenahardwaredesignexportedfromVivado.HDF/XMLleorthehardwareproject
createdusingcreatehwcommandcanbepassedasargument.PSinitializationlesarealso
generated,ifnotpresent.
PS7:ps7_init.c,ps7_init.h,ps7_init.tcl
PSU:psu_init.c,psu_init.h,psu_init.tcl
Synopsis
openhw<hwproject|hdf/xmlfile>
Options
None
Returns
Ifsuccessful,thiscommandreturnsnothing.Otherwise,returnsanerror.
Example
OpenthehardwareprojectZC702_hw_platform
openhwZC702_hw_platform
Openthehardwareprojectcorrespondingtothesystem.hdf
openhw/tmp/wrk/hw1/system.hdf
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com52
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
closehw
Closeahardwaredesignthatisopenedusingopenhwcommand.
HDF/XMLleorthehardwareprojectcreatedusingcreatehwcommandcanbepassedas
argument.
Synopsis
closehw<hwproject|hdf/xmlfile>
Options
None
Returns
Ifsuccessful,thiscommandreturnsnothing.Otherwise,returnsanerror.
Example
ClosethehardwareprojectZC702_hw_platform
closehwZC702_hw_platform
Closethehardwareprojectcorrespondingtothesystem.hdf
closehw/tmp/wrk/hw1/system.hdf
openbsp
OpentheBSPfromBSPprojectcreatedusingcreatebsporfromtheMSSle.
Synopsis
openbsp<bspproject|mssfile>
Options
None
Returns
Ifsuccessful,thiscommandreturnsnothing.Otherwise,returnsanerror.
Example
OpentheBSPproject’hello_bsp
openbsphello_bsp
Openthebspprojectcorrespondingtothesystem.mss
openbsp/tmp/wrk/hello_bsp/system.mss
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com53
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
closebsp
ClosetheBSPprojectspeciedby<bsp-project>ortheBSPprojectcorrespondingto
theMSSlespeciedby<mss-project>.
Synopsis
closebsp<bsp-project|mss-project>
Options
None
Returns
Ifsuccessful,thiscommandreturnsnothing.Otherwise,returnsanerror.
Example
ClosetheBSPproject’hello_bsp
closebsphello_bsp
Closethebspprojectcorrespondingtothesystem.mss
closebsp/tmp/wrk/hello_bsp/system.mss
updatemss
UpdatethemsslewiththechangesdonetotheBSP .
Synopsis
updatemss[options]
Options
OptionDescription
-hw<hw-proj|hdf/xmlfile>Hardwareprojectorhardwarespecicationle.
-mss<mssfile>MSSletobeupdated.
Returns
Ifsuccessful,thiscommandreturnsnothing.Otherwise,returnsanerror.
Example
Updatethesystem.msslewiththechangesdonetotheBSP .
updatemss–hwZC702_hw_platform–msssystem.mss
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com54
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
getaddrmap
ReturntheaddressrangesofdifferentIPsconnectedtotheprocessorinatabularformat,
alongwithdetailslikesizeandagsofallIPs.
Synopsis
getaddrmap<hwproj|hwspecfile><processor-instance>
Options
None
Returns
Ifsuccessful,thiscommandreturnsnothing.Otherwise,returnsanerror.
Example
Returntheaddressmapofperipheralconnectedtops7_cortexa9_0.hw1isthehardware
project,whichcanbecreatedusingcommandcreatehw.
getaddrmaphw1ps7_cortexa9_0
Returntheaddressmapofperipheralconnectedtops7_cortexa9_0.system.hdfisthe
hardwarespecicationleexportedfromVivado.
getaddrmapsystem.hdfps7_cortexa9_0
getperipherals
Returnthelistofalltheperipheralsinthehardwaredesign,alongwithversionandtype.If
[processor-instance]isspecied,returnonlyalistofslaveperipheralsconnectedto
thatprocessor.
Synopsis
getperipherals<hwproj|hdf/xmlfile>[processor-instance]
Options
None
Returns
Ifsuccessful,thiscommandreturnsthelistofperipherals.Otherwise,returnsanerror.
Example
Returnalistofperipheralsinthehardwaredesign.
getperipheralssystem.hdf
ReturnalistofperipheralsconnectedtoprocessorCortexA9#0inthehardwaredesign.
getperipheralssystem.hdfps7_cortexa9_0
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com55
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
congbsp
ConguresettingsforBSPprojects.
Synopsis
configbsp[options][<parameter>[<value>]]
Options
OptionDescription
-hw<hw-proj|hdf/xmlfile>Hardwareprojectorhardwarespecicationle.
-bsp<bsp_prj|mssfile>BSPprojectormssle.
-proc|-os|-lib<lib-name>Returnthecongurableparametersofprocessor/os/library
inBSP .
-appendAppendthevaluetotheparameterinBSP .
Returns
Dependsontheargumentsspecied
<none>-Listofparametersanddescriptionofeachparameterofprocessor,os,libs
dependingontheoptionspecied.
<parameter>-Parametervalueorerror,ifunsupportedparameterisspecied.
<parameter><value>-Nothingifthevalueisset,oranerrorincaseunsupported
parameterisspecied.
Example
ReturnthelistofcongurableparametersoftheOSintheBSP .
configbsp-os-hwzc702_hw_platform-bspsystem.mss
ReturnthelistofcongurableparametersofprocessorintheBSP .
configbsp-proc-hwsystem.hdf-bspsystem.mss
Returnthelistofcongurableparametersoflibrary"xilisf"intheBSP .
configbsp-libxilisf-hwsystem.hdf-bspsystem.mss
Returnthevalueofextra_compiler_ags’parameterintheBSP .
configbsp-hwsystem.hdf-bspsystem.mssextra_compiler_flags
Set"-pg"asthevalueofextra_compiler_ags’parameterintheBSP .
configbsp-hwsystem.hdf-bspsystem.mssextra_compiler_flags"-pg"
Append"-pg"tothevalueofextra_compiler_ags’parameterintheBSP .
configbsp-hwsystem.hdf-bspsystem.mss-appendextra_compiler_flags"-pg"
repo
Get/setthecurrentlyusedsoftwarerepositoriespath.Thiscommandcanbeusedtoscanthe
repositories.ItcanalsobeusedtogetthelistofOS/libs/drivers/appsfromrepository.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com56
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
Synopsis
repo[options]
Options
OptionDescription
-set<path-list>Settherepositorypathandloadallthesoftwarecores
available.Multiplerepositorypathscanbespeciedinthe
formoflist.
-getGettherepositorypath.
-scanScantherepositorypath.Usedtoscantherepository,
whensomechangesaredone.
-os|-libs|-drivers|-appsReturnthelistofalltheOS/libs/drivers/appsfromthe
repository.
Returns
Dependsontheargumentsspecied
-scan,-set<path-list>-Returnsnothing.
-get-Returnsthecurrentrepositorypath.
-os,-libs,-drivers,-apps-ReturnsthelistofOS/libs/drivers/appsrespectively.
Example
Settherepositorypathtothepathspeciedby<repo-path>.
repo-set/tmp/wrk/repo
ReturnalistofOSfromtherepo.
repo-os
Returnalistoflibrariesfromtherepo.
repo-libs
setlib
AddalibrarytoBSP .
Ifversionisnotspecied,latestlibraryversionavailableisadded.Iflibraryisalreadyavailable
inBSP ,thelibraryversionisupdated.
Synopsis
setlib[options]
Options
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com57
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
OptionDescription
-hw<hw-proj|hdf/xmlfile>Hardwareprojectorhardwarespecicationle.
-bsp<bsp_prj|mssfile>BSPprojectormssle.
-lib<lib-name>LibrarynametobeaddedtoBSP .
-ver<lib-ver>Libraryversiontobeadded.Defaultlatestversionof
libraryisadded.
Returns
Ifsuccessful,thiscommandreturnsnothing.Otherwise,returnsanerror.
Example
Addthexilffslibrarywithversion2.0totheBSP .
setlib-hwzc702_hw_platform-bsphello_bsp–libxilffs–ver2.0
Addlatestversionofxilrsalibrary,availableinrepo,totheBSP .
setlib-hwzc702_hw_platform-bsphello_bsp–libxilrsa
getlibs
ReturnsthelistoflibrariesandtheirversionsfromBSPintabularformat.
Synopsis
getlibs[options]
Options
OptionDescription
-hw<hw-proj|hdf/xmlfile>Hardwareprojectorhardwarespecicationle.
-bsp<bsp_prj|mssfile>BSPprojectormssle.
Returns
Ifsuccessful,thiscommandreturnsthelibrarydetails.Otherwise,returnsanerror.
Example
ReturnthelistofalllibrariesintheBSP .
getlibs-hwzc702_hw_platform-bsphello_bsp
removelib
RemovethelibraryfromBSP .
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com58
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
Synopsis
removelib[options]
Options
OptionDescription
-hw<hw-proj|hdf/xmlfile>Hardwareprojectorhardwarespecicationle.
-bsp<bsp_prj|mssfile>BSPprojectormssle.
-lib<lib-name>LibrarynametoberemovedfromBSP .
Returns
Ifsuccessful,thiscommandreturnsnothing.Otherwise,returnsanerror.
Example
RemovethexilffslibraryfromtheBSP .
removelib-hwzc702_hw_platform-bsphello_bsp–libxilffs
setdriver
SetdriverforaIPintheBSP .
Synopsis
setdriver[options]
Options
OptionDescription
-hw<hw-proj|hdf/xmlfile>Hardwareprojectorhardwarespecicationle.
-bsp<bsp_prj|mssfile>BSPprojectormssle.
-ip<ip-name>IPnameforwhichdriverneedstobeset.
-driver<driver-name>DrivernamewhichneedstobeaddedtotheBSP .
-ver<lib-ver>Versionofthedriver.
Returns
Ifsuccessful,thiscommandreturnsnothing.Otherwise,returnsanerror.
Example
Setthegenericdriverfortheps7_uartIPintheBSP .
setdriver-hwzc702_hw_platform-bsphello_bsp–ipps7_uart–drivergeneric–ver2.0
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com59
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
getdrivers
ReturnthelistofdriversfromtheBSPintabularform.
Synopsis
getdrivers[options]
Options
OptionDescription
-hw<hw-proj|hdf/xmlfile>Hardwareprojectorhardwarespecicationle.
-bsp<bsp_prj|mssfile>BSPprojectormssle.
Returns
Ifsuccessful,thiscommandreturnsnothing.Otherwise,returnsanerror.
Example
ReturnthelistofdriversassignedtotheIPsintheBSP .
getdrivers-hwzc702_hw_platform-bsphello_bsp
setosversion
SetOSversionintheBSP .
Synopsis
setosversion[options]
Options
OptionDescription
-hw<hw-proj|hdf/xmlfile>Hardwareprojectorhardwarespecicationle.
-bsp<bsp_prj|mssfile>BSPprojectormsslecorrespondingtotheOS.
-ver<os-version>VersionoftheOS.DefaultlatestversionofOSisadded.
Returns
Ifsuccessful,thiscommandreturnsnothing.Otherwise,returnsanerror.
Example
SettheOSversion5.4intheBSP .
setosversion-hwzc702_hw_platform-bsphello_bsp–ver5.4
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com60
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
SetthelatestOSversionfromrepointheBSP .
setosversion-hwzc702_hw_platform-bsphello_bsp
getos
ReturnOSdetailsfromtheBSP .
Synopsis
getos[options]
Options
OptionDescription
-hw<hw-proj|hdf/xmlfile>Hardwareprojectorhardwarespecicationle.
-bsp<bsp_prj|mssfile>BSPprojectormssle.
Returns
Ifsuccessful,thiscommandreturnsOSdetails.Otherwise,returnsanerror.
Example
ReturntheOSdetailsintheBSP .
getos-hwzc702_hw_platform-bsphello_bsp
regenbsp
RegeneratetheBSPsources.
Synopsis
regenbsp[options]
Options
OptionDescription
-hw<hw-proj|hdf/xmlfile>Hardwareprojectorhardwarespecicationle.
-bsp<bsp_prj|mssfile>BSPprojectormssle.
Returns
Ifsuccessful,thiscommandreturnsnothing.Otherwise,returnsanerror.
Example
RegeneratetheBSPsourceswiththemodicationdoneintheBSPsettings.
regenbsp–hwZC702_hw_platform–bsphello_bsp
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com61
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
projects
BuildorcleanaBSP/applicationprojectorallprojectsintheworkspace.
Synopsis
projects[options]
Options
OptionDescription
-build|-cleanBuildorcleanprojects.
-type<project-type>Projecttypecanbe:
all
bsp
app
Defaulttypeisall.
-name<project-name>Projectnamethatshouldbebuilt.
Returns
Ifsuccessful,thiscommandreturnsnothing.Otherwise,returnsanerrorifinvalidoptionsare
usedoriftheprojectcan’tbebuilt.
Example
BuildtheBSPproject“hello_bsp
projects-build–typebsp-namehello_bsp
Buildalltheprojectsinthecurrentworkspace.
projects-build
Cleanalltheapplicationprojectsinthecurrentworkspace.
projects-clean-typeapp
Cleanalltheprojectsinthecurrentworkspace.
projects-clean
setws
SetXilinxSDKworkspaceto<path>,forcreatingprojects.If<path>doesn’texist,thenthe
directoryiscreated.If<path>isnotspecied,thenthecurrentdirectoryisused.
Synopsis
setws[options][path]
Options
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com62
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
OptionDescription
-switch<path>Closeexistingworkspaceandswitchtonewworkspace.
Returns
Iftheworkspaceissetsuccessfully,thiscommandreturnsnothing.Returnsanerrorifthe
pathspeciedisale.
Example
Setthecurrentworkspaceto/tmp/wrk/wksp1.
setws/tmp/wrk/wksp1
Closethecurrentworkspaceandswitchtothenew/tmp/wrk/wksp2workspace.
setws–switch/tmp/wrk/wksp2
getws
ReturnthecurrentXilinxSDKworkspace.
Synopsis
getws
Options
None
Returns
Currentworkspace.
Example
ReturnthecurrentXilinxSDKworkspace.
getws
createhw
Createahardwareproject.
Synopsis
createhw[options]
Options
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com63
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
OptionDescription
-name<project-name>Nameoftheprojectthatneedstobecreated.
-hwspec<hardwarespecification
file>Pathtothehardwarespecicationleforcreatinga
hardwareproject.
Returns
Ifthehardwareprojectiscreatedsuccessfully,thiscommandreturnsnothing.Returnsanerror
ifinvalidoptionsareusedoriftheprojectcannotbecreated.
Example
Createahardwareprojectwithnamehw1fromthehardwarespecicationlesystem.hdf.
createhw–namehw1–hwspecsystem.hdf
createbsp
CreateaBSPproject.
Synopsis
createbsp[options]
Options
OptionDescription
-name<project-name>Nameoftheprojectthatneedstobecreated.
-proc<processor-name>ProcessorinstancethatshouldbeusedforcreatingBSP
project.
-hwproject<hardwareprojectname>HWprojectforwhichtheapplicationorbspprojectshould
becreated.
-os<OSname>OStypefortheapplicationproject.Defaulttypeis
standalone.
-mss<MSSfilepath>MSSFilepathforcreatingBSP .Thisoptioncanbeused
forcreatingaBSPfromusermssle.Whenmssleis
specied,thenprocessorandOSoptionswillbeignored
andprocessor/OSdetailsareextractedfromthemssle.
-arch<32|64>Processorarchitecture32or64-bit.Thisoptionisusedto
buildtheprojectwith32/64bittoolchain.Thisisvalidonly
forA53processors,defaultsto32-bitforotherprocessors.
Returns
Nothing,iftheBSPprojectiscreatedsuccessfully.Errorstring,ifinvalidoptionsareused
oriftheprojectcan’tbecreated.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com64
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
Example
CreateaBSPprojectwithnamebsp1fromthehardwareprojecthw1forprocessor
ps7_cortexa9_0.
createbsp–namebsp1–hwprojecthw1–procps7_cortexa9_0
CreateaBSPprojectwithnamebsp1fromthehardwareprojecthw1forprocessor
ps7_cortexa9_0andstandaloneOS.
createbsp–namebsp1–hwprojecthw1–procps7_cortexa9_0–osstandalone
CreateaBSPprojectwithnamebsp1withallthedetailsfromthesystem.mssle.
createbsp–namebsp1–hwprojecthw1–procps7_cortexa9_0–msssystem.mss
CreateaBSPprojectwithnamebsp1forpsu_cortexa53_0usinga32-bittoolchain.
createbsp–namebsp1–hwprojecthw1–procpsu_cortexa53_0–arch32
createapp
Createanapplicationproject.
Synopsis
createapp[options]
Options
OptionDescription
-name<project-name>Nameoftheprojectthatneedstobecreated.
-app<template-application-name>Nameofthetemplateapplication.Defaultis"HelloWorld".
Thisoptionisvalidonlyforcreatingapplicationprojects.
-proc<processor-name>Processorinstancethatshouldbeusedforcreating
application/BSPproject.Thisoptionisvalidonlyfor
creatingapplication/bspprojects.
-hwproject<hardwareprojectname>HWprojectforwhichtheapplicationorbspproject
shouldbecreatedThisoptionisvalidonlyforcreating
application/BSPprojects.
-bsp<BSPprojectname>BSPprojectforwhichtheapplicationprojectshouldbe
created.Thisoptionisvalidonlyforcreatingapplication
projects.Ifthisoptionisnotspecied,adefaultbspis
created.
-os<OSname>OStypefortheapplicationproject.Defaulttypeis
standalone.
-arch<32|64>Processorarchitecture32or64-bit.Thisoptionisusedto
buildtheprojectwith32/64bittoolchain.Thisisvalidonly
forA53processors,defaultsto32-bitforotherprocessors.
-lang<programminglanguage>ProgramminglanguagecanbeCorC++.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com65
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
Returns
Nothing,iftheapplicationprojectiscreatedsuccessfully.Errorstring,ifinvalidoptionsareused
oriftheprojectcan’tbecreated.
Example
CreateaHelloWorldapplicationprojectwithnamehello1forprocessorps7_cortexa9_0.
createapp–namehello1–app{HelloWorld}-bspbsp1–hwprojecthw1–procps7_cortexa9_0
CreateaZynqFSBLprojectwithnamefsbl1andalsocreatesaBSPfsbl1_bspforprocessor
ps7_cortexa9_0anddefaultOSstandalone.
createapp–namefsbl1–app{ZynqFSBL}–hwprojecthw1–procps7_cortexa9_0
CreateanemptyC++applicationprojectwithnamee1.
createapp–namee1–app{EmptyApplication}–hwprojecthw2–procmicroblaze_0–langc++
CreateaHelloWorldapplicationprojectwithnamehello2forprocessorpsu_cortexa53_0
with32-bittoolchain.
createapp–namehello2–app{HelloWorld}–hwprojecthw1–procpsu_cortexa53_0–arch32
importprojects
ImportalltheXilinxSDKprojectsfrom<path>toworkspace.
Synopsis
importprojects<path>
Options
None
Returns
Nothing,iftheprojectsareimportedsuccessfullyErrorstring,ifprojectpathisnotspeciedor
iftheprojectscan’tbeimported.
Example
ImportXilinxSDKproject(s)intothecurrentworkspace.
importprojects/tmp/wrk/wksp1/hello1
importsources
Importsourcesfromapathtoapplicationprojectinworkspace.
Synopsis
importsources[options]
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com66
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
Options
OptionDescription
-name<project-name>ApplicationProjecttowhichthesourcesshouldbe
imported.
-path<source-path>Pathfromwhichthesourcelesshouldbeimported.All
theles/directoriesfromthesourcepathareimported
toapplicationproject.Allexistingsourceleswillbe
overwrittenintheapplication,andnewoneswillbecopied.
Linkerscriptwillnotbecopiedtotheapplicationdirectory.
-linker-scriptCopiesthelinkerscriptaswell.
Returns
Nothing,iftheprojectsourcesareimportedsuccessfullyErrorstring,ifinvalidoptionsareused
oriftheprojectsourcescan’tbeimported.
Example
Importthehello2projectsourcestohello1applicationprojectwithoutthelinkerscript.
importsources–namehello1–path/tmp/wrk/wksp2/hello2
Importthehello2projectsourcestohello1applicationprojectalongwiththelinkerscript.
importsources–namehello1–path/tmp/wrk/wksp2/hello2–linker-script
getprojects
Gethw/bsp/applicationprojectsorallprojectsfromtheworkspace.
Synopsis
getprojects[options]
Options
OptionDescription
-type<project-type>Projecttypecanbe:
all
bsp
app
Defaulttypeisall.
Returns
Listofalltheprojectsoftype<project-type>intheworkspace.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com67
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
Example
Returnthelistofhardwareprojects.
getprojects–typehw
Returnthelistofalltheprojectsavailableinthecurrentworkspace.
getprojects
deleteprojects
Deleteproject(s)fromtheworkspace.
Synopsis
deleteprojects[options]
Options
OptionDescription
-nameProjectname/listtobedeleted.Listofprojectsshouldbe
separatedbysemi-colon{proj1;proj2;proj3}.
-workspace-onlyDeleteprojectfromworkspaceonlyandnotfromdisk.
Defaultoperationistodeleteprojectsfromdisk.
Returns
Nothing,iftheprojectsaredeletedsuccessfullyErrorstring,ifinvalidoptionsareusedorif
theprojectcan’tbedeleted.
Example
Deletethehello1projectfromthedisk.
deleteprojects–namehello1
Deletethehello1projectfromworkspaceonly.
deleteprojects–namehello1–workspace-only
congapp
Listnameanddescriptionforavailablecongurationparametersoftheapplicationprojects.
Synopsis
configapp
configapp[options]-app<app-name><param-name>
configapp[options]-app<app-name>
Options
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com68
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
OptionDescription
-app<app-name>Applicationnameforwhichtheparametershouldbe
congured.
<param-name>Congurationparametername.
-setSetthecongurationparametervaluetonew<value>.
-addAppendthenew<value>tocongurationparameter
value.
-removeRemove<value>fromthecongurationparametervalue.
-infoDisplaysmoreinformationlikepossiblevaluesandpossible
operationsaboutthecongurationparameter.Aparameter
namemustbespeciedwhenthisoptionisused.
Returns
Dependsontheargumentsspecied
<none>-Listofparametersanddescriptionofeachparameter.
<parametername>-Parametervalueorerror,ifunsupportedparameterisspecied.
<parametername><parametervalue>-Nothingifthevalueisset,oranerrorincase
unsupportedparameterisspecied.
Example
Returnthelistofallthecongurableoptionsfortheapplication.
xsct%configapp
assembler-flagsMiscellaneousflagsforassembler
build-configGet/setbuildconfiguration
compiler-miscCompilermiscellaneousflags
compiler-optimizationOptimizationlevel
define-compiler-symbolsDefinesymbols.Ex.MYSYMBOL
include-pathIncludepathforheaderfiles
librariesLibrariestobeaddedwhilelinking
library-search-pathSearchpathforthelibrariesadded
linker-miscLinkermiscellaneousflags
linker-scriptLinkerscriptforlinkingtheprogramsections
undef-compiler-symbolsUndefinesymbols.Ex.MYSYMBOL
Setthecurrentbuildcongurationtorelease.
configapp-apptestbuild-config
AddthedenesymbolFSBL_DEBUG_INFOtobepassedtothecompiler.
configapp-apptestdefine-compiler-symbolsFSBL_DEBUG_INFO
RemovethedenesymbolFSBL_DEBUG_INFOtobepassedtothecompiler.
configapp-apptest–removedefine-compiler-symbolsFSBL_DEBUG_INFO
Appendthe–pgagtocompilermiscags.
configapp-apptestcompiler-misc{-pg}
Setagsspeciedtocompilermisc.
configapp-apptest–setcompiler-misc{-c-fmessage-length=0-MT"$@"}
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com69
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
Displaymoreinformationaboutpossiblevaluesoroperationanddefaultoperationfor
compiler-optimization.
configapp-apptest-infocompiler-optimization
toolchain
Returnalistofavailabletoolchainsandsupportedprocessortypes.
Synopsis
toolchain
toolchain<processor-type>
toolchain<processor-type><tool-chain>
Returns
Dependsontheargumentsspecied
<none>-Listofavailabletoolchainsandsupportedprocessortypes.
<processor-type>-Currenttoolchainforprocessor-type.
<processor-type><tool-chain>-Nothingifthetool-chainisset,orerror,ifunsupported
tool-chainisspecied.
Example
Returnthelistofallsupportedtoolchains.
xsct%toolchain
NameSupportedCPUTypes
=======================
CodeSourceryps7_cortexa9
Linarops7_cortexa9,psu_cortexa53,psu_cortexa53_x32,psu_cortexr5
Xilinxmicroblaze,psu_pmu
HSICommands
XSCTprovideshigherlevelabstractioncommandsforHardwareSoftwareInterface(HSI)
commandsandyounormallydonothavetoruntheHSIcommandsinXSCT.However,ifthere
isaneed,youcanrunHSIcommandsbyprexinghsitoeachHSIcommand.Forexample,
hsiopen_hw_design.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com70
UG1208(v2016.2)June8,2016
Chapter3:XSCTCommands
NOTE:Youcanuseonlyonesetofthecommandsatatimeonanydesign.Interleaving
bothsetsofcommandswillleadtointernalerrors.Forexample,adesignopenedwithhsi
open_hw_designcannotbeclosedusingclosehw.
XSCTkeepstrackoftheopendesigns(bothsoftwareandhardware).Thetablebelowlists
theHSIcommandsandtheircorrespondingXCSTcommands.
HSICommandCorrespondingXSCTCommand
hsiopen_hw_designopenhw
hsiclose_hw_designclosehw
hsiopen_sw_designopenbsp
hsiclose_sw_designclosebsp
AnymodicationsdonetothesoftwaredesignortheBSP ,usingHSIcommands,arestored
inmemory.BeforeusinganyotherXSCTcommands,youshouldruntheupdatemssXSCT
command,toensurethatthesemodicationsarestoredinthe.mssleoftheBSP .
FormoredetailsontheHSIcommandsandtheirusage,refertotheGeneratingBasic
SoftwarePlatformsReferenceGuide(UG1138).
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com71
UG1208(v2016.2)June8,2016
Chapter4
WorkingwithXSCT
AswithXilinxSoftwareDevelopmentKit(XilinxSDK),therststeptouseXilinxSoftware
Command-lineTool(XSCT)involvesselectingaworkspace.Forcreatingandmanagingprojects,
XSCTlaunchesXilinxSDKinbackground.XSCTworkspacescanbeseamlesslyusedwithXilinx
SDKandvice-versa.
NOTE:Atanygivenpointoftime,aworkspacecaneitherbeusedonlyfromXilinxSDKor
XSCT.
Thefollowingisalistofusecasesdescribinghowyoucanusethetooltoperformcommon
tasks:
RunningTclScripts
CreatinganApplicationProjectUsinganApplicationTemplate
ModifyingBSPSettings
ChangingCompilerOptionsofanApplicationProject
AddingLibrariestoBSP
CreatingaBootableImageandProgramtheFlash
SwitchingBetweenXSCTandXilinxSDKDevelopementEnvironment
PerformingStandaloneApplicationDebug
RunninganApplicationinNon-InteractiveMode
DebuggingaProgramAlreadyRunningontheTarget
UsingJTAGUART
DebuggingApplicationsonZynqUltraScale+MPSoC
RunningTclScripts
YoucancreateTclscriptswithXSCTcommandsandruntheminaninteractiveornon-interactive
mode.Intheinteractivemode,youcansourcethescriptatXSCTprompt.Forexample:
xsct%sourcexsct_script.tcl
Inthenon-interactivemode,youcanrunthescriptbyspecifyingthescriptasalaunch
argument.Argumentstothescriptcanfollowthescriptname.Forexample:
$xsctxsct_script.tcl[args]
ThescriptbelowprovidesausageexampleofXSCT.Thisscriptcreatesandbuildsan
application,connectstoaremotehw_server,initializestheZynqPSconnectedtoremote
host,downloadsandexecutestheapplicationonthetarget.Thesecommandscanbeeither
scriptedorruninteractively.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com72
UG1208(v2016.2)June8,2016
Chapter4:WorkingwithXSCT
Samplescript
#SetSDKworkspace
setws/tmp/workspace
#CreateaHWproject
createhw-namehw1-hwspec/tmp/system.hdf
#CreateaBSPproject
createbsp-namebsp1-hwprojecthw1-procps7_cortexa9_0-osstandalone
#Createapplicationproject
createapp-namehello-hwprojecthw1-bspbsp1-procps7_cortexa9_0-osstandalone\
-langC-app{HelloWorld}
#Buildallprojects
projects-build
#Connecttoaremotehw_server
connect-hostraptor-host
#Selectatarget
targets-set-nocase-filter{name=~“ARM*#0}
#SystemReset
rst-system
#PS7initialization
namespaceevalxsdb{source/tmp/workspace/hw1/ps7_init.tcl;ps7_init}
#Downloadtheelf
dow/tmp/workspace/hello/Debug/hello.elf
#Insertabreakpoint@main
bpadd-addr&main
#Continueexecutionuntilthetargetissuspended
con-block-timeout500
#Printthetargetregisters
puts[rrd]
#Resumethetarget
con
CreatinganApplicationProjectUsinganApplication
Template
CreateaFSBLprojectforanCortex®-A53processor.
NOTE:CreatinganapplicationprojectwillcreateaBSPprojectbyaddingthenecessary
libraries.FSBL_DEBUG_DETAILEDsymbolisaddedtoFSBLfordebugmessages.
Commands
setws/tmp/wrk/workspace
createhw–namehw0–hwspec/tmp/wrk/system.hdf
createapp–namefsbl1–app{ZynqMPFSBL}–procpsu_cortexa53_0–hwprojecthw0–osstandalone
configapp–appfsbl1define-compiler-symbolsFSBL_DEBUG_DETAILED
projects–build
ModifyingBSPSettings
BuildaHelloWorldapplicationtotargettheMicroBlaze™processor.TheSTDIN&STDOUTOS
parametersarechangedtousetheMDM_0.
NOTE:OncetheBSPsettingsarechanged,itisnecessarytoupdatethemss&regeneratethe
BSPsourcestoreecttheBSPchangesinthesourcelebeforecompiling.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com73
UG1208(v2016.2)June8,2016
Chapter4:WorkingwithXSCT
Commands
setws/tmp/wrk/workspace
createhw–namehw0–hwspec/tmp/wrk/system_mb.hdf
createapp–namehello–app{HelloWorld}–procmicroblaze_0–hwprojecthw0–osstandalone
configbsp–hwhw0–bsphello_bspstdinmdm_0
configbsp–hwhw0–bsphello_bspstdoutmdm_0
updatemss-hwhw0-msshello_bsp/system.mss
regenbsp-hwhw0-bsphello_bsp
projects–build
ChangingCompilerOptionsofanApplicationProject
CreateanemptyapplicationforCortexA53processor,byaddingthecompileroption
-std=c99.
Commands
setws/tmp/wrk/workspace
createhw–namehw0–hwspec/tmp/wrk/system.hdf
createapp–nametest–app{EmptyApplication}–procpsu_cortexa53_0–hwprojecthw0–osstandalone
importsources-nametest-path/tmp/wrk/testsources/test/
configapp–apptest-addcompiler-misc{-std=c99}
projects–build
AddingLibrariestoBSP
CreateanormalBSPandaddXILFFS&XILRSAlibrariestotheBSP .CreateaFSBLapplication
thereafter.
NOTE:NormalBSPdonotcontainanylibraries.
Commands
setws/tmp/wrk/workspace
createhw–namehw0–hwspec/tmp/wrk/system.hdf
createbsp-namebsp0-procps7_cortexa9_0-hwprojecthw0-osstandalone
setlib-hwhw0-bspbsp0-libxilffs
setlib-hwhw0-bspbsp0-libxilrsa
updatemss-hwhw0-mssbsp0/system.mss
regenbsp-hwhw0-bspbsp0
createapp-namefsbl0-app{ZynqFSBL}-procps7_cortexa9_0-bspbsp0-hwprojecthw0-osstandalone
projects–build
SimilarUsage
ChangingtheOSversion.
setosversion-hwhw0-bspbsp0-ver5.2
AssigningadrivertoanIP .
setdriver-hwhw0-bspbsp0-ipps7_uart_1-drivergeneric
Removingalibrary(removesxilrsalibraryfromBSP).
setdriver-hwhw0-bspbsp0-ipps7_uart_1-drivergeneric
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com74
UG1208(v2016.2)June8,2016
Chapter4:WorkingwithXSCT
CreatingaBootableImageandProgramtheFlash
Createtwoapplications(FSBLandHelloWorld).Further,createabootableimageusingthe
applicationsalongwithbitstreamandprogramtheimageontotheash.
NOTE:Assumingtheboardtobezc702.Hence-flash_typeqspi_singleisusedasan
optioninprogram_flash.
Commands
setws/tmp/wrk/workspace
createhw–namehw0–hwspec/tmp/wrk/system.hdf
createapp-namefsbl-app{ZynqFSBL}-procps7_cortexa9_0-hwprojecthw0-osstandalone
createapp-namehello-app{HelloWorld}-procps7_cortexa9_0-hwprojecthw0-osstandalone
projects–build
execbootgen-archzynq-imageoutput.bif-w-oBOOT.bin
execprogram_flash-f/tmp/wrk/BOOT.bin-flash_typeqspi_single-blank_check-verify-cable\
typexilinx_tcfurltcp:localhost:3121
SwitchingBetweenXSCTandXilinxSDKDevelopment
Environment
CreatetwoapplicationusingXSCTandmodifytheBSPsettings.LaunchtheSDKdevelopment
environmentandselecttheworkspacecreatedusingXSCT,toviewtheupdates.
NOTE:TheworkspacecreatedinXSCTcanbeusedfromXilinxSDK.However,atatime,only
oneinstanceofthetoolcanusetheworkspace.
Commands
setws/tmp/wrk/workspace
createhw–namehw0–hwspec/tmp/wrk/system.hdf
createbsp-namebsp0-procps7_cortexa9_0-hwprojecthw0-osstandalone
createapp-namehello0-app{HelloWorld}-procps7_cortexa9_0-hwprojecthw0-bspbsp0-osstandalone
createapp-namefsbl0-app{ZynqFSBL}-procps7_cortexa9_0-hwprojecthw0-bspbsp0-osstandalone
projects–build
PerformingStandaloneApplicationDebug
XilinxSystemDebuggerCommand-lineInterface(XSDB)canbeusedtodebugstandalone
applicationsononeormoreprocessorcoressimultaneously.Therststepinvolvedin
debuggingistoconnecttohw_serverandselectadebugtarget.Youcannowresetthe
system/processorcore,initializethePSifneeded,programtheFPGA,downloadanelf,set
breakpoints,runtheprogram,examinethestacktrace,viewlocal/globalvariables.
Helpforeachofthexsdbcommandscanbeviewedbyrunning“help<command>”or
“<command>-helpinXSDBconsole.AlltheavailableXSDBcommandscanbelistedby
running“helpcommands”.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com75
UG1208(v2016.2)June8,2016
Chapter4:WorkingwithXSCT
BelowisanexampleXSDBsessionthatdemonstratesstandaloneapplicationdebugonZynq®
-7000APSoC.Commentsbeginwith#.
#connecttoremotehw_serverbyspecifyingitsurl.
#Ifthehardwareisconnectedtoalocalmachine,-urloptionandthe<url>
#arenotneeded.connectcommandreturnsthechannelIDoftheconnection
xsdb%connect-urlTCP:xhdbfarmc7:3121tcfchan#0
#Listavailabletargetsandselectatargetthroughitsid.
#ThetargetsareassignedIDsastheyarediscoveredontheJtagchain,
#sotheIDscanchangefromsessiontosession.
#Fornon-interactiveusage,-filteroptioncanbeusedtoselectatarget,
#insteadofselectingthetargetthroughitsID
xsdb%targets
1APU
2ARMCortex-A9MPCore#0(Running)
3ARMCortex-A9MPCore#1(Running)
4xc7z020
xsdb%targets2
#ResetthesystembeforeinitializingthePSandconfiguringtheFPGA
xsdb%rst
#Infomessagesaredisplayedwhenthestatusofacorechanges
Info:ARMCortex-A9MPCore#0(target2)Stoppedat0xfffffe1c(Suspended)
Info:ARMCortex-A9MPCore#1(target3)Stoppedat0xfffffe18(Suspended)
#ConfiguretheFPGA.WhentheactivetargetisnotaFPGAdevice,
#thefirstFPGAdeviceisconfigured
xsdb%fpgaZC702_HwPlatform/design_1_wrapper.bit
100%3MB1.8MB/s00:02
#Runloadhwcommandtomakethedebuggerawareoftheprocessorcores’memorymap
xsdb%loadhwZC702_HwPlatform/system.hdf
design_1_wrapper
#Sourcetheps7_init.tclscriptandrunps7_initandps7_post_configcommands
xsdb%sourceZC702_HwPlatform/ps7_init.tcl
xsdb%ps7_init
xsdb%ps7_post_config
#Downloadtheapplicationprogram
xsdb%dowdhrystone/Debug/dhrystone.elf
DownloadingProgram--dhrystone/Debug/dhrystone.elf
section,.text:0x00100000-0x001037f3
section,.init:0x001037f4-0x0010380b
section,.fini:0x0010380c-0x00103823
section,.rodata:0x00103824-0x00103e67
section,.data:0x00103e68-0x001042db
section,.eh_frame:0x001042dc-0x0010434f
section,.mmu_tbl:0x00108000-0x0010bfff
section,.init_array:0x0010c000-0x0010c007
section,.fini_array:0x0010c008-0x0010c00b
section,.bss:0x0010c00c-0x0010e897
section,.heap:0x0010e898-0x0010ec9f
section,.stack:0x0010eca0-0x0011149f
100%0MB0.3MB/s00:00
SettingPCtoProgramStartAddress0x00100000
Successfullydownloadeddhrystone/Debug/dhrystone.elf
#Setabreakpointatmain()
xsdb%bpadd-addr&main
0
#Resumetheprocessorcore
xsdb%con
#Infomessageisdisplayedwhenthecorehitsthebreakpoint
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com76
UG1208(v2016.2)June8,2016
Chapter4:WorkingwithXSCT
xsdb%Info:ARMCortex-A9MPCore#0(target2)Stoppedat0x1005a4(Breakpoint)
#Registerscanbeviewedwhenthecoreisstopped
xsdb%rrd
r0:00000000r1:00000000r2:0010e898r3:001042dc
r4:00000003r5:0000001er6:0000ffffr7:f8f00000
r8:00000000r9:ffffffffr10:00000000r11:00000000
r12:0010fc90sp:0010fca0lr:001022d8pc:001005a4
cpsr:600000dfusrfiqirq
abtundsvcmon
vfpcp15Jazelle
#Memorycontentscanbedisplayed
xsdb%mrd0xe000d000
E000D000:800A0000
#Localvariablescanbeviewed
xsdb%locals
Int_1_Loc:1113232
Int_2_Loc:30
Int_3_Loc:0
Ch_Index:0
Enum_Loc:0
Str_1_Loc:char[31]
Str_2_Loc:char[31]
Run_Index:1061232
Number_Of_Runs:2
#Localvariablevaluecanbemodified
xsdb%localsNumber_Of_Runs100
xsdb%localsNumber_Of_Runs
Number_Of_Runs:100
#Globalvariablesandbedisplayed,anditsvaluecanbemodified
xsdb%printInt_Glob
Int_Glob:0
xsdb%print-setInt_Glob23
xsdb%printInt_Glob
Int_Glob:23
#Expressionscanbeevaluatedanditsvaluecanbedisplayed
xsdb%printInt_Glob+1*2
Int_Glob+1*2:25
#Stepoveralineofsourcecode
xsdb%nxt
Info:ARMCortex-A9MPCore#0(target2)Stoppedat0x1005b0(Step)
#Viewstacktrace
xsdb%bt
00x1005b0main()+12:../src/dhry_1.c,line91
10x1022d8_start()+88
2unknown-pc
#Setabreakpointatexitandresumeexecution
xsdb%bpadd-addr&exit
1
xsdb%con
Info:ARMCortex-A9MPCore#0(target2)Running
xsdb%Info:ARMCortex-A9MPCore#0(target2)Stoppedat0x103094(Breakpoint)
xsdb%bt
00x103094exit()
10x1022e0_start()+96
2unknown-pc
WhileaprogramisrunningonA9#0,userscandownloadanotherelfontoA9#1anddebug
it,usingsimilarsteps.Notethat,it’snotnecessarytore-connecttothehw_server,initializethe
PSorconguretheFPGAinsuchcases.UserscanjustselectA9#1targetanddownloadthe
elfandcontinuewithfurtherdebug.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com77
UG1208(v2016.2)June8,2016
Chapter4:WorkingwithXSCT
RunninganApplicationinNon-InteractiveMode
XilinxSystemDebuggerCommand-lineInterface(XSDB)providesascriptableinterfacetorun
applicationsinnon-interactivemode.Toruntheprograminpreviousexampleusingascript,
createatclscript(andnameitas,forexample,test.tcl)withthefollowingcommands.The
scriptcanberunbypassingitasalaunchargumenttoxsdb.
connect-urlTCP:xhdbfarmc7:3121
#SelectthetargetwhosenamestartswithARMandendswith#0.
#OnZynq,thisselects“ARMCortex-A9MPCore#0”
targets-set-filter{name=~"ARM*#0"}
rst
fpgaZC702_HwPlatform/design_1_wrapper.bit
loadhwZC702_HwPlatform/system.hdf
sourceZC702_HwPlatform/ps7_init.tcl
ps7_init
ps7_post_config
dowdhrystone/Debug/dhrystone.elf
#Setabreakpointatexit
bpadd-addr&exit
#Resumeexecutionandblockuntilthecorestops(duetobreakpoint)
#oratimeoutof5secisreached
con-block-timeout5
DebuggingaProgramAlreadyRunningontheTarget
XilinxSystemDebuggerCommand-lineInterface(XSDB)canbeusedtodebugaprogram
whichisalreadyrunningonthetarget(forexample,bootingfromash).Userswillneedto
connecttothetargetandsetthesymbollefortheprogramrunningonthetarget.This
methodcanalsobeusedtodebugLinuxkernelbootingfromash.Forbestresults,thecode
runningonthetargetshouldbecompiledwithdebuginfo.
Belowisanexampleofdebuggingaprogramalreadyrunningonthetarget.Fordemopurpose,
theprogramhasbeenstoppedatmain(),beforethisexamplesession.
#Connecttohw_server
xsdb%conn-urlTCP:xhdbfarmc7:3121
tcfchan#0
xsdb%Info:ARMCortex-A9MPCore#0(target2)Stoppedat0x1005a4(HardwareBreakpoint)
xsdb%Info:ARMCortex-A9MPCore#1(target3)Stoppedat0xfffffe18(Suspended)
#Selectthetargetonwhichtheprogramisrunningandspecifythesymbolfileusingthe
#memmapcommand
xsdb%targets2
xsdb%memmap-filedhrystone/Debug/dhrystone.elf
#Oncethesymbolfileisspecified,thedebuggermapsthecodeonthetargettothesymbol
#file.btcommandcanbeusedtoseethebacktrace.Furtherdebugispossible,asshownin
#thefirstexample
xsdb%bt
00x1005a4main():../src/dhry_1.c,line79
10x1022d8_start()+88
2unknown-pc
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com78
UG1208(v2016.2)June8,2016
Chapter4:WorkingwithXSCT
UsingJTAGUART
XilinxSystemDebuggerCommand-lineInterface(XSDB)supportsvirtualUARTthroughJtag,
whichisusefulwhenthephysicalUartdoesn’texistorisnon-functional.TouseJtagUART,the
SWapplicationshouldbemodiedtoredirectSTDIOtotheJtagUART.XilinxSDKprovidesa
CoreSightdrivertosupportredirectingofSTDIOtovirtualUart,onARMbaseddesigns.For
MBdesigns,theuartlitedrivercanbeused.TousethevirtualUartdriver,openboardsupport
settingsinXilinxSDKandcanchangeSTDIN/STDOUTtocoresight/mdm.
XSDBsupportsvirtualUARTthroughtwocommands.
jtagterminal-Start/StopJtagbasedhyper-terminal.Thiscommandopensanew
terminalwindowforSTDIO.ThetextinputfromthisterminalwillbesenttoSTDINand
anyoutputfromSTDOUTwillbedisplayedonthisterminal.
readjtaguart-Start/StopreadingfromJtagUart.ThiscommandstartspollingSTDOUT
foroutputanddisplaysinonXSDBterminalorredirectsittoale.
UsingJTAGterminalforSTDIO
connect
sourceps7_init.tcl
targets-set-filter{name=~"APU"}
loadhwsystem.hdf
stop
ps7_init
targets-set-nocase-filter{name=~"ARM*#0"}
rst–processor
dow<app>.elf
jtagterminal
con
jtagterminal-stop#afteryouaredone
UsingXSDBconsoleasSTDOUTforJTAGUART
connect
sourceps7_init.tcl
targets-set-filter{name=~"APU"}
loadhwsystem.hdf
stop
ps7_init
targets-set-nocase-filter{name=~"ARM*#0"}
rst–processor
dow<app>.elf
readjtaguart
con
readjtaguart-stop#afteryouaredone
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com79
UG1208(v2016.2)June8,2016
Chapter4:WorkingwithXSCT
RedirectingSTDOUTfromJTAGUARTtoale
connect
sourceps7_init.tcl
targets-set-filter{name=~"APU"}
loadhwsystem.hdf
stop
ps7_init
targets-set-nocase-filter{name=~"ARM*#0"}
rst–processor
dow<app>.elf
setfp[openuart.logw]
readjtaguart-handle$fp
con
readjtaguart-stop#afteryouaredone
DebuggingApplicationsonZynqUltraScale+MPSoC
NOTE:Forsimplicity,thishelppageassumesthatZynq®UltraScale+™MPSoCbootsup
inJTAGbootmode.Theowdescribedherecanbeappliedtootherbootmodestoo,with
minorchanges.
WhenZynqUltraScale+MPSoCbootsupJTAGbootmode,alltheA53andR5coresareheldin
reset.Usersmustclearresetsoneachcore,beforedebuggingonthesecores.’rst’commandin
XSDBcanbeusedtocleartheresets.’rst-processorclearsresetonanindividualprocessor
core.’rst-cores’clearsresetsonalltheprocessorcoresinthegroup(ex.APUorRPU),ofwhich
thecurrenttargetisachild.Forexample,whenA53#0isthecurrenttarget,rst-coresclears
resetsonalltheA53coresinAPU.
BelowisanexampleXSDBsessionthatdemonstratesstandaloneapplicationdebugonA53#0
coreonZynqUltraScale+MPSoC.
NOTE:SimilarstepscanbeusedfordebuggingapplicationsonR5coresandalsoonA53
coresin32bitmode.However,theA53coresmustbeputin32bitmode,beforedebugging
theapplications.ThisshouldbedoneafterPORandbeforetheA53resetsarecleared.
#connecttoremotehw_serverbyspecifyingitsurl.
Ifthehardwareisconnectedtoalocalmachine,-urloptionandthe<url>
arenotneeded.connectcommandreturnsthechannelIDoftheconnection
xsdb%connect-urlTCP:xhdbfarmc7:3121
tcfchan#0
#Listavailabletargetsandselectatargetthroughitsid.
ThetargetsareassignedIDsastheyarediscoveredontheJtagchain,
sotheIDscanchangefromsessiontosession.
Fornon-interactiveusage,-filteroptioncanbeusedtoselectatarget,
insteadofselectingthetargetthroughitsID
xsdb%targets
1PSTAP
2PMU
3MicroBlazePMU(Sleeping.Noclock)
4PL
5PSU
6RPU(Reset)
7Cortex-R5#0(RPUReset)
8Cortex-R5#1(RPUReset)
9APU(L2CacheReset)
10Cortex-A53#0(APUReset)
11Cortex-A53#1(APUReset)
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com80
UG1208(v2016.2)June8,2016
Chapter4:WorkingwithXSCT
12Cortex-A53#2(APUReset)
13Cortex-A53#3(APUReset)
xsdb%targets5
#ConfiguretheFPGA.WhentheactivetargetisnotaFPGAdevice,
thefirstFPGAdeviceisconfigured
xsdb%fpgaZCU102_HwPlatform/design_1_wrapper.bit
100%36MB1.8MB/s00:24
#Sourcethepsu_init.tclscriptandrunpsu_initcommandtoinitializePS
xsdb%sourceZCU102_HwPlatform/psu_init.tcl
xsdb%psu_init
#PS-PLpowerisolationmustberemovedandPLresetmustbetoggled,
beforethePLaddressspacecanbeaccessed
#Somedelayisneededbetweenthesesteps
xsdb%after1000
xsdb%psu_ps_pl_isolation_removal
xsdb%after1000
xsdb%psu_ps_pl_reset_config
#SelectA53#0andclearitsreset
#Todebug32bitapplicationsonA53,A53coremustbeconfigured
tobootin32bitmode,beforetheresetsarecleared
#32bitmodecanbeenabledthroughCONFIG_0registerinAPUmodule.
SeeZynqMPTRMfordetailsaboutthisregister
xsdb%targets10
xsdb%rst-processor
#Downloadtheapplicationprogram
xsdb%dowdhrystone/Debug/dhrystone.elf
DownloadingProgram--dhrystone/Debug/dhrystone.elf
section,.text:0xfffc0000-0xfffd52c3
section,.init:0xfffd5300-0xfffd5333
section,.fini:0xfffd5340-0xfffd5373
section,.note.gnu.build-id:0xfffd5374-0xfffd5397
section,.rodata:0xfffd5398-0xfffd6007
section,.rodata1:0xfffd6008-0xfffd603f
section,.data:0xfffd6040-0xfffd71ff
section,.eh_frame:0xfffd7200-0xfffd7203
section,.mmu_tbl0:0xfffd8000-0xfffd800f
section,.mmu_tbl1:0xfffd9000-0xfffdafff
section,.mmu_tbl2:0xfffdb000-0xfffdefff
section,.init_array:0xfffdf000-0xfffdf007
section,.fini_array:0xfffdf008-0xfffdf047
section,.sdata:0xfffdf048-0xfffdf07f
section,.bss:0xfffdf080-0xfffe197f
section,.heap:0xfffe1980-0xfffe397f
section,.stack:0xfffe3980-0xfffe697f
100%0MB0.4MB/s00:00
SettingPCtoProgramStartAddress0xfffc0000
Successfullydownloadeddhrystone/Debug/dhrystone.elf
#Setabreakpointatmain()
xsdb%bpadd-addr&main
0
#Resumetheprocessorcore
xsdb%con
#Infomessageisdisplayedwhenthecorehitsthebreakpoint
Info:Cortex-A53#0(target10)Running
xsdb%Info:Cortex-A53#0(target10)Stoppedat0xfffc0d5c(Breakpoint)
#Registerscanbeviewedwhenthecoreisstopped
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com81
UG1208(v2016.2)June8,2016
Chapter4:WorkingwithXSCT
xsdb%rrd
r0:0000000000000000r1:0000000000000000r2:0000000000000000
r3:0000000000000004r4:000000000000000fr5:00000000ffffffff
r6:000000000000001cr7:0000000000000002r8:00000000ffffffff
r9:0000000000000000r10:0000000000000000r11:0000000000000000
r12:0000000000000000r13:0000000000000000r14:0000000000000000
r15:0000000000000000r16:0000000000000000r17:0000000000000000
r18:0000000000000000r19:0000000000000000r20:0000000000000000
r21:0000000000000000r22:0000000000000000r23:0000000000000000
r24:0000000000000000r25:0000000000000000r26:0000000000000000
r27:0000000000000000r28:0000000000000000r29:0000000000000000
r30:00000000fffc1f4csp:00000000fffe5980pc:00000000fffc0d5c
cpsr:600002cdvfpsys
#Localvariablescanbeviewed
xsdb%locals
Int_1_Loc:1113232
Int_2_Loc:30
Int_3_Loc:0
Ch_Index:0
Enum_Loc:0
Str_1_Loc:char[31]
Str_2_Loc:char[31]
Run_Index:1061232
Number_Of_Runs:2
#Localvariablevaluecanbemodified
xsdb%localsNumber_Of_Runs100
xsdb%localsNumber_Of_Runs
Number_Of_Runs:100
#Globalvariablesandbedisplayed,anditsvaluecanbemodified
xsdb%printInt_Glob
Int_Glob:0
xsdb%print-setInt_Glob23
xsdb%printInt_Glob
Int_Glob:23
#Expressionscanbeevaluatedanditsvaluecanbedisplayed
xsdb%printInt_Glob+1*2
Int_Glob+1*2:25
#Stepoveralineofsourcecode
xsdb%nxt
Info:Cortex-A53#0(target10)Stoppedat0xfffc0d64(Step)
#Viewstacktrace
xsdb%bt
00xfffc0d64main()+8:../src/dhry_1.c,line79
10xfffc1f4c_startup()+84:xil-crt0.S,line110
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com82
UG1208(v2016.2)June8,2016
AppendixA
AdditionalResourcesandLegalNotices
XilinxResources
ForsupportresourcessuchasAnswers,Documentation,Downloads,andForums,seeXilinx
Support.
SolutionCenters
SeetheXilinxSolutionCentersforsupportondevices,softwaretools,andintellectual
propertyatallstagesofthedesigncycle.Topicsincludedesignassistance,advisories,and
troubleshootingtips.
PleaseRead:ImportantLegalNotices
Theinformationdisclosedtoyouhereunder(the“Materials”)isprovidedsolelyfortheselection
anduseofXilinxproducts.Tothemaximumextentpermittedbyapplicablelaw:(1)Materials
aremadeavailable"ASIS"andwithallfaults,XilinxherebyDISCLAIMSALLWARRANTIES
ANDCONDITIONS,EXPRESS,IMPLIED,ORSTATUTORY,INCLUDINGBUTNOTLIMITEDTO
WARRANTIESOFMERCHANTABILITY,NON-INFRINGEMENT,ORFITNESSFORANYPARTICULAR
PURPOSE;and(2)Xilinxshallnotbeliable(whetherincontractortort,includingnegligence,
orunderanyothertheoryofliability)foranylossordamageofanykindornaturerelated
to,arisingunder,orinconnectionwith,theMaterials(includingyouruseoftheMaterials),
includingforanydirect,indirect,special,incidental,orconsequentiallossordamage(including
lossofdata,prots,goodwill,oranytypeoflossordamagesufferedasaresultofanyaction
broughtbyathirdparty)evenifsuchdamageorlosswasreasonablyforeseeableorXilinx
hadbeenadvisedofthepossibilityofthesame.Xilinxassumesnoobligationtocorrectany
errorscontainedintheMaterialsortonotifyyouofupdatestotheMaterialsortoproduct
specications.Youmaynotreproduce,modify,distribute,orpubliclydisplaytheMaterials
withoutpriorwrittenconsent.Certainproductsaresubjecttothetermsandconditions
ofXilinx’slimitedwarranty,pleaserefertoXilinx’sTermsofSalewhichcanbeviewedat
www.xilinx.com/legal.htm#tos;IPcoresmaybesubjecttowarrantyandsupporttermscontained
inalicenseissuedtoyoubyXilinx.Xilinxproductsarenotdesignedorintendedtobefail-safe
orforuseinanyapplicationrequiringfail-safeperformance;youassumesoleriskandliability
foruseofXilinxproductsinsuchcriticalapplications,pleaserefertoXilinx’sTermsofSalewhich
canbeviewedatwww.xilinx.com/legal.htm#tos.
©Copyright2016Xilinx,Inc.Xilinx,theXilinxlogo,Artix,ISE,Kintex,Spartan,Virtex,Vivado,
Zynq,andotherdesignatedbrandsincludedhereinaretrademarksofXilinxintheUnitedStates
andothercountries.Allothertrademarksarethepropertyoftheirrespectiveowners.
XilinxSoftwareCommand-LineTool(XSCT)www.xilinx.com83
UG1208(v2016.2)June8,2016

Navigation menu