Problem setting brakepoints in library projects

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem setting brakepoints in library projects

2,964 Views
ZiglioNZ
Contributor I

CodeWarrior for Coldfire 7.1

 

Hi,

 

I hope someone has experienced something similar.

Recently I haven't been able to set breakpoints and debug a library project.

I used to be able to do it and I can still debug the MSL library.

Though with my own library project now when I try to set a breakpoint and I open the "view>breakpoints" window, the new breakpoint appears to be greyed out.

In the source code the usually red dot looks more like faint red.

 

I think for some reasons, the main project cannot access the library project source code.

That's because if I force a breakpoint and I randomly happen to execute some code from the library project, then I can just see the assembly view, but I can't open the 'source' or 'mixed' views.

 

While in the assembly view for the library code, if I set a breakpoint there, that works.

So the problem applies to breakpoints that are set from the C source view.

 

Mysterious CodeWarrior...

 

Any help would be greatly appreciated!!

Emanuel

Labels (1)
0 Kudos
9 Replies

675 Views
ipa
Contributor III

Hi,

I had similar problems debugging the code. In my case the code was excessively optimized by the

compiler - some variables were allocated to registers for instance - I was lucky the code was 

a general algorithm and no processor registers were involved. I solved the problem moving the code 

to Visual Studio C++ and debugging from there, I discoverd only some small typing errors.. (the debugger is fine...). In other case, I solved the problem by breaking the code into small functions called as needed.

Regards,

ipa

0 Kudos

675 Views
ZiglioNZ
Contributor I

Hi Ipa,

thanks. I do have all optimizations off and I used to be able to step in the source code of my library project until recently. But it's interesting that you've moved to Visual Studio. Was that for embedded development? 

 

I've found on internet a message from a guy with the same problem. Unfortunately, no one has answered.

Here's an excerpt:

sometimes when i try to place the breakpoint over the same
assembly code without doing any change in any part of the project, it
appears in dark red color and i am able to break into and step in for
debugging my codewarrior application in MCF5272.

Is this a bug in Codewarrior or Any other configuration problems w.r.t
my compiler.
This causes me a lot of problems while development as it is unreliable.

0 Kudos

675 Views
ipa
Contributor III

Hi,

I develop for embedded application - I use MCF5282. In my project window the debug column is set to generate debug symbols and optimization level is 1. However, several times I faced this problem and the only solution was to check with another compiler first.

Regards,

ipa

0 Kudos

675 Views
ZiglioNZ
Contributor I

Hi Ipa,

 

correct me if I'm wrong. You use another compiler (the one with Visual Studio) to debug code.

But that code then runs on your windows PC, not on the target right?

0 Kudos

675 Views
ipa
Contributor III

Hi, I am developing for MCF5282, but for some debugging purposes, I use sometime another compiler: compile/debug there and then move the code back to CW, recompile, check and go further. In my case the algorithm debugged was some kind of general purpose, without involving some specific peripherals (ADC,timers,..)

Regards,

ipa

0 Kudos

675 Views
ZiglioNZ
Contributor I

Hi again,

 

sometimes I wonder how hard it would be to debug coldfire code with Eclipse.

I now they're working on moving CW to Eclipse, but in this time of trouble I don't know if that's a priority.

It'd be probably easier to start with an Ethernet BDI, since the API is well known. Am not too sure with the USB tap (there are tkl scripts we could look into)

0 Kudos

675 Views
ipa
Contributor III

Hi,

There is a toolchain available at www.codesourcery.com - they claims supporting BDM, but I did not fully tryied yet - I installed everything and begin adapting/modifying the code, but up to now I did not connected the BDM. But I checked Eclipse + GNU - ARM toolchain and the debugger works fine. It seems the GNU - ARM community is more active than GNU - Coldfire.

Regards,

ipa

0 Kudos

675 Views
ZiglioNZ
Contributor I

I've found another thread on Internet I can't help but feeling sympathetic with

 

Apart from this problem, I have heaps and heaps of problems using the debugger. Despite restarting my machine, restarting CodeWarrior, removing object code, removing the build product(s), rebuilding the Classic database, exporting and importing the project, combining all my subprojects into one integral project, setting options (on all my projects) over and over again, clearing all breakpoints, closing and opening the symbol file, I cannot do but a handfull of succesfull debug-sessions per day. And even when the debugger inconspicously looks right, e.g. no breakpoints on comment lines, all statements eligble for breakpoint, I do get the feeling that sometimes variables are incorrect.

http://www.mackb.com/Uwe/Forum.aspx/codewarrior/1044/comp-sys-mac-programmer-codewarrior

 The message is from 2004. Things with CW seem to have improved in 2009, but just...

Message Edited by ZiglioNZ on 2009-03-12 09:59 AM
0 Kudos

675 Views
ZiglioNZ
Contributor I

I've found the solution: it's the 'debug' column in the project window.

I had disabled the output of debug symbols for my library project, by mistake, not knowing what that was (apologies to all CW developers).

 

Thanks to this entry

 

http://www.palmoswerks.com/stories/storyReader$155

Why Can't I Set a Breakpoint?

 First, make sure the compiler is generating debug information for your source file. This is controlled by the debug column in your project window; a dot should be in the column with the bug at the top.

 

0 Kudos