From: Martin L. <le...@di...> - 2005-05-02 15:27:53
|
Hi All. I was trying to do something in the style of "avr-objdump", that is a disassemble some code possibly with the c-source intermixed. I'm using sdcc version 2.5.0-pre1 #1018 (latest cvs as of a few minutes ago). It seems that s51 and sdcdb can do some of these things. The manual isn't that much help here, so could anyone explain to me how this works in sdcc (and associated tools)? While doing that I stumbled on to an other problem: it seems that the assembler doesn't like to assemble output files from sdcc produced with --debug if the filename contains a "-": I compiled and an extremely simple program (attached) and disassembled with s51. I was hoping that sdcdb could give me a little more - to do this I enabled the --debug option when compiling with sdcc, and it fails: sdcc --debug SetPort-sdcc2.c ?ASxxxx-Error-<o> in line 395 of SetPort-sdcc2.asm <o> .org in REL area or directive / mnemonic error ?ASxxxx-Error-<o> in line 409 of SetPort-sdcc2.asm <o> .org in REL area or directive / mnemonic error ?ASxxxx-Error-<o> in line 412 of SetPort-sdcc2.asm <o> .org in REL area or directive / mnemonic error ?ASxxxx-Error-<o> in line 419 of SetPort-sdcc2.asm <o> .org in REL area or directive / mnemonic error removing SetPort-sdcc2.rel The offending lines are C-source code: 395 C$SetPort-sdcc2.c$3$0$0 ==. ... 409 C$SetPort-sdcc2.c$4$1$1 ==. ... 419 C$SetPort-sdcc2.c$7$1$1 ==. If I rename the same program to SetPortsdcc2.c all is well... I've attached the program and .asm output for reference. -- Regards Martin Leopold. Dept. of Computer Science, University of Copenhagen |