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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Hal Albach
06/10/12 19:31
Read: 1737 times
Seminole, Florida

#187654 - SiLabs C8051F120 & SDCC Startup code
I am trying to move the two statements that disable the C8051F120 watchdog to the
"char sdcc_external_startup(void)" function. I set it as as follows:

char sdcc_external_startup(void)
   WDTCN = 0xde;   // ALL SFR PAGES
   WDTCN = 0xad;   // Disable watchdog timer
return 0;


I also have the function prototyped. The program compiles without errors or warnings and loads and runs. However, the watchdog is pulling a Kujo, the LCD and LEDs are flickering like crazy. I move the two statements back to the top of MAIN and the puppy sleeps peacefully.
In the SDCC Manual (3.1.0) on page 45 it shows a sample startup listing and I can easily see the
"lcall __sdcc_external_startup" statement. In my project list file in the startup section I cannot find any such line. Is there an option that needs to be defined somewhere? I'm relatively new to C and SDCC so I'm sure I have overlooked something, somewhere.

I tried posting on the Silabs forum but even though I'm registered it won't accept any posts. Still waiting on the SDCC forum to green light my registration. Hopefully someone here can show me how to properly shoot this dog.

Thanks for looking in...


List of 5 messages in thread
SiLabs C8051F120 & SDCC Startup code      Hal Albach      06/10/12 19:31      
   mind the underscore        Maarten Brock      06/11/12 03:39      
      Thank you, Maarten!      Hal Albach      06/11/12 06:27      
         Underscore        Per Westermark      06/11/12 07:37      
            Now it makes sense      Hal Albach      06/11/12 08:36      

Back to Subject List