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.
I read your topic again and think...maybe CLI is not what should be used for LabVIEW interface...Another KBA is FYI.
If it can help you out. CLI issues you met should be not so important...