[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] How .weak?
From: |
Kang Tin LAI |
Subject: |
[avr-gcc-list] How .weak? |
Date: |
Wed, 18 Apr 2001 20:50:54 +0800 |
Hi,
I have some questions, the C startup code of AVR libc:
; These too can be set with the avr-ld --defsym name=value option
; (MCUCR must be set up correctly to enable external SRAM).
.weak __init_mcucr__
.weak __init_emcucr__
.weak __init_wdtcr__
... stuff skipped
#ifdef WDTCR
ldi r_tmp1, lo8(__init_wdtcr__)
wdr
out WDTCR, r_tmp1
#endif
#ifdef MCUCR
ldi r_tmp1, lo8(__init_mcucr__)
out MCUCR, r_tmp1
#endif
#ifdef EMCUCR
ldi r_tmp1, lo8(__init_emcucr__)
out EMCUCR, r_tmp1
#endif
1. .weak is AVR specific directive?
2. .weak __init_mcucr__ will allocate a storage? Or just define
a symbol?
3. What value will be assigned to WDTCR, MCUCR and EMCUCR
after instructions above? Zero sure? Assume no --defsym option.
Thank you very much!
KTL
- [avr-gcc-list] How .weak?,
Kang Tin LAI <=