Hur få snurr på en MEGA32?

PIC, AVR, Arduino, Raspberry Pi, Basic Stamp, PLC mm.
Användarvisningsbild
Forsgren
EF Sponsor
Inlägg: 1227
Blev medlem: 24 oktober 2003, 13:45:48
Ort: Orsa

Inlägg av Forsgren »

Får försöka lite mer.. Tog ett exempel rakt av från http://hubbard.engr.scu.edu/embedded/avr/avrlib/ tänkte det borde fungera, men icke...

Vilken är den bästa editorn att använda med gcc? Gärna någon som fixar så man slipper göra egna Makefile-filer, KamAVR har jag kört, någon annan?
frejo
Inlägg: 496
Blev medlem: 21 april 2004, 21:43:01
Ort: Linköping

Inlägg av frejo »

Använder du makefilen som följer med exemplet?
Tror jag hade samma problem själv nämligen, men det löstes genom att sno den makefilen.

Som editor använder jag programmers notepad som följer med WinAVR, funkar så pass bra att jag inte ens orkat prova någon annan..
Användarvisningsbild
Forsgren
EF Sponsor
Inlägg: 1227
Blev medlem: 24 oktober 2003, 13:45:48
Ort: Orsa

Inlägg av Forsgren »

Jopp det gör jag, å jag kör med programmers notepad.. Men de blir bara en massa fel..

Här är några rader av felmeddelandet jag får när jag försöker kompilera a2dtest.c:

avr-gcc -c -g -Os -Wall -Wstrict-prototypes -IE:\Program\AVRlib -Wa,-ahlms=E:\Program\AVRlib/buffer.lst -mmcu=atmega163 -I. E:\Program\AVRlib/buffer.c -o E:\Program\AVRlib/buffer.o
avr-gcc -c -g -Os -Wall -Wstrict-prototypes -IE:\Program\AVRlib -Wa,-ahlms=E:\Program\AVRlib/uart.lst -mmcu=atmega163 -I. E:\Program\AVRlib/uart.c -o E:\Program\AVRlib/uart.o
E:\Program\AVRlib/uart.c: In function `uartInit':
E:\Program\AVRlib/uart.c:53: warning: implicit declaration of function `outp'
E:\Program\AVRlib/uart.c:53: warning: implicit declaration of function `BV'
E:\Program\AVRlib/uart.c: In function `__vector_11':
E:\Program\AVRlib/uart.c:264: warning: implicit declaration of function `inp'
avr-gcc -c -g -Os -Wall -Wstrict-prototypes -IE:\Program\AVRlib -Wa,-ahlms=E:\Program\AVRlib/rprintf.lst -mmcu=atmega163 -I. E:\Program\AVRlib/rprintf.c -o E:\Program\AVRlib/rprintf.o
E:\Program\AVRlib/rprintf.c: In function `rprintfProgStr':
E:\Program\AVRlib/rprintf.c:122: warning: implicit declaration of function `PRG_RDB'
avr-gcc -c -g -Os -Wall -Wstrict-prototypes -IE:\Program\AVRlib -Wa,-ahlms=E:\Program\AVRlib/timer.lst -mmcu=atmega163 -I. E:\Program\AVRlib/timer.c -o E:\Program\AVRlib/timer.o
E:\Program\AVRlib/timer.c: In function `timer0Init':
E:\Program\AVRlib/timer.c:83: warning: implicit declaration of function `outp'
E:\Program\AVRlib/timer.c:84: warning: implicit declaration of function `sbi'
E:\Program\AVRlib/timer.c: In function `timer0SetPrescaler':
E:\Program\AVRlib/timer.c:113: warning: implicit declaration of function `inp'
E:\Program\AVRlib/timer.c: In function `timer1PWMInit':
E:\Program\AVRlib/timer.c:272: warning: implicit declaration of function `cbi'
avr-gcc -c -g -Os -Wall -Wstrict-prototypes -IE:\Program\AVRlib -Wa,-ahlms=E:\Program\AVRlib/a2d.lst -mmcu=atmega163 -I. E:\Program\AVRlib/a2d.c -o E:\Program\AVRlib/a2d.o
E:\Program\AVRlib/a2d.c: In function `a2dInit':
E:\Program\AVRlib/a2d.c:36: warning: implicit declaration of function `sbi'
E:\Program\AVRlib/a2d.c:37: warning: implicit declaration of function `cbi'
E:\Program\AVRlib/a2d.c: In function `a2dSetPrescaler':
E:\Program\AVRlib/a2d.c:58: warning: implicit declaration of function `outp'
E:\Program\AVRlib/a2d.c:58: warning: implicit declaration of function `inp'
avr-gcc -c -g -Os -Wall -Wstrict-prototypes -IE:\Program\AVRlib -Wa,-ahlms=E:\Program\AVRlib/vt100.lst -mmcu=atmega163 -I. E:\Program\AVRlib/vt100.c -o E:\Program\AVRlib/vt100.o
avr-gcc E:\Program\AVRlib/buffer.o E:\Program\AVRlib/uart.o E:\Program\AVRlib/rprintf.o E:\Program\AVRlib/timer.o E:\Program\AVRlib/a2d.o E:\Program\AVRlib/vt100.o a2dtest.o -Wl,-Map=a2dtest.map,--cref -mmcu=atmega163 -o a2dtest.elf
E:\Program\AVRlib/rprintf.o(.text+0xbe): In function `rprintfProgStr':
E:\Program\AVRlib/rprintf.c:63: undefined reference to `PRG_RDB'
E:\Program\AVRlib/rprintf.o(.text+0xf0): In function `rprintfu04':
E:\Program\AVRlib/rprintf.c:61: undefined reference to `PRG_RDB'
frejo
Inlägg: 496
Blev medlem: 21 april 2004, 21:43:01
Ort: Linköping

Inlägg av frejo »

Det enda jag kan komma på just nu är makefilen eller inställningar för "make all" i programmers notepad.

Här är mina inställningar under tools/globals för make all i pn:
http://www.student.itn.liu.se/~frejo242/temp/dump.png

och min makefil:
http://www.student.itn.liu.se/~frejo242/temp/makefile
Skriv svar