??? 05/18/10 21:04 Read: times |
#176009 - try one of these options Responding to: ???'s previous message |
> If someone coukld give me a recipe for assembling and
> linking in a "locally built" startup ... I'm afraid this is in the manual. Section: 3.12.1 MCS51/DS390 Startup Code "... . The recommended way would be to copy crt... into the source directory, adapt it there, then assemble it with asx8051 ... and when linking your project explicitly specify ... . As a bonus a ..." An up to date pdf version of the manual is here: http://sdcc.sf.net/doc/sdccman.pdf (this might be newer than SDCC version you are using. The matching version either is on your Windows PC or should be a few clicks away from http://sdcc.sf.net) Apart from that I see a few (>=6) other options as well: b) if your emulator does not allow setting a breakpoint at locations where no code is available for (strange) then to save time on single stepping remove global variables which are zero'ed or initialized. Then after reset of the emulator single stepping should get you after a few dozen steps to the point where main is called. c) use a simulator instead of your emulator. Little hardware specific stuff probably is before main (maybe watchdog, using a paging register different from P2 on deviates, enabling/mapping XDATA mem). So a plain 8051 simulator should take you after a few dozen steps to the point where you think the problem is. (let the simulator use the intel hex file if you really suspect .omf related problems) d) use one of the cheapo (f.e. Silabs) in circuit debuggers and do it there. e) use a disassembler and compare its output to section 3.12.1. With special care for the address used here: lcall _main (for non commercial readers of this posting an Open Source disassembler is here: http://www.8052.com/users/disasm/ ) f) use an on target monitor like paulmon2, cmon51 (google or look into section 6.5 "Related open source tools") or the Keil monitor to start the SDCC generated code (compile your source with appropriate --data-loc and --code-loc). g) switch on tracing on your emulator (if it allows) and have a glance over the trace file. Greetings, Frieder |