Programming (loading .hex file) from a Raspberry Pi to a CY8KIT-059 Prototyping Kit vie KitProg

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

cross mob
chucksommer42
Level 1
Level 1
5 replies posted First like given First like received

Hi Guys,

I am building a system with a PSoC 5LP DevBoard (CY8KIT-059) and a Raspberry Pi.

I am connecting this board to a Raspberry Pi using USBFS Serial (via USB-Micro cable).

The PSoC 5LP DevBoard and a Raspberry Pi will be contained in a single box.

I know that PSoC Creator is not supported by LINUX, but is there a Linux Programming

App to program this board via the KitProg USB interface?

I am delivering this as a closed box and want to connect both USB ports to the Raspberry Pi

so  the PSoC DevBoard can be reprogrammed without having access to the 

thanks Chuck

 

0 Likes
1 Solution
BiBi_1928986
Level 7
Level 7
First comment on blog 500 replies posted 250 replies posted

Hello.

I've not found a Linux app to do what you want directly thru USB.  It would be possible to develop one (not me, I'm not Linux person).  You'll find the high level apps necessary in either the Creator folder or the PSoC Programmer folder.

If you do a forum search with the key words "psoc linux" you'll find discussions similar to what you need.  This might lead you down a path to pursue.

Have a look at these threads:
Programming PSoC Attached to Linux Computer - Infineon Developer Community

Solved: AN73503 - USB HID Bootloader for PSoC® 3 and PSoC ... - Infineon Developer Community

Solved: PSoC® USB HID Bootloader for linux - Infineon Developer Community

Microsoft Word - 001-73503 (infineon.com)  direct link to AN73503

As an option, a bootloader communication with R-Pi can be over USB using HID, USB-UART, USB-I2C.  For further reading:
AN68272, AN73854, AN60317

BTW, if you snap off Kitprog from KIT-059, the UART and I2C connections are broken between the two 5LP's.  You can re-make these connections using wire jumpers on the plated thru holes.

Good luck with your project.

View solution in original post

5 Replies
ncbs
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 sign-ins

Hi @chucksommer42 ,

PSoC5 devices can be programmed through external microcontrollers via serial wire debug (SWD) protocol. If your external controller (here RPi) is able to implement SWD, then yes, you can program PSoC5 device.

Find the appnote here: PSoC® 3 and PSoC 5LP Programming Using an External Microcontroller (HSSP)

Regards,
Nikhil

 

Hi Nikhil, Thanks for the quick response.

I was looking for a more "out of the box / LINUX program" solution, where the KitProg
portion of the CY8CKIT-059 is plugged into a USB port on the Raspberry Pi via the
KitProg PCB-USB connector.

On the other hand, AN73854 also looks promising as I will have a USB connection between the
Raspberry Pi and the "PSoC 5LP target" of the CY8CKIT-059 via its micro-USB connection.

My "next best (but easier)" solution is to have a USB socket on the project box (USB-mini, USB-micro, USB-C) extend the KitProg PCB-USB connection, and for reprogramming simply connect a Windows Laptop and reprogram the CY8CKIT-059 Target with PSoC Creator or PSoC Programmer.

Thanks much for the help.

0 Likes
BiBi_1928986
Level 7
Level 7
First comment on blog 500 replies posted 250 replies posted

Hello.

I've not found a Linux app to do what you want directly thru USB.  It would be possible to develop one (not me, I'm not Linux person).  You'll find the high level apps necessary in either the Creator folder or the PSoC Programmer folder.

If you do a forum search with the key words "psoc linux" you'll find discussions similar to what you need.  This might lead you down a path to pursue.

Have a look at these threads:
Programming PSoC Attached to Linux Computer - Infineon Developer Community

Solved: AN73503 - USB HID Bootloader for PSoC® 3 and PSoC ... - Infineon Developer Community

Solved: PSoC® USB HID Bootloader for linux - Infineon Developer Community

Microsoft Word - 001-73503 (infineon.com)  direct link to AN73503

As an option, a bootloader communication with R-Pi can be over USB using HID, USB-UART, USB-I2C.  For further reading:
AN68272, AN73854, AN60317

BTW, if you snap off Kitprog from KIT-059, the UART and I2C connections are broken between the two 5LP's.  You can re-make these connections using wire jumpers on the plated thru holes.

Good luck with your project.

Hi BiBi_xxxxxxx, Thaks for the quick reply and helpful set of suggestions.   Chuck

 

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

As BiBi suggested, a bootloader may be your best bet.  If I recall correctly, USBUART is not supported out of the box as a selectable interface for the bootloader component, but here's a decent USBUART Demo Project for a CY8CKIT-050 here if that's the direction you want to go:

https://www.hackster.io/hima/usbuart-bootloader-16cc46

You would still need to build a bootloader host application to run on linux to actually make use of it though.  Definitely possible (Cypress includes the bootloader host API source code w/ the PSoC Creator installation) but probably a little annoying.

As far as I'm aware there is no existing native application for linux to program a PSoC via the USB/Kitprog interface (however that first thread linked by BiBi looks promising as a workaround!)

 

0 Likes