Vitis IDE invalid arguments

别等时光非礼了梦想. 提交于 2020-07-10 10:29:06

问题


I'm trying to create a boot image with TCL script on xsct console. But getting error. I couldn't find where I made a mistake. I couldn't find any results in Xilinx's documents and other forums.

ERROR: source /home/nmi/Desktop/load.tcl

Invalid arguments, name or processor not specified

setws /home/nmi/workspace
platform active zc702
app create -name fsbl -hw /home/nmi/Desktop/projeHDF/base_zynq_wrapper.xsa proc ps7_cortexa9_0 -os standalone -template {Zynq FSBL}
app build -name fsbl
exec bootgen -arch zynq -image /home/nmi/workspace/FSBL_system/_ide/bootimage/FSBL_system.bif -w -o BOOT.bin

回答1:


Assuming you've given us the content of the file in question, the initial issue is that we don't know which command is throwing the error. Tcl does know that information and reports it in the error-info stack trace, but the code that runs the source is ignoring that stuff and only saying the immediate error message.

We can fix that.

What we want to do is to wrap some extra code around the outside. If you're using Tcl 8.6 inside there, you can do this easily:

try {
    # The original code in the file goes in here
} on error {msg opts} {
    puts stderr "ERROR: $msg"

    # Let's put a nice double underline next
    puts stderr [string repeat "=" [string length "ERROR: $msg"]]

    # And now, we print out the error info stack trace
    puts stderr [dict get $opts -errorinfo]

    # Raise the error again; this isn't the properly right way to do it, but it works
    # and the stuff that gets lost is about to be thrown away by the caller
    error $msg
}

With 8.5, you'd instead do:

if {[catch {
    # The original code in the file goes in here
} msg]} then {
    puts stderr "ERROR: $msg"

    # Let's put a nice double underline next
    puts stderr [string repeat "=" [string length "ERROR: $msg"]]

    # And now, we print out the error info stack trace
    puts stderr $::errorInfo

    # Raise the error again
    error $msg
}

Once you know which command is failing, you can look up what the command requires and figure out how things are going wrong.


Here's the full example of what I mean.

try {
    setws /home/nmi/workspace
    platform active zc702
    app create -name fsbl -hw /home/nmi/Desktop/projeHDF/base_zynq_wrapper.xsa proc ps7_cortexa9_0 -os standalone -template {Zynq FSBL}
    app build -name fsbl
    exec bootgen -arch zynq -image /home/nmi/workspace/FSBL_system/_ide/bootimage/FSBL_system.bif -w -o BOOT.bin
} on error {msg opts} {
    puts stderr "ERROR: $msg"
    puts stderr [string repeat "=" [string length "ERROR: $msg"]]
    puts stderr [dict get $opts -errorinfo]
    error $msg
}


来源:https://stackoverflow.com/questions/62258258/vitis-ide-invalid-arguments

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!