John, Your mcu has its watchdog enabled by default and it bites before you can kick it in main(). Create your own _sdcc_external_startup() function and setup the watchdog there by either kicking it, setting a longer timeout or disabling it.
Happy programming, Maarten > My problem seems to be in the initial data setup phase, there is a sequence > in the startup code, that is what is loaded in from the reset vector to > my 'c' main > code, that 'clears' the xdata area associated with the program variables. > > I have several arrays, but the total data that is being cleared seems to be > only 37 bytes, from the .map file. > > By single stepping through the start up code, it seems that when the several > loops are completed, initialization continues, by writing the pattern > 0xf0 to > internal ram, starting at location 0x08. At that point the startup code > jumps > back to the reset location, and then performs the initial LJMP back into > the initialization code, and, essentially loops forever. > > Unfortunately, when I attempt to pair down the code to submit a small > snippet that demostrates the problem, the problem disappears. > > However, in the code that fails, only a 3 byte array can change the program > from 'working' to 'non-working'. > > If others have seen similar problems I'd appriciate any clues on where to > go to solve this problem. > > John Clark. > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Sdcc-user mailing list > Sdcc-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/sdcc-user > ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user