Vitis IDE 无效参数 [英] Vitis IDE invalid arguments

查看:77
本文介绍了Vitis IDE 无效参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 xsct 控制台上使用 TCL 脚本创建启动映像.但得到错误.我找不到哪里出错了.我在 Xilinx 的文档和其他论坛中找不到任何结果.

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.

错误:源/home/nmi/Desktop/load.tcl

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

推荐答案

假设您已将相关文件的内容提供给我们,那么最初的问题是我们不知道是哪个命令引发了错误.Tcl 确实知道该信息并在错误信息堆栈跟踪中报告它,但是运行 source 的代码忽略了这些内容,只说即时错误消息.

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.

我们想要做的是在外面包裹一些额外的代码.如果你在里面使用 Tcl 8.6,你可以很容易地做到这一点:

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
}

使用 8.5,您会这样做:

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
}

这篇关于Vitis IDE 无效参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆