avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] problems with bootloader functions


From: juan antonio jimenez martinez
Subject: [avr-gcc-list] problems with bootloader functions
Date: Tue, 04 Oct 2005 20:24:18 +0000

Hi every body, Im experimenting some problems writing to a flash page in my ATMEGA8, does some one know any good source to solve this or any tutorial on how to write and read from the flas memory.
I include the compiler output when I try to use the bootloader functions

thanks

JAJM

#include <avr/io.h>
#include <avr/pgmspace.h>
#define ADDRESS     0x400UL

#include "./sampler.txt"//arreglo con las muestran en una arreglo llamado tabla
int main(void){

// borra la pagina de la flash que contiene esa dirección del byte
   boot_page_erase((unsigned long)ADDRESS);
   while(boot_rww_busy()){
       boot_rww_enable();//espera a que termine
   }

        for(;;){}
}

what I try to do in this little program is , first I have defined a section in flash memory called tablas in memory space 400H where I store a set of values, the I try to erase the page starting in the address 400H and see if it works but I got this messages from the compiller

avr-gcc (GCC) 3.4.1
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Compiling: tablas.c
avr-gcc -c -mmcu=atmega8 -I. -gstabs -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=tablas.lst -std=gnu99 -Wp,-M,-MP,-MT,tablas.o,-MF,.dep/tablas.o.d tablas.c -o tablas.o
tablas.c: In function `main':
tablas.c:34: warning: implicit declaration of function `boot_page_erase'
tablas.c:35: warning: implicit declaration of function `boot_rww_busy'
tablas.c:36: warning: implicit declaration of function `boot_rww_enable'

Linking: tablas.elf
avr-gcc -mmcu=atmega8 -I. -gstabs -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=tablas.o -std=gnu99 -Wp,-M,-MP,-MT,tablas.o,-MF,.dep/tablas.elf.d tablas.o --output tablas.elf -Wl,-Map=tablas.map,--cref,--section-start=.flashtable=0x400 -lm
tablas.o(.text+0x22): In function `main':
tablas.c:34: undefined reference to `boot_page_erase'
tablas.o(.text+0x26):tablas.c:36: undefined reference to `boot_rww_enable'
tablas.o(.text+0x28):tablas.c:36: undefined reference to `boot_rww_busy'
c:\winavr\utils\bin\gmake.exe: *** [tablas.elf] Error 1

Process Exit Code: 2

I hope some one know whats happening

thanks






reply via email to

[Prev in Thread] Current Thread [Next in Thread]