Bootloader host for PSoC 6 devices

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

cross mob
AnBr_3203316
Level 1
Level 1
First question asked First reply posted First like received

Hi there,

I would like to know if is there anything different in the usage of the BootloaderUtils.dll for the use with PSoC 6 devices. We are trying to provide the users of our product (which has a PSoC6) to do the DFU (Device Firmware Update) through our software (Visual Studio C# based), which already works pretty good with PSoC 4 and 5 devices, updating through UART and USB HID.

Now I am trying to use this same code with PSoC6 devices through UART interface.

But then when our software calls the BootloaderUtils.dll in the function Bootloader_Utils.CyBtldr_Program, the Visual Studio, it throws the following exception:

System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt

It works perfectly to update when I use the Bootloader Host Tool from PSoC Creator 4.2 or 4.3.

I tried to use the cybootloaderutils.dll files provided in the installation of these PSoC Creator bin files, but it throws the  same error.

Am I missing something?

0 Likes
1 Solution

Hello Ana,

Please download ModusToolbox which comes with the DFU Host Tool. More importantly, you will the latest cybootloaderutils available at this path: "ModusToolbox\tools_2.1\dfuh-tool\sample_code\src\backend\".

Please make use of these files to build your DLL. Also, I went through your PSoC Creator project and I don't see any issues. I did not find the host application code though.

Regards,

Dheeraj

View solution in original post

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

Please have a look at the following thread which had the same error: UART Bootloader HOST S/W error

Try out the steps mentioned in the above link and let me know if it helps

If not, please attach both the Host Side Visual Studio project and the PSoC Creator project so that we can get more insight on the issue.

Regards,

Dheeraj

0 Likes

Hi,

thank you for this help. I tried to run the code from this thread with the same error, and then I got this:
pastedImage_0.png

Do you know what does it mean?

In this link you can see the bootloader project:

DFU PSOC6 USBUART OK 20200316.zip - Google Drive

Best regards,

Ana

0 Likes

Hello Ana,

Please download ModusToolbox which comes with the DFU Host Tool. More importantly, you will the latest cybootloaderutils available at this path: "ModusToolbox\tools_2.1\dfuh-tool\sample_code\src\backend\".

Please make use of these files to build your DLL. Also, I went through your PSoC Creator project and I don't see any issues. I did not find the host application code though.

Regards,

Dheeraj

0 Likes