I was wondering if it is somehow possible to debug a program that I compiled with SDCC in Eclipse?
I could not find anything so I tried to extend the SDCC plugin but here is the thing:
Though I can receive all information from my µ-device (PC, Registers..) and I build my LaunchConfiguration for Eclipse, I am not able to associate the value of the PC to its corresponding line.
Here is a small example how Keil seem to solve this problem:
SYMBOL TABLE OF MODULE: target (STARTUP)
VALUE TYPE NAME
C:C003H LINE# 59
C:C006H LINE# 60
C:C009H LINE# 62
C:C00FH LINE# 63
C:C014H LINE# 64
C:C01DH LINE# 66
C:C020H LINE# 67
C:C020H LINE# 68
C:C020H LINE# 69
so if PC == 0xC014 the line 64 will be highlighted.
How does SDCC manage these information? I found that SDCC generated files like *.rst and *.lst but I have no idea how I could connect these information to the Eclipse IDE.
Okay I came to that point where I'd just need a .cdb-file parser. ^^
How about OMF files?
Did you manage to get debugging working under Eclipse?
I would be interested to know how you do this under Eclipse.
I was wondering if it is somehow possible to debug a program that I compiled with SDCC in Eclipse
You didn't mention architecture so I suppose that is a generic question.
For Eclipse you can have all those (1:6) features with GCC and ARMs, MIPSes, AVR8s and obviously x86.
For SDCC you can have (1:4) with MPLABX + SDCC plugin for PIC8s. The (5) does not work very well.
I suggest you should see how mentioned architectures/toolchains manage debugging.
The used architecture is MCS51. There is already a server that is able to communicate with that device in a quiet straight forward way. E.g. you can always ask the current value of the program counter or any other register. So this part is already done. The only thing that is missing is to connect the information I can get from the device to the C code and/or assembly code that describes the program.
Basically "all I need" would be a parser for .cdb and .lst files to convert these information to objects at runtime.
(Sorry I did ask axact the same question today - I thought this question here never got any answers)
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.