【问题标题】:Vitis IDE invalid argumentsVitis IDE 无效参数
【发布时间】:2020-06-08 08:46:41
【问题描述】:

我正在尝试在 xsct 控制台上使用 TCL 脚本创建启动映像。但是出现错误。我找不到我犯错的地方。我在 Xilinx 的文档和其他论坛中找不到任何结果。

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

未指定无效参数、名称或处理器

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

【问题讨论】:

  • load.tcl的内容吗?
  • 是的,多纳尔。我正在使用文本编辑器来编写命令。并 load.tcl 我的脚本源。
  • 我已经写了如何找到故障,我认为这是一个普遍有用的东西。一旦你发现真正的问题是什么,你将不得不做更多的侦探工作......但是由于系统会告诉你“问题出在 this 命令中”,所以不应该太难。我希望!

标签: sdk tcl xilinx vivado


【解决方案1】:

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

我们可以解决这个问题。

我们想要做的是在外面包裹一些额外的代码。如果您在那里使用 Tcl 8.6,您可以轻松地做到这一点:

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,您应该这样做:

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
}

一旦您知道哪个命令失败了,您就可以查看该命令的要求并找出问题所在。


这是我的意思的完整示例。

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
}

【讨论】:

  • 谢谢多纳尔。我需要更改“应用程序创建”部分猜测。执行从“app create -name fsbl -hw /home/nmi/Desktop/projeHDF”中调用的“错误“未指定无效参数、名称或处理器”(过程“app”第 180 行)时未指定无效参数、名称或处理器/base_zynq_wrapper.xsa proc ps7_cortexa9_0 -os Standalone -template {Zynq FSBL}" 参数无效,未指定名称或处理器
  • 不幸的是,这是您正在使用的工具系统添加的命令,并且不是标准 Tcl 核心命令集的一部分。因此,“查阅文档”是我能提供的所有帮助。你可能比我更容易获得它的文档;我真的只是在猜测……(我使用的硬件有一个完全不同的工具链,其中很多都是内部开发的。)
猜你喜欢
  • 2020-08-28
  • 1970-01-01
  • 2016-07-07
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多