??? 06/11/12 01:31 Read: times |
#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... Hal |
Topic | Author | Date |
SiLabs C8051F120 & SDCC Startup code | 01/01/70 00:00 | |
mind the underscore | 01/01/70 00:00 | |
Thank you, Maarten! | 01/01/70 00:00 | |
Underscore | 01/01/70 00:00 | |
Now it makes sense | 01/01/70 00:00 |