[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Extended SRAM access
From: |
Theodore Roth |
Subject: |
Re: [avr-gcc-list] Extended SRAM access |
Date: |
Tue, 2 Jul 2002 09:54:47 -0600 (MDT) |
On Tue, 2 Jul 2002, Marek Michalkiewicz wrote:
:)
:) The method of early initialization (MCUCR, WDTCR or anything else) is
:) different (and more flexible) in the current version. Basically, write
:) a small assembler file which looks like this:
:)
:) /* xram.S begin */
:)
:) #include <io.h>
:)
:) .section .init1,"ax",@progbits
:)
:) ldi r16,_BV(SRE) | _BV(SRW)
:) out _SFR_IO_ADDR(MCUCR),r16
:)
:) /* xram.S end */
I've found that this also works from a C source file:
void my_init (void) __attribute__ ((naked)) \
__attribute__ ((section (".init1")));
void my_init (void)
{
/* your init code here; C or inline asm */
}
Ted Roth
avr-gcc-list at http://avr1.org
- [avr-gcc-list] Extended SRAM access, teboho, 2002/07/04
- Re: [avr-gcc-list] Extended SRAM access, Marek Michalkiewicz, 2002/07/04
- Re: [avr-gcc-list] Extended SRAM access,
Theodore Roth <=
- Re: [avr-gcc-list] Extended SRAM access, Joerg Wunsch, 2002/07/04
- [avr-gcc-list] avr-libc docs, Theodore Roth, 2002/07/04
- Re: [avr-gcc-list] avr-libc docs, Joerg Wunsch, 2002/07/04
- Re: [avr-gcc-list] avr-libc docs, Marek Michalkiewicz, 2002/07/05
- Re: [avr-gcc-list] avr-libc docs, Joerg Wunsch, 2002/07/05
- Re: [avr-gcc-list] avr-libc docs, Marek Michalkiewicz, 2002/07/05
- Re: [avr-gcc-list] avr-libc docs, Joerg Wunsch, 2002/07/05
- Re: [avr-gcc-list] avr-libc docs, Joerg Wunsch, 2002/07/05
- [avr-gcc-list] probelms with new avr-gcc from avr-freaks, Dafni & Robert Berger, 2002/07/06
- Re: [avr-gcc-list] probelms with new avr-gcc from avr-freaks, Theodore Roth, 2002/07/06