No Evidence of Bootloader Running

Announcements

Live Webinar: USB-C adoption. Simple & Cost-efficient solutions | April 18th @9am or 5pm CEST. Register now !

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

cross mob
MaKe_4459911
Level 1
Level 1
5 questions asked 10 sign-ins 5 replies posted

To confirm that the bootloader is running, I'm toggling 2 GPIO pins to indicate that I've entered main() in the bootloader.  If I build the bootloader project and load the hex file into the CCG3 I see the pins toggle when the device is powered on.  If I specify this bootloader in the bootloadable component in my main project I don't see these pins toggle when the device powers on.  Am I missing something on how this firmware runs?

0 Likes
1 Solution

Hi Mark,

If you have linked the boot loadable in the TopDesign.cysch to the bootloader, it will take the same during build. I hope you are linking the backup_fw.cydsn to the bootloader binary and leave CYPD3125-40LQXI_notebook.cydsn to point to dummy bootloader as it was earlier. 
Please share the source files (.zip format) so that I can check from my side.

Best regards,
Pranava

View solution in original post

0 Likes
7 Replies
Pranava_YN
Moderator
Moderator
Moderator
100 likes received 500 replies posted 250 solutions authored

Hi,

May I know which project and bootloader you are using to test this?

The firmware should start from the Bootloader and then jump to Firmware. In Host SDK I2C Bootloader provided for CCG3, we start a timer and upon this timer expiry the execution moves to firmware.

PranavaYN_0-1656322423561.png

PranavaYN_1-1656322537096.png

But Bootloader has to execute initially. If the LED is not blinking you can try to check if, 

1. Toggle time is less than the Bootloader wait time.

2. You are updating the correct Bootloader project in the Bootloadable project. 

Please let me know project details (Which bootloader and bootloadable projects) so that I can help you better. 

Best regards,
Pranava
0 Likes

Hi Pranava,

I used the CYPD3125-40LQXI_notebook project as a starting point.  I've modified the project for our needs.  This project has a bootloadable component that points to CYPD3125-40LQXI_dummy_boot.hex in the Bootloader folder.  The Bootloader folder only contains the .hex and .elf files and not the Bootloader project.  There is another adjacent folder that is called dummy_boot.cydsn that may be the source for this bootloader but that isn't clear.

I've modified the Bootloadable component to point to the .hex file in the dummy_boot.cydsn project.  I've modified that project to default my 'red' gpio high and my 'green' gpio low as defined in TopDesign.cysch.  When main() starts I set 'red' low and 'green' high.

When I load the .hex file from the dummy_boot.cydsn project into the device and run it I see the 'red' gpio go momentarily high and as it goes low I see the 'green' gpio go high.  This is what I would expect.

When I build the CYPD3125-40LQXI_notebook project with the Bootloadable component pointing to this hex file and then program the resulting .hex file into the device and run it, I don't see either the 'green' gpio or 'red' gpio go high.  They both stay low.  I would have expected that they would transition as they did before if the bootloader is running first before my bootloadable application.

Thanks,

Mark

0 Likes
Pranava_YN
Moderator
Moderator
Moderator
100 likes received 500 replies posted 250 solutions authored

Hi Mark,

Please find the below description of dummy_boot.

PranavaYN_0-1656565969972.png

Please use the actual bootloader project (i2c_boot.cydsn) present in the same project folder. This is the actual bootloader project that will be used at the end.

Best regards,
Pranava
0 Likes

In the Bootloadable component, if I point to the .hex file in the  i2c_boot.cydsn project, I get these errors:

MaKe_4459911_0-1656618986542.png

What am I missing?

Thanks,
Mark

0 Likes
MaKe_4459911
Level 1
Level 1
5 questions asked 10 sign-ins 5 replies posted

I figured out the errors and everything is building successfully.

I am now including the i2c_boot.cydsn project in the CYPD3125-40LQXI_notebook (using the Bootloadable component).  I still don't see any activity on my 'red' and 'green' GPIO pins.  If I program the CCG3 part with just the i2c_boot hex file I do see the expected activity on these GPIO pins.

How can I verify that the boot loader I've built is the one that is being included in my bootloadable project?

Thanks,
Mark

0 Likes

Hi Mark,

If you have linked the boot loadable in the TopDesign.cysch to the bootloader, it will take the same during build. I hope you are linking the backup_fw.cydsn to the bootloader binary and leave CYPD3125-40LQXI_notebook.cydsn to point to dummy bootloader as it was earlier. 
Please share the source files (.zip format) so that I can check from my side.

Best regards,
Pranava
0 Likes
MaKe_4459911
Level 1
Level 1
5 questions asked 10 sign-ins 5 replies posted

Hi Pranava,

Linking backup_fw.cydsn to my new bootloader binary was the information I needed.  I'm now seeing the GPIO pins change as I expected them to.  I also discovered that the field in the Bootloader component that defines the wait for command time is ignored and a constant in boot.h is used instead.

Thanks for your help,

Mark

0 Likes