I'm writing code for the Cypress EZ-USB. I've stuck with the file structure that Cypress uses in their examples, FW.C (frameworks) and periph.c (my device code). I'm relatively unfamiliar with the tools having just started my project 1-2 weeks ago. As far as I remember I have not set any breakpoints in my own code (periph.c) although earlier I experimented with breakpoints in the Cypress code (fw.c). So today for the first time I wanted to breakpoint my code, but when I try that I get: BS \PERIPH\252 *** error 35: undefined line number My code is a USB device and it runs and exhibits behavior so I know that my code is actually running (via Cypress USB Control Panel application). I can single step through it. I know the code is there and functional. I've looked at the link map (.m51 file) and I see stuff related to my periph.c although I'm not exactly proficient in interpreting the data there (yet). In options for my file I haven't changed anything from default and it shows OPTIMIZE (6,SPEED) DEBUG OBJECTEXTEND and I would think that means it's producing the line number vs. location data that the debugger needs to translate one into the other. For some reason the debugger cannot identify the line number and figure out which code location to insert the breakpoint at. Help? :)
In the uVision debug options, you have the option to save breakpoint settings. If you have this enabled, you could be saving breakpoints by soure line numer Of course, if you modify your source, it is quite possible that a given source line numer might no longer generate executable code (it might be a comment)...
Thanks guys! Your comments plus me being fresh at the top of a week rather than burned out late on Friday solved the problem. It turned out that I had conditionally commented out a small section my code with #if/#endif (of course it was the section I was trying to breakpoint). I was too jaded on Friday afternoon to see that. Thanks again! :)