Debugger does not go to Breakpoints, but to Disassembly Tab

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

cross mob
ToVa_285016
Level 5
Level 5
100 replies posted 50 replies posted 50 questions asked

Hi,

I have a PSOC 4200M project that was working and debugging well.  A change must have been made, because all of the sudden, I could not reach any breakpoints, even right inside the main() method.  They never seem to be reached, but instead the software goes to a disassembly window instead.

I have never seen this before.  I tried to turn off the disassembly window in Tools>Options, but then a window just pops up informing me that there is no source to debug, and would I want to see the disassembly window.

Please help if you have encountered this before, I am stuck.

I would rather not post my whole project if possible, if there are snippets or screenshots I would be happy to show those.

Thank you,
Tom

0 Likes
1 Solution
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

I downloaded your second bundle and tried

(1) Clean and Build

(2) Duplicated the project and re-target the device to CY8C4247AZI-M485

and tried to debug with CY8CKIT-044

And both went fine.

 

So I don't think there is/are problem in your project.

As my previous trivial sample also could not be debugged,

I suspect that there is/are problem in your development environment.

Although it is time consuming, how about trying

(1) Uninstall PSoC Creator

(2) Shutdown your PC (I don't recommend to use "Restart")

(3) Start up your PC

(4) Download PSoC Creator from

https://www.cypress.com/documentation/software-and-drivers/psoc-creator-software-archive

(5) Install PSoC Creator (I recommend to select installation type "Complete" instead of "Typical")

(6) Clean and Build your project

(7) Try debugging again

moto

 

View solution in original post

0 Likes
6 Replies
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

 

When I encountered something like what you describe "my" reasons were

(1) Debugger Setting

(2) Error is happening before main()

(3) Debugging with a wrong project (and or device)

 

For (1), chose menu Tools > Options 

In the Dialog shown, chose Program/Debug > General

Make sure that "On Run/Reset run to" is set to "Main"

001-Options_Dialog.JPG

 

For (2), in my case,

(2-1) WDT was started before initialization was completed and triggered before program reached to main()

(2-2) By accident modified the startup code, such as CyBootAsmGnu.s 

(2-3) Memory (stack/heap) setting was not enough to run that particular project

 Check project > Design Wide Resources > System : Heap Size and Stack Size

002-DWR-System.JPG

For (3) make sure that the project you are debugging is the one for the device,

and try "Clean and Build" and "Program" or "Debug" to make sure that the binary of the project is programed to the device.

 

Other things I would try are

(1) Download and update PSoC Programmer

https://www.cypress.com/documentation/software-and-drivers/psoc-programmer-archive

(2) Try with another board (or device)

(3) Try with another PC

 

moto

 

 

 

0 Likes
lock attach
Attachments are accessible only for community members.
ToVa_285016
Level 5
Level 5
100 replies posted 50 replies posted 50 questions asked

I have attached a more pared down project that I am having the same problems with.  I am also getting the error:

There was an error while programming the device: PSoC Programmer reported error (100 - FAILED! EraseAll operation failed!) 

I have also never had this before.  

0 Likes
lock attach
Attachments are accessible only for community members.
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

I could not build your project as the component "SysTimers" are not available in my environment.

Instead I hacked a tiny test program.

Which blinks LED (or flip output).

 

If you can build and debug this project with your hardware, the hardware and development environment must be sound.

 

I assigned LED to  P0[1] but you may need to change it to an available (or usable) output pin.

Schematic

010-schematic.JPG

Pins

011-Pins.JPG

main.c

#include "project.h"

void do_led(int n)
{
    int mod ;
    int i ;
    mod = (n % 4) + 1 ; /* mode will be 1, 2, 3, 4 */
    for (i = 0 ; i < mod ; i++ ) {
        LED_Write(0) ;
        CyDelay(500) ;
        LED_Write(1) ;
        CyDelay(500) ;
    }
}

int main(void)
{
    int count = 0 ;
    
    CyGlobalIntEnable; /* Enable global interrupts. */

    for(;;)
    {
        do_led(count) ;
        count++ ;
        if (count > 1000) {
            count = 0 ;
        }
        CyDelay(1000) ;
    }
}

 

moto

 

0 Likes
lock attach
Attachments are accessible only for community members.
ToVa_285016
Level 5
Level 5
100 replies posted 50 replies posted 50 questions asked

Hi Moto,

I very much appreciate your taking the time for the detailed explanation.

To answer your points from the first message:

(1)  Confirmed set correctly

(2-1)  Not sure how to check this - I am not using a WDT for this project

(2-2)  When I clean and rebuild, this should regenerate, correct?  If not, how can I reset to default?  I don't think I modified it, but not 100% sure.

(2-3)  I doubled stack and heap size and observed no changes (same problem)

(3)  I confirmed this is the correct chip in project and on the board.

To your second suggestions:

(1)  Confirmed that it is up to date and MiniProg3 has latest firmware

(2)  Confirmed the same problem on a previously known working board

(3)  Will have to try in a bit (travelling right now)

To your second post, I tried this project and ran into exactly the same issues.  It gave me the '100-FAILED!' error and suggested lowered clock speed.  When I do this, it does connect the debugger, but it does not reach any breakpoints, and when I 'pause' it to check where it is, it is stuck in the 'cyfitter_cfg' file.

PSOC Error.JPG

 

 

 

 

 

 

 

The call stack:

PSOC Error_call_stack.JPG

 

I have posted a new bundle that should include the custom component as well.

Regards,
Tom

0 Likes

More information as a follow up:  I was able to find a board with the same chip that I knew worked before that also had an LED to toggle (these are custom boards). 

I used your program, and lo and behold the LED did toggle when I simply programmed the firmware, and seemed to be working correctly.  However, I was still unable to debug, and ran into the same problems.   The LED never toggled, and when I paused the debugging, it was still stuck in the 'cyfitter_cfg' file, and never reached a breakpoint.

I hope this helps - looks like a software/debug setting issue?

Thank you,
Tom

0 Likes
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

I downloaded your second bundle and tried

(1) Clean and Build

(2) Duplicated the project and re-target the device to CY8C4247AZI-M485

and tried to debug with CY8CKIT-044

And both went fine.

 

So I don't think there is/are problem in your project.

As my previous trivial sample also could not be debugged,

I suspect that there is/are problem in your development environment.

Although it is time consuming, how about trying

(1) Uninstall PSoC Creator

(2) Shutdown your PC (I don't recommend to use "Restart")

(3) Start up your PC

(4) Download PSoC Creator from

https://www.cypress.com/documentation/software-and-drivers/psoc-creator-software-archive

(5) Install PSoC Creator (I recommend to select installation type "Complete" instead of "Typical")

(6) Clean and Build your project

(7) Try debugging again

moto

 

0 Likes