How can I debug an externally compiled application?

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

How can I debug an externally compiled application?

1,636 Views
spelc
Contributor I

I have recently come back to Coldfire after years with ARMs and want to update our Forth compiler. I have an MCF52259 DemoKit. How do I get Codewarrior to debug an externally compiled application? Our compiler can generate a range of output formats including ELF and S-Record. I'm stuck at the moment because CW is complaining about the lack of "symbolics". Is there a way round this? I'm quite prepared to single-step my way through it all one machine instruction at a time.

 

Stephen

Labels (1)
0 Kudos
Reply
3 Replies

1,088 Views
scifi
Senior Contributor I

The Lauterbach Debugger claims to support multiple compilers:

 

http://www.lauterbach.com/clist.html

0 Kudos
Reply

1,088 Views
mjbcswitzerland
Specialist V

Stephen

 

Although not a hugely efficient method CW can load any file to FLASH and then step the code in assembler (without any source code reference). As long as you have a map file as reference to where the subroutines are (you can also usually generate a pseudo assembler file from other compilers which mixes the C-code with the generated assembler) you can set breakpoints on the individual routines and step them. This can be adequate to debug a few cases. (The assembler view can be enabled at the bottom of the screen and switched between source, mixed and disassembled).

 

Regards

 

Mark

 

www.uTasker.com

0 Kudos
Reply

1,088 Views
spelc
Contributor I

Thanks for that. I assume that the format for .xMAP files is defined somewhere?

 

Assume that our compiler generates

  Demo52259.s37   S-Record file that may grow beyond 64kb

I have produced a .xMap file

  Demo52259.s37.xmap

in the same directory, but CW still complains. Where should I put this file?

 

I should have got the full P&E kit but was feeling cheap. By comparison, the cheap Renesas H8 kit installed flawlessly, and I was up and debugging our Forth code in under an hour. I've been programming 68k and Coldfire devices for a very long time. I even remember CPM68K. It just doesn't have to be this hard to start low-level debugging.

0 Kudos
Reply