Bootloader Host Utility!!

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

cross mob
ErNo_1148106
Level 4
Level 4
First solution authored 50 replies posted 25 replies posted

Hi Everyone,

Is there a possibility to get the source code in visual c# for the Bootloader Host utility that comes with PSOC Creator 4.3??? I was using the UART Bootloader Host Utility from AN68272 and now that doesn't work because of the latest additions. I have asked managers from Cypress Semiconductor to give me the Bootloader Host Utility source code but my project is urgent and need to finish it up so I can release my design for production. This is the ONLY thing holding me up from getting this project launched so any help would be GREATLY APPRECIATED.

I tried creating the DLL and managed to get it to compile after many hours of fiddling in unknown territory like a blind man driving down a highway in the wrong direction. I've never messed with DLL's before so that was new for me and something I don't ever want to experience again...lol.

As a desperate attempt I managed to merge what was in the USB HID Bootloader Host software thinking that might work with the newly created DLL and I do not get any errors and it launches fine BUT when I try to bootload the target device it gives me a security key error. Not sure why or what is going on.

Im lost and I don't have many hairs left on my poor head to keep fiddling with something like this when it SHOULD be included as part of psoc creator. I know the api's are there but that doesn't do a software guy much good if he doesn't have much experience creating a dll.

I want this software so I can add my hooks to activate the bootloader on the target device:

Bootloader Host.JPG

What will it take to get this? Please let me know.

Thanks,

Eric Norton

0 Likes
8 Replies
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

Eric,

You mentioned:

I was using the UART Bootloader Host Utility from AN68272 and now that doesn't work because of the latest additions.

Were the additions from Cypress (ie. later releases of AN68272 or the UART component) or your modifications?

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes

Hi LePo,

The later changes I was referring to was the security key and appId. There is something else I have observed. My bootloader code that I have modified with the new revision dll programs a psoc 5 no problem even with the new release of 4.3 and bootloader/bootloadable components revision 1.60. The problem I have is programming the psoc 4 devices I have on the same board. The interface goes from uart then converts to i2c to the chain of psoc 4 parts. The bootloader host utility that is provided by cypress programs through this custom interface with no problems and that's why I'm asking for the source code so I can compare the differences between my code and cypress's. I believe there is a timing issue or command byte that is not being sent but have no way of identifying the problem as of yet. Hope this helps to clarify.

Thanks,

Eric

0 Likes

Eric,

Wow!  You are leaps and bounds more experienced in Bootloader nuances than myself.

With the additional information you supplied in your last post, maybe someone (Cypress) might have an additional  thought that might help.

This is a bit out of my league regarding Bootloaders but I think you mentioned:

... There is something else I have observed. My bootloader code that I have modified with the new revision dll programs a psoc 5 no problem even with the new release of 4.3 and bootloader/bootloadable components revision 1.60. The problem I have is programming the psoc 4 devices I have on the same board. The interface goes from uart then converts to i2c to the chain of psoc 4 parts. ...

It sounds like you have a target board with more than one PSoC on it.  In fact, you have a mix of different PSoCs (PsoC5 and PSoc4).  Is it possible that the Bootloader Host program is seeing one Host port but can't differentiate between which PSoC to Bootload?

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes

Hi LePo,

I've worked with the bootloader for a while now and know what to look for when there are problems but the one I am experiencing now is new to me and cannot wrap my head around it.

Yes my design is quite complex and it has a PSOC 5 and six PSOC 4 devices all on one board all doing their own task. In my design I have a USB to dual uart chip that communicates to the PSOC 5 on one uart channel and the PSOC 4's communicate on the other uart channel. There is a master PSOC 4 device that handles "application mode" and "bootloader mode" communications and this master drives the four downstream PSOC 4 devices through I2C. The sixth PSOC 4 controls power management and does not communicate to the master controller for the bootloader application. It pretty much is a stand alone device and cannot bootload because of the power management tasks (regulator sequencing/control and power sensing etc).

The chain of PSOC 4's is the one I am having problems with BUT I am able to bootload through the cypress bootloader host utility cypress created and ships with psoc creator. I disabled the "application mode" software from the master controller and disabled the target acquire functionality and use metal tweezers to get the PSOC 4 downstream device to go into bootload mode. Then I bootload as usual. Every time I bootload from cypress bootloader utility it works great but when I try my software it immediately fails. I looked at the I2C and UART signals and it looks to me it could be timing (highly doubt) or a command is missing when I try bootloading from my program. When I try the bootloader utility from cypress everything looks right and works correctly so I know its not my hardware or my code but in the way the bootloader handles the commands or the timing of the communications. The only way I can get around this issue is to see cypress's bootloader code so I can do a side by side comparison. Hope this gives you a better idea of what im doing.

Thanks,

Eric

0 Likes

Eric,

Thanks for the update.

You said:

Every time I bootload from cypress bootloader utility it works great but when I try my software it immediately fails.

Do you have access to a oscilloscope with protocol capture/analysis?  If so, you can capture the UART and I2C packets of the working Cypress Bootloader Host and compare it to your programs output.  This might determine if there are protocol differences.  It probably won't help if it's a timing issue.

It sounds like your host loader works with the PSoC5 but not with the PSoC4s.  Have you consulted with Cypress about multiple target bootloading?

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes

Hi LePo,

The bootloading is done on a per chip basis in the i2c daisy chain by selecting the i2c address. The cypress bootloader host utility works. I'm a good programmer and this problem is getting the better half of me. There must be something visual studio 2017 is doing or the code is doing something weird based on those settings and not sure where or what is causing this problem.

I have a suspicion it's visual studio and the code and a whole host of other issues. Without cypress's help I'm dead in the water. I did analyze the waveforms and cannot make sense of what I'm seeing.

Thanks,

Eric

0 Likes

Eric,

Nice!  Using the I2C addressing to Bootload the desired target CPU!

I wish I could be on more help here.  Your application is way more advanced then my experience with the Bootloader.

Good luck.

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes

Hi LePo,

Yeah it's a pretty cool setup. I appreciate your input into this problem and wish it were easier to solve.

Thanks LePo,

Eric

0 Likes