主题中讨论的其他器件: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
正确的格式是什么? 或者、我能否以某种方式打开转换仍处于启用状态(尝试和失败)的子外壳? 或者是否有我不知道的其他解决方案?
提前感谢!
此致
大卫