PSoC4 support in OpenOCD

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

cross mob
Anonymous
Not applicable

Hi all,

   

let me announce that PSoC4 family is now supported in OpenOCD.

   

OpenOCD is a multiplatform on-chip debugger. It can be used as a gdb server with gdb-derived debuggers. OpenOCD can drive most of standard JTAG/SWD adapters, like J-Link... For more info see http://openocd.sourceforge.net/

   

PSoC4 support includes SWD debugging (almost standard Cortex-M0) and a driver for flash programming. This features were integrated very recently so PSoC4 support is available only in a git version for the moment. I'll let you know when a suitable Windows and Linux binary will be released.

   

OpenOCD can help in following scenarios:

   
        
  • PSoC4 debugging with Linux PC or an embedded Linux powered system

  •     
  • PSoC4 debugging over local or wireless network

  •     
  • PSoC4 debugging using a standard or special SWD adapter

  •    
   

 

   

To Cypress: I hope you do not consider this announcement as spoiling your business with MiniProgs and PioneerKits. I'm sure that an open-source alternative can boost wider spreading of your innovative chips in students communities.

   

If Cypress wishes to support our open source project please let me know.

   

 

   

Tomas

0 Likes
13 Replies
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

As someone doing its work under Linux only (and going to a Windows VM only when absolutely needed): I really like that. It should give me a chance to do at least the debugging directly on Linux, which would really help a lot.

   

Btw: Do you support all PSoC4 models (including the new PSoC4 BLE and maybe also the ProC BLE)?

0 Likes
Anonymous
Not applicable

Both PSoC 41xx and 42xx families are supported. PSoC 40xx is not.

   

PSoC4 BLE is not yet supported. I'm waiting for a BLE module, so stay tuned.

0 Likes
jopl_301826
Level 1
Level 1

Just learing about OpenOCD.  Going the other direction, does it support using MiniProg3 and/or the 042 Pioneer Kit as generic SWD adaptors?

0 Likes
Anonymous
Not applicable

I do not know details about protocol used between PSoC Creator / Programmer and MiniProg / Pioneer Kit. I assume it is proprietary and not published.

   

OpenOCD can not drive a MiniProg3 or a Pioneer Kit as a SWD adapter.

0 Likes
Anonymous
Not applicable

THANK YOU!  This is extremely helpful to me .  Where are the configs to these in the git tree?  I con't find them in either master or v0.6.1 branch.

   

I was hoping to use a PSoC 4200 in a project, and I'm seeking a linux-friendly tool chain.  I'm using Bus Pirate v3.6 with OpenOCD v0.8.0 (git) on Ubuntu Trusty, these configs will round things out for me.  I'm finishing up the prototype PCB design.

   

Now if I can just figure out SWD flash programming...

0 Likes
Anonymous
Not applicable

Get OpenOCD sources from http://sourceforge.net/p/openocd/code/ or mirror http://repo.or.cz/w/openocd.git

   

OpenOCD team is working on release 0.9.0. It will be the first official release with PSoC4 support.

0 Likes
Anonymous
Not applicable

Is PSoC4 BLE supported now?

   

What are you using for a SWD adapter for the supported devices?

0 Likes
cadi_1014291
Level 6
Level 6
25 likes received 10 likes received 10 likes given

PSoC5LP is now supported (openocd 0.10), i think there is work in progress to support the newer PSoC4 families.

   

To flash the CY8CKIT-049-42XX kit (PSoC 4200 device) i used a ST-Link, there's also work in progress to support KitProg as interface (i tested it with a patch on the openocd source, i used it to flash a CY8CKIT-059 kit (PSoC5LP device) ).

   

Hope it helps

   

Carlos

0 Likes
DaEr_349131
Level 5
Level 5
25 likes received 50 sign-ins 5 comments on KBA

+1 on using Kitprog or a Miniprog from Linux.

   

 

   

ps.

   

anyone tried flashing a psoc 4L via openocd + raspberry I/O's?

0 Likes
DaEr_349131
Level 5
Level 5
25 likes received 50 sign-ins 5 comments on KBA

ping!

   

team-cypress: what's the easiest way to do SWD-flashing of psoc4/5s via Linux? (pref. using miniprog's)

0 Likes
Anonymous
Not applicable

Cypress provides a way to flash PSoC4 through SWD using GPIOs. You'll find the procedure and source code on the AN84858 Application Note.

   

It can be easily ported to the Raspberry Pi by modifying the GPIO mapping in SWD_PhysicalLayer.c. 

   

However, to flash a .hex file, you first need to convert it to hexImage.c/.h using a C# application (provided in AN84858) and re-compile the HSSP application every time... It would be great to read the .hex file directly by porting the C# parser into the HSSP app.

0 Likes
DaEr_349131
Level 5
Level 5
25 likes received 50 sign-ins 5 comments on KBA

Team Cypress,

   

It would be amazing if you could provide a python tool that can run on linux, mac that can do this from a .hex

0 Likes
Anonymous
Not applicable

The C# parser source code is provided in the Application Code. It would be great if someone could make a Python tool, or even better: load the .hex file directly from the HSSP application.

0 Likes