This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CC3235SF:使用 MSYS_NO_PATHCONV = 1时 ImageCreator 编程工具的文件路径格式错误

Guru**** 657980 points
Other Parts Discussed in Thread: UNIFLASH, CC3235SF
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/wi-fi-group/wifi/f/wi-fi-forum/1247377/cc3235sf-wrong-file-path-format-for-imagecreator-programming-tool-using-msys_no_pathconv-1

器件型号:CC3235SF
主题中讨论的其他器件:UNIFLASH

您好! 通常、我会 使用类似这样的 bash 脚本对 MCU 进行编程:

File=(*.bin)        #gives something like: "/c/Path/File.bin"

ImageCreatorPath/SLImageCreator.exe project \
add_file --name $ProjName --overwrite --file $File \
--mcu --flags secure,publicwrite --sign $File.signed --cert $Cert

非常有用。 但 目前、为了避免出现错误和警告、我必须 在脚本中使用 MSYS_NO_PATHCONV=1、这会 在"类 Unix "和 Windows 环境之间删除自动路径转换。

export MSYS_NO_PATHCONV=1

File=(*.bin)        #gives something like: "C:/Path/File.bin"

ImageCreatorPath/SLImageCreator.exe project \
add_file --name $ProjName --overwrite --file $File \
--mcu --flags secure,publicwrite --sign $File.signed --cert $Cert

这不会给出错误或任何故障指示、它甚至在工程中显示正确的.bin 文件。但它不会输出"MCU 已成功添加到工程中"、并且不起作用。
我希望它能够与以下任一种产品配合使用:

File=${File//"C:/"/"/c/"}       #gives something like: "/c/Path/File.bin"

# would be the same input as the one that worked.
# (if the tool it self does the conversion)

File=${File//"/"/"\"}       #gives something like: "C:\Path\File.bin"

# Is the standard windows path format
# (if this is what the auto conversion would have done to the input)

File=${File//"/"/"\\"}       #gives something like: "C:\\Path\\File.bin"

# If the "\" needed to be "escaped"

但没有任何效果。 相反、我收到这样的错误:

Traceback (most recent call last):
  File "<string>", line 5266, in <module>
  File "<string>", line 5262, in main
  File "<string>", line 5232, in cmdline
  File "<string>", line 4204, in command_project_add_file
  File "<string>", line 3682, in set_mcu_image
  File "<string>", line 3561, in add_fs_file
IOError: [Errno 2] No such file or directory: '/c/Path/File.bin'
SLImageCreator returned -1

正确的格式是什么? 或者、我能否以某种方式打开转换仍处于启用状态(尝试和失败)的子外壳? 或者是否有我不知道的其他解决方案?
提前感谢!

此致
大卫

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    您能解释一下您正在使用什么机器吗? Windows 是否运行 Linux 仿真? 什么类型?

    您希望将文件翻译为 "C:/Path/File.bin "格式? 它似乎可以执行此操作、但您仍然无法看到文件已添加?

    什洛米

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    我在 Windows 10计算机上使用 git bash、因此它不是虚拟机或完整的 Linux 环境。 我可以在 Uniflash 项目中看到添加了一个文件、但它未在 CC3235SF 上运行软件。

    如果我保持原样、会显示"C:/Path/File.bin "、也就是我发现问题的时候。 然后、我希望"C:\Path\File.bin"能够正常工作、但没有成功。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    这是一个完全不相关的问题。 基本上、它与"C:/Path/File.bin "一起使用、还有其他阻止软件正确安装的条件。

    感谢您的帮助!

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    感谢 David 的更新。