6 Replies Latest reply on Oct 1, 2016 7:44 AM by user_1377889

    debugger starts in wrong code location

    toneal30_1860441

      Currently trying to debug a CYBLE-022001 using Kitprog CY8CKIT-024-BLE.  Programming the device works fine and the checksum is verified, however when starting a debug session the debugger halts in the wrong code location (it halts in some random bluetooth handling code, which is not even called) rather than main.c.  The debugger consistently halts in the wrong place even after multiple cleans and rebuilds so I'm thinking it's using the wrong symbols or something to find out where main is?  Or it's maybe getting confused as to which source file contains main?

         

      When the debugger is launched, the "Call Stack" looks OK (has main() at the top), except for the "File" column, which is showing the wrong source file (should be main.c but it's a different file, the file that it's showing doesn't even have a main() method anywhere).

         

      I should note that I'm trying to re-use some code files from another project (I edited the "additional include directories" of the compiler under "Build Settings" to include a folder from another project).  Perhaps this is messing up the compilation/symbol assimilation process?  If I use one of the example projects, the debugger halts in the correct location and everything appears to work fine.  Suggestions for getting this working?  I've already tried rebooting, cleaning, rebuilding both projects, etc.