3 Replies Latest reply on Apr 29, 2020 12:40 AM by GaneshD_41

    Bootloadable debug issue

    ChHs_4614611

      When I put Bootloadable function in schematic.

      The debug function will be disable.

      Is it possible enable bootloadable function still can run debug ?

        • 1. Re: Bootloadable debug issue
          GaneshD_41

          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

          1 of 1 people found this helpful
          • 2. Re: Bootloadable debug issue
            ChHs_4614611

            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

            • 3. Re: Bootloadable debug issue
              GaneshD_41

              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

              1 of 1 people found this helpful