Creating Bootloader Host Application through Visual Studio and unable to program a .cyacd file

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

cross mob
SaKu_3221121
Level 1
Level 1
First like received

We are using the Bootloader Host application that is provided by the PSOC, below is the link,

https://www.cypress.com/documentation/application-notes/an73503-psoc-usb-hid-bootloader

In the Visual Studio application, after we load the .cyacd file and click program on the gui, we are getting error bootloader_ERR_DATA (0X04u) /*the data is not of a proper form*/

The dll used for Host application is created by referring the document attached (001-73503_AN73503_PSoC_USB_HID_Bootloader.pdf).

We are using PSoC 5LE and kit is CY8CKIT-059 PSoC 5LP.

0 Likes
1 Solution

Please find both the working PSoC Creator project and the Bootloader Host C# code attached. When you open the PSoC Creator project, follow these steps:

(1) Set the active project to the Bootloader

(2) Build the project

(3) Copy the path to the bootloader hex file

(4) Set the active project to Bootloadable

(5) Open the configuration dialog of the Bootloadable component

(6) Under dependencies, point to the bootloader hex file

(7) Build your project

(8) Program your device

Once programmed, connect the USB cable to the USB port and press reset. Run the bootloader host application and you should see the device connected. Point to the cyacd file generated by the Creator project and click Program. It should work successfully. Let me know your observations.

Regards,

Dheeraj

View solution in original post

0 Likes
9 Replies
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

The Bootloader checks whether the security key in the command matches the key entered in the Bootloader Configure dialog. If they do not match, then "Error Data" is returned. Check the Bootloader configure dialog to see if the security key option is enabled or not.

bootloader.png

If it is, then provide the same values in the Bootloader Host application. If it is not enabled, you can pass them as all 0s and it should work:

pastedImage_1.png

Please let me know if this solves your issue

Regards,

Dheeraj

0 Likes

Hi Dheeraj,

Thank you for the response,

We have tried this already, Please find the images below,

PSOC_Securitykey.PNG

and

VS_SecurityKeyfailed.PNG

We still face the same issue.

0 Likes

Would you be able to attach your C# project? I am not able to reproduce at my end.

Regards,
Dheeraj

0 Likes

Hi Please find the C# project and dll that we used in the attachments.

Thank you.

0 Likes

I ran your project without any modifications. It worked without any errors for me.

pastedImage_0.png

I think the error is in your PSoC Creator project. Please attach your PSoC Creator if you want me to look at it. I used the following code example for testing and it works for me: https://www.cypress.com/documentation/code-examples/ce95391-psocr-usb-hid-bootloader

https://www.cypress.com/documentation/code-examples/ce95391-psocr-usb-hid-bootloader

Attached is the .cyacd file I'm programming so that you can check it at your end.

Regards,

Dheeraj

0 Likes

Hi Please find the PSoC Project workspace from the attachments for your reference,

Thank you.

0 Likes

Hi DheerajK_81​ ,

Did you get a chance to look into the issue.

Please give us some inputs further to proceed.

Thank you.

0 Likes

Hi DheerajK_81 ,

Can you please share the Bootloader host that worked for you.

Thank you.

0 Likes

Please find both the working PSoC Creator project and the Bootloader Host C# code attached. When you open the PSoC Creator project, follow these steps:

(1) Set the active project to the Bootloader

(2) Build the project

(3) Copy the path to the bootloader hex file

(4) Set the active project to Bootloadable

(5) Open the configuration dialog of the Bootloadable component

(6) Under dependencies, point to the bootloader hex file

(7) Build your project

(8) Program your device

Once programmed, connect the USB cable to the USB port and press reset. Run the bootloader host application and you should see the device connected. Point to the cyacd file generated by the Creator project and click Program. It should work successfully. Let me know your observations.

Regards,

Dheeraj

0 Likes