Programming PSoC in production

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

cross mob
DzNg_1446756
Level 3
Level 3
First like received First like given

We've gone past prototype and ready for production.  Would like to know how to program our board with PSoC 5LP (10 pin) and PSoc 4 (5 pin) in production.

We've been using the MiniProg3 to program each board from PSoC Creator so far.  But in production, we'd like to automate it.  Ideally, we'd like to have a small computer as a host (Raspberry Pi?), write our programming utility on it and have it program the PSoC board.

AVR chips has avrdude that makes it possible to flash it from any host.  Is there an equivalent for PSoC or can it be developed?

1 Solution

PSoC Programmer is Windows only AFAIK.

There's also the option of using the COM interface:

http://www.cypress.com/file/136426/download

and building the functionality into a custom .NET application.

There's an open source .NET implementation for linux called mono that would maybe run the application, but drivers for the miniprog3 and whatnot would probably be a problem.  Looks like their solution for MacOS/Linux is a VM.

Apple and Linux OS Support for PSoC® Software and Kits - KBA87545

View solution in original post

0 Likes
6 Replies
KyTr_1955226
Level 6
Level 6
250 sign-ins 10 likes given 50 solutions authored

You may be able to get close to what you're looking by using the command line interface for the programmer:

http://www.cypress.com/file/136431/download

0 Likes

Cool.  Is there a Linux version of the CLI?  Don't really want to use Windows/DOS.

PSoC Programmer is Windows only AFAIK.

There's also the option of using the COM interface:

http://www.cypress.com/file/136426/download

and building the functionality into a custom .NET application.

There's an open source .NET implementation for linux called mono that would maybe run the application, but drivers for the miniprog3 and whatnot would probably be a problem.  Looks like their solution for MacOS/Linux is a VM.

Apple and Linux OS Support for PSoC® Software and Kits - KBA87545

0 Likes
Anonymous
Not applicable

I have just started to try using openocd to program a PSOC 5LP.  There is apparently PSOC 4 support in openocd already, I can't say as I have not tried using it; but, PSOC 5 is only in the development branch.  That said, the code appears to have been in development for the last two years and so it appears to be fairly mature for development code.  To get the code, I did the following:

  git clone http://openocd.zylin.com/openocd zylin-openocd

  cd zylin-openocd

  git fetch http://openocd.zylin.com/openocd refs/changes/32/3432/26

  git cherry-pick FETCH_HEAD

  ./bootstrap

  ./configure --enable-sysfsgpio --enable-bcm2835gpio --enable-vslink --enable-luminary-icdi --enable-kitprog

  make

  sudo make install

I am using a kitprog adapter snapped off a CY8CKIT-059, but also want to be able to use a couple other interfaces just in case, you may want to adjust the "./configure" line to suit your needs.  Good luck finding the enable options if you want changes though - openocd documentation sucks.

One note, the install does not copy udev rules to the proper location, you need to run

sudo cp /usr/local/share/openocd/contrib/60-openocd.rules /etc/udev/rules.d

or something very similar, not 100% sure I did not capture that step in my notes.  If you do not copy the udev rules normal users cannot run openocd and actually access hardware.

From there I've successfully started openocd, found the right dongle and located a target with:

  openocd -f interface/kitprog.cfg -c kitprog_init_acquire_psoc -f target/psoc5lp.cfg -c "telnet_port 4444"

I have not yet been able to usefully program a FLASH image, and when I have tried it has run very slowly.  I can't say if actually writing FLASH is faster than my failed attempts but the failures take quite a while to come back.

If you are interested in investigating further, I'd suggest looking at the examples section of Cypress PSoC · azonenberg/openfpga Wiki · GitHub .  At least the build information is outdated and did not work for me, I had to adapt.  I will start looking at his programming / erasing stuff in more depth shortly but you may want something sooner than I get around to it.  If you try to move ahead yourself and make any headway please post an update.  I hate having to use Windows just to use a PSOC.

Any additional updates with programming the PSoC 5LP from a Raspberry Pi?

0 Likes