Bootloadable debug issue

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

cross mob
AdamsChengTW
Level 3
Level 3
10 sign-ins 5 sign-ins 10 questions asked

When I put Bootloadable function in schematic.

The debug function will be disable.

Is it possible enable bootloadable function still can run debug ?

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.

Hi,

Please find the attached image. When I add the following global variable in PSoC Creator and add a while loop in 1st line of main.c, I get the execution pointer as shown in the image below:

volatile uint8 temp=1;

    while(temp==1)

    {

    }

initial.PNG

Later, after changing the temp variable to '0' in the watch window, and placing a breakpoint before the line 77 and run it, I got the following status:

debug_window.PNG

To add a variable to watch, pause the debug window, right click on the variable and click on the variable and select "Add watch". For more information on this please refer "PSoC Creator user guide".

I am attaching the project for your reference.

https://www.cypress.com/file/137441/download

Thanks

Ganesh

View solution in original post

3 Replies
VenkataD_41
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi,

If you are using Bootloader-Bootloadable combination, it is expected that you could not see the Debug button as active.

The reason is as follows:

When Bootloader loads the Bootloadable application there will be a device software reset occurs during the transition. So, The Debugger will exit at this point.

The only way to debug a Bootloadable application is you have to use "Attach to Running Target" option. Once the bootloder exists and the bootloadable project starts running you can click "Attach to Running Target" option.

You can also create a global variable dummy in your Bootloadable application volatile uint8 dummy=0;

Place the following code before the line where you want to stop the cursor in bootloadable project and then click on "Attach to Running Target" option.

while(dummy==0)

{

}

Since dummy value is zero the application stucks just before the link you want. Once the cursor reaches here you can pause the application you can manually change the dummy value to '1' in variables tab. And from there you can add breakpoints in your project.

Hope this helps !

Thanks

Ganesh

Dear Ganesh,

Thanks for your help.

I try "Attach to Running Target" option .Now, already can run debug.

But, I have another issue.  I try to put breakpoint in main function first line. It can not stop .

If put breakpoint in main loop is can stop.

2020-04-13_102227.jpg

    [Put breakpoint in main loop]

2020-04-13_103044.jpg

Best Regards,

Adams

0 Likes
lock attach
Attachments are accessible only for community members.

Hi,

Please find the attached image. When I add the following global variable in PSoC Creator and add a while loop in 1st line of main.c, I get the execution pointer as shown in the image below:

volatile uint8 temp=1;

    while(temp==1)

    {

    }

initial.PNG

Later, after changing the temp variable to '0' in the watch window, and placing a breakpoint before the line 77 and run it, I got the following status:

debug_window.PNG

To add a variable to watch, pause the debug window, right click on the variable and click on the variable and select "Add watch". For more information on this please refer "PSoC Creator user guide".

I am attaching the project for your reference.

https://www.cypress.com/file/137441/download

Thanks

Ganesh