Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
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

List of 51 messages in thread
TopicAuthorDate
SDCC debug            01/01/70 00:00      
   version            01/01/70 00:00      
      2.9.0 #5416            01/01/70 00:00      
         humm            01/01/70 00:00      
            files            01/01/70 00:00      
               General Comments            01/01/70 00:00      
                  stating the problem            01/01/70 00:00      
               why would that be impossible?            01/01/70 00:00      
                  omf smaller than hex            01/01/70 00:00      
                     link, please            01/01/70 00:00      
                        links            01/01/70 00:00      
   played with the commandline options and ...            01/01/70 00:00      
      What do you mean by "blows in startup"?            01/01/70 00:00      
         goes to undefined memory and never reaches main            01/01/70 00:00      
            try one of these options            01/01/70 00:00      
               Thanks, It'll be a day or two            01/01/70 00:00      
                  SiLabs or not            01/01/70 00:00      
                     yes, SILabs            01/01/70 00:00      
                        breakpoint            01/01/70 00:00      
   found a cause, but ....            01/01/70 00:00      
      disassembly            01/01/70 00:00      
      not having _sdcc_external_startup            01/01/70 00:00      
      seems you feed SDCC with a Keil specific header file            01/01/70 00:00      
         false entry, sorry            01/01/70 00:00      
         reply            01/01/70 00:00      
            legal C reused by Keil            01/01/70 00:00      
               3 questions            01/01/70 00:00      
                  3 answers            01/01/70 00:00      
                     thnks for 3 answers and more stuff            01/01/70 00:00      
                        incomplete            01/01/70 00:00      
               since 'porting' to SDCC ...            01/01/70 00:00      
                  agreed!            01/01/70 00:00      
   neither works, what do I do            01/01/70 00:00      
      no problem at my place            01/01/70 00:00      
   I ma stuck on the next one            01/01/70 00:00      
      strings in C            01/01/70 00:00      
         Thanks, Jan ....            01/01/70 00:00      
            that's the kosher way            01/01/70 00:00      
         No, the string shall fit according to the C standard            01/01/70 00:00      
            indeed            01/01/70 00:00      
      bug found            01/01/70 00:00      
         read again            01/01/70 00:00      
         somehow the SDCC forum did not take my post...            01/01/70 00:00      
            sdcc.exe does return an error status            01/01/70 00:00      
               why would you think that?            01/01/70 00:00      
                  grep etc            01/01/70 00:00      
                     Unix goodies            01/01/70 00:00      
            sdcc forum post visible            01/01/70 00:00      
               what are you doing diffrently?            01/01/70 00:00      
                  DOS bat command gotcha            01/01/70 00:00      
                     Thanks Jan            01/01/70 00:00      

Back to Subject List