ppcli.exe example for psoc 5?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Is there a proper example for using command line with psoc 5?  Probably not, right?  Because of the turgid UI?

0 Likes
13 Replies
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

Hello ,

   

I just want to check if you have got a chance to check the document PSoC_Programmer_CLI.pdf available in the PSoC Programmer installation directory(eg: C:\Program Files (x86)\Cypress\Programmer\Documents).This has information about the different commands.

   

Thanks,

   

Hima

Anonymous
Not applicable

Hima, thanks for the reply.. yes, I'm reading the _cli.pdf.  It only has examples for simple PSOC, not for 3/5... the algorithm for 3/5 is much more complex, since you have to query the device and program by rows.  There is no example for CLI for 3/5, since it would be almost impossible to make one.  The documentation in general is not clear as to the different capabilities, you have to dig to find the capabilities matrix for each command and see that Program() is not a PSoC 3/5 command.

   

I'm now using the COM C++ example and it works... I changed the code so I am able to add command-line arguments for the ID number of the MiniProg3... I hard-code the name of the hex file.  One problem... I'm not able to run two of these at once.  I have two PSoC 5's on my board and it would be nice to run two at once... looks like I'm going to have to do them sequentially.  Should I be able to run two COM Cpp_Ex.exe sessions at the same time, pointing to different ?

0 Likes

Hello Stephen,

   

I don't think you can program the two devices at the same time using the same application. I believe using different applications it might be possible.But we have not tested this scenario.It looks like it will work. Did you get a chance to test this?

   

Thanks,

   

Hima

0 Likes
Anonymous
Not applicable
        Hima, I'm having to program them one after the other... this works OK, no problem.   
0 Likes
Anonymous
Not applicable

Is there an example for the PSoC5 yet?
I'm trying to program the 5LP eval board which uses the Kitprog. Setting protocol 8 results in complaint that the device is not in ISSP mode, setting protocol 2 alieviates this, but causes a no-response.

   

Could someone supply an example sequence, thanks. (or this only possible with a miniprog?)

Anonymous
Not applicable

Ok, looks like I need to do a DAP_Acquire rather than an Acquire, but now there's the Erase and Program to deal with?

0 Likes
Anonymous
Not applicable

Hi, i am currently at the same point in atempting to make a script for production to eazy program a CY8C5xxxLP family chip. Do you perhaps already have some results?

   

 

   

I've also tried is via the 'CommandLineProgrammer.exe' but the moment i start the .exe, windows prompts a 'JtagChainProgrammer' stopped working...

0 Likes
crhoc_2121991
Level 2
Level 2
First like received Welcome!

Steven,

Did you ever figure this out? I'm looking at _cli.pdf as well, there is a psoc6 ppcli program example, which I tried to modify for psoc5lp. However I'm now stuck as well

GetPorts

OpenPort KitProg/06100A18001E6400 .

SetAcquireMode "Reset"

SetProtocol 8

SetProtocolClock 224

SetProtocolConnector 1

HEX_ReadFile "C:\\hyattController.hex"   < returns 0x00040000

HEX_GetRowsCount                                < returns 0

DAP_Acquire

PSoC3_EraseAll

PSoC3_ProgramRowFromHex 0    << Not enough inputs to PSoC3_ProgramRowFromHex

Hopefully you figured this out.

Thanks,

Craig

0 Likes
AnsgarSchmidt
Level 1
Level 1
5 likes given First reply posted First like given

Hi, I am at the same point. Trying to make a production script for PSOC5. Are there working examples? Or is there any way to call the Programmer with command line parameters? Thanks a lot.

0 Likes

Hello.

ppcli example for 5LP is given in KBA232937.

 https://community.infineon.com/t5/Knowledge-Base-Articles/Programming-PSoC-3-PSoC-4-and-PSoC-5LP-MCU...

You will need to use GetPorts to identify your programmer (Kitprog,Miniprog3,etc).

Note: ppcli uses a very precise syntax.  When the example script shows a blank space in text, you need a blank space in text.  Including the blank space preceding a period (this is used in OpenPort  command line).

AnsgarSchmidt
Level 1
Level 1
5 likes given First reply posted First like given

Thank you very much for the answer. So for the PSOC5, I have to parse the hex file before (e.g. python) and generate from the hex file the CLI script with PSoC3_ProgramRowFromHex for each row? Seems like I missed something, please advise. 

0 Likes

Hi.

Yes, you're missing something.  The ppcli command HEX_ReadFile  takes care of handling the hex file.  No need to edit/parse the hex file.

The PSoC 5LP ppcli script attached in KBA232937 is setup to program 256k bytes (256 rows of 256 bytes in FLASH Array 0,1,2,3).  If the application takes lessthan 256k bytes, not to worry.  The script (interpretor) manages to figure this out on its own.  For example,  KBA232937 5LP script reads a hex file that is only 32kBytes (plus another xx bytes of metadata).

I suggest you start with the example script.  It needs minimal editing: enter your hex file name, enter programmer ID.  That's about it.

Good luck with your project.

Hi,

Thanks a lot for the clarification, this information fragment was missing. I will give it a try and hopefully, it will help. Thanks a lot for your time and help here.

 

Ansgar

0 Likes