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

cross mob
heike
Employee
Employee
First solution authored First like received 5 replies posted

Hi,

is it possible to flash a PSoC6, in my case CY8CPROTO-063-BLE, from a ARM device?

I want to connect the CY8CPROTO-063-BLE to a Raspberry Pi and want to flash the CY8CPROTO-063-BLE from this raspberry pi. I saw that ModusToolbox is only available for x86. Also I had a look on pyocd, which already contains some cy* targets, but not for the CY8CPROTO-063-BLE.  Is there a solution or a way to flash CY8CPROTO-063-BLE from an ARM device like Raspberry?

Thanks.

Heike

0 Likes
1 Solution
heike
Employee
Employee
First solution authored First like received 5 replies posted

Flashing my psoc with pyocd on arm or x86 worked for me as follows:

Install pyocd:
`pip install pyocd`

List available targets from pyocd:

`pyocd list --target `

There are several cypress (cy*) targets available. For the  CY8CPROTO-063-BLE I could use the `cy8c6xx7` target.

List available devices with pyocd:

`pyocd list`

If several devices, remember the uid from the one to use.

I cross compiled my application on a x86 machine with modus toolbox. That generates a .hex and .elf file in build/APP_CY8CPROTO-063-BLE/Debug/

Now the .hex or .elf file can be flashed on the PSoC. I couldn't find a difference between the two during flashing. uid is only necessary if several devices were found by `psoc list`.

`pyocd load --target cy8c6xx7 --uid <UID_OF_PSOC> path/to/binary.elf`

 

That worked for me. If I got an error in pyocd load, I knew that the target wasn't the right one for my psoc. Only skipped bytes at flashing doesn't matter, it just means, that the PSoC was already flashed with the right content.

View solution in original post

6 Replies
Bhamy
Moderator
Moderator
Moderator
100 replies posted 10 likes given 10 likes received

Hi @heike ,

There is no official ready solutions with RPI. But you may use the OpenOCD and respective configuration files for target and interface from the openocd and manage to work on RPI. Modustoolbox is also using OpenOCD for programming and debugging.

Check the OpenOCD document available in the Modustoolbox installation. Let me know if you need any further information.

Best regards

Bhamy Narasimha Shenoy

0 Likes
Bhamy
Moderator
Moderator
Moderator
100 replies posted 10 likes given 10 likes received

Hi @heike ,

Did you get chance to review my previous response? Let me know if you need some support on porting it to RPI.

Best regards

Bhamy Narasimha Shenoy

0 Likes
heike
Employee
Employee
First solution authored First like received 5 replies posted

Hi @Bhamy ,

thanks for your reply!

I had a look into openocd. I found then a solution with pyocd. That works on arm, I just thought that the output "skipped all bytes" mean it didn't work but it actually worked and just skipped since everything was already flashed. I think we go with pyocd, it isn't the fastest solution, but very easy.

Best regards

Heike

0 Likes
Bhamy
Moderator
Moderator
Moderator
100 replies posted 10 likes given 10 likes received

Hi @heike ,

That's nice to know. If possible please share the script which you have implemented which may help others.

 Best regards

Bhamy Narasimha Shenoy

0 Likes
heike
Employee
Employee
First solution authored First like received 5 replies posted

Flashing my psoc with pyocd on arm or x86 worked for me as follows:

Install pyocd:
`pip install pyocd`

List available targets from pyocd:

`pyocd list --target `

There are several cypress (cy*) targets available. For the  CY8CPROTO-063-BLE I could use the `cy8c6xx7` target.

List available devices with pyocd:

`pyocd list`

If several devices, remember the uid from the one to use.

I cross compiled my application on a x86 machine with modus toolbox. That generates a .hex and .elf file in build/APP_CY8CPROTO-063-BLE/Debug/

Now the .hex or .elf file can be flashed on the PSoC. I couldn't find a difference between the two during flashing. uid is only necessary if several devices were found by `psoc list`.

`pyocd load --target cy8c6xx7 --uid <UID_OF_PSOC> path/to/binary.elf`

 

That worked for me. If I got an error in pyocd load, I knew that the target wasn't the right one for my psoc. Only skipped bytes at flashing doesn't matter, it just means, that the PSoC was already flashed with the right content.

Bhamy
Moderator
Moderator
Moderator
100 replies posted 10 likes given 10 likes received

Hi @heike ,

Thank you for sharing the solution.

Best regards

Bhamy Narasimha Shenoy

0 Likes