5 Replies Latest reply on May 1, 2018 5:26 AM by DaEr_349131

    Programming PSoC in production


      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. Re: Programming PSoC in production

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


          • 2. Re: Programming PSoC in production

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

            1 of 1 people found this helpful
            • 3. Re: Programming PSoC in production

              PSoC Programmer is Windows only AFAIK.


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


              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

              • 4. Re: Programming PSoC in production

                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


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


                  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.