完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我正在尝试为PSoC程序员创建一个脚本来编写CY8C4248LQQI-BL43。我需要能够通过调用N.labview中的一个可执行程序来编程这个部分,这看起来是最简单的选择。我遇到了两个问题:
1)命令行接口(CLI)指南中的表1-1指示“程序”功能仅在PSoC 1设备上工作,而对于PSoC4,我看不到类似的命令。也就是说,如果我运行CLI解释器,程序函数就会出现在我的设备上。什么是正确的编程和验证PSoC 4设备的方法? 2)在CLI指南的第1.4部分“返回值”中,有一个关于“分析”返回(状态)值的讨论,但是文档中的或以后的示例中没有一个实例描述了如何在脚本中这样做。你应该如何检查返回状态和改变脚本的流程?或者,您应该在每次启动时只执行一个命令来执行CLI解释器,并在DOS批处理文件中处理返回的状态吗?举例说明这是如何实现的,这将有很大帮助。 以上来自于百度翻译 以下为原文 I'm trying to create a script for PSoC Programmer to program a CY8C4248LQQI-BL483. I need to be able to program the part by calling an executable from N.I Labview and this looked like the simplest option. I'm running into two issues: 1) Table 1-1 in the Command-Line Interface (CLI) Guide indicates that the "Program" function only works on PSoC 1 devices and I don't see a similar command for PSoC4. That said if I run the CLI interpreter the Program function appears to work on my device. What is the correct method for programming and verifying a PSoC 4 device? 2) In section 1.4 "Return Values" of the CLI Guide there is a discussion about "analyzing" return (status) values but none of the examples there or later in the document actually describe how to do this within a script. How are you supposed to check returned statuses and change the flow of the script? Or are you supposed to execute the CLI interpreter with only one command per launch and process the returned status in a DOS batch file? And example or two showing how this is expected to be accomplished would help greatly. |
|
相关推荐
3个回答
|
|
嗨,兰斯,
下面的KBA是FYI。 通过CLI—KBA218846在PSoC 4用户闪存部分中写入数据 谢谢, 赖安 以上来自于百度翻译 以下为原文 Hi Lance, The KBA below is FYI. Write Data in PSoC 4 User Flash Section through CLI - KBA218846 Thanks, Ryan |
|
|
|
抱歉,我不太清楚,但是我想做的是用PSoC Creator的精灵或.sREC文件从一个命令行或脚本运行的方式来编程Flash。我们所面临的主要问题是CLI文档似乎没有提供关于基于解释器的输出更改脚本中的控制流的任何指导。 CLI指南中的第1.4段指出,人们应该“分析返回值……”,但在该文档中没有描述这样做的机制。 1.4个返回值大多数PSoC程序员CLI函数返回一个显示函数名和状态或错误的字符串表示的状态。其他函数返回字符串或空格值。建议在处理返回的参数或移动到下一个函数之前,分析返回值。如果函数失败,某些参数可能保持在未初始化状态。处理这些参数可能会导致异常或运行时错误。所有CLI API都返回一个否定或正整数来指示成功或失败:“0”或“大于”=成功示例:“验证”和“7.57662”,“0”OK“负整数”=失败的PSoC程序员命令行接口(CLI)指南,DOC。1月1日至16300年。* P 10概览示例:E获取返回- 3 OK 似乎CLI也没有提供任何简单的命令来“编程”PSoC 4设备。在Flash中有一个命令写一行,但我没有看到任何方法来添加一个控制循环,允许写入整个闪存。最后,正如我可以告诉的那样,Perl命令集不包含任何对PSoC 4设备的任何东西。 底线是,我需要一种将PSoC Creator(.ELF,SREC,或.HEX)生成的程序传送到PSoC 4设备,该设备可以从命令行(与GUI)运行。优选地,这将利用MixPrim3程序员,因为我们已经获得了其中的几个,并将它们合并到定制编程夹具中,因为预期这将起作用。 矛 以上来自于百度翻译 以下为原文 Sorry, I wasn't clearer but all I want to do is program the Flash with the .elf or .srec file from PSoC Creator in a manner that can be run from a command line or script. The main issue we are having is that the CLI documentation doesn't appear to provide any guidance on changing the control flow in a script based on the output from the interpreter. Paragraph 1.4 in the CLI Guide states that one should "analyze the return values..." yet no mechanism is described in that document for doing so. 1.4 Return Values Most PSoc Programmer CLI functions return a status that shows the function name and a string representation of the status or error. Other functions return a string or void value. It is recommended that you analyze the return values before processing the returned parameters or moving to the next function. If a function fails, some parameters may remain in an uninitialized state. Processing these parameters may cause an exception or runtime error. All CLI APIs return either a negative or positive integer to indicate success or failure: ■ 0 or greater = Success Example: Verify < 7.57662 0 OK ■ Negative integer = Failed PSoC Programmer Command-Line Interface (CLI) Guide, Doc. # 001-16300 Rev. *P 10 Overview Example: E Acquire returned –3 OK It also appears that the CLI doesn't provide any simple command to "program" a PSoC 4 device. There is a command to write a single row in the Flash but I don't see any way to add a control loop that would allow writing to the entire Flash. Finally as near as I can tell the Perl command set doesn't include anything for PSoC 4 devices. The bottom line is I need a way to transfer a program generated by PSoC Creator (.elf, srec, or .hex) to a PSoC 4 device that can be run from a command line (vs a GUI). Preferably this would utilize the MiniProg3 programmer as we have acquired several of these and have incorporated them into a custom programming fixture due to the expectation that this would work. -lance |
|
|
|
xinxin52717 发表于 2018-11-16 07:34 嗨,兰斯, 我再次阅读了你的主题并思考…也许CLI不是LabVIEW接口应该使用的……另一个KBA是FYI。 用LabVIEW软件-KBA218796编程KITPRO2/MIXPROP3 如果它能帮助你走出困境。你遇到的CLI问题应该不那么重要… 谢谢, 赖安 以上来自于百度翻译 以下为原文 Hi Lance, I read your topic again and think...maybe CLI is not what should be used for LabVIEW interface...Another KBA is FYI. Programming with KitProg2/MiniProg3 Using LabVIEW™ - KBA218796 If it can help you out. CLI issues you met should be not so important... Thanks, Ryan |
|
|
|
只有小组成员才能发言,加入小组>>
752个成员聚集在这个小组
加入小组2069 浏览 1 评论
1826 浏览 1 评论
3639 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1760 浏览 6 评论
1510 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
508浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
358浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
410浏览 2评论
357浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
855浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-23 09:58 , Processed in 0.426819 second(s), Total 45, Slave 39 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号