Witam,
Mam programatorek avr910 i urzywam WinAVR 20060125, chciałbym skonfigurować tan pakiecik tak, żeby po kliknięciu Make All w Programmers Notepad wykonywanie pliku make stworzonego przy pomocy MFile wywołało avrdude i załadowało flasha. Programator jest z wsadem ze strony http://www.klaus-leidinger.de/mp/Mikrocontroller/AVR-Prog/AVR-Programmer.html skompilowanym dla prędkości UART'a równej 115200 bodów. W pliku avrdude.conf mam dopisane pod sekcją dla avr910 "baudrate=115200" i sam soft do programowania działa zarówno z wiersza poleceń jak i z nakładki. Problem jest natomiast z plikiem makefile. Make All kompiluje poprawnie prościutki programik zapalający diodę ale nie startuje programowanie. Nie mam już pojęcie co można tam jeszcze pozmieniać. Zamieszczam wyniki kompilacji i zawartość makefile. Może bardziej doświadczeni wskażą ewentualne miejca gdzie jest błąd.
Pzr.
Poniżej kawałki makefile dotyczące avrdude.
Mam programatorek avr910 i urzywam WinAVR 20060125, chciałbym skonfigurować tan pakiecik tak, żeby po kliknięciu Make All w Programmers Notepad wykonywanie pliku make stworzonego przy pomocy MFile wywołało avrdude i załadowało flasha. Programator jest z wsadem ze strony http://www.klaus-leidinger.de/mp/Mikrocontroller/AVR-Prog/AVR-Programmer.html skompilowanym dla prędkości UART'a równej 115200 bodów. W pliku avrdude.conf mam dopisane pod sekcją dla avr910 "baudrate=115200" i sam soft do programowania działa zarówno z wiersza poleceń jak i z nakładki. Problem jest natomiast z plikiem makefile. Make All kompiluje poprawnie prościutki programik zapalający diodę ale nie startuje programowanie. Nie mam już pojęcie co można tam jeszcze pozmieniać. Zamieszczam wyniki kompilacji i zawartość makefile. Może bardziej doświadczeni wskażą ewentualne miejca gdzie jest błąd.
Pzr.
> "make.exe" all
-------- begin --------
avr-gcc (GCC) 3.4.5
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.
Size before:
test_1.elf :
section size addr
.text 172 0
.data 0 8388704
.bss 0 8388704
.noinit 0 8388704
.eeprom 0 8454144
.stab 876 0
.stabstr 132 0
.debug_aranges 20 0
.debug_pubnames 38 0
.debug_info 161 0
.debug_abbrev 103 0
.debug_line 158 0
.debug_str 107 0
Total 1767
Compiling: test_1.c
avr-gcc -c -mmcu=atmega16 -I. -gdwarf-2 -DF_CPU=7372800UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=test_1.lst -std=gnu99 -MD -MP -MF .dep/test_1.o.d test_1.c -o test_1.o
test_1.c: In function `config':
test_1.c:7: warning: control reaches end of non-void function
Linking: test_1.elf
avr-gcc -mmcu=atmega16 -I. -gdwarf-2 -DF_CPU=7372800UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=test_1.o -std=gnu99 -MD -MP -MF .dep/test_1.elf.d test_1.o --output test_1.elf -Wl,-Map=test_1.map,--cref -lm
Creating load file for Flash: test_1.hex
avr-objcopy -O ihex -R .eeprom test_1.elf test_1.hex
Creating load file for EEPROM: test_1.eep
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 -O ihex test_1.elf test_1.eep
Creating Extended Listing: test_1.lss
avr-objdump -h -S test_1.elf > test_1.lss
Creating Symbol Table: test_1.sym
avr-nm -n test_1.elf > test_1.sym
Size after:
test_1.elf :
section size addr
.text 172 0
.data 0 8388704
.bss 0 8388704
.noinit 0 8388704
.eeprom 0 8454144
.stab 876 0
.stabstr 132 0
.debug_aranges 20 0
.debug_pubnames 38 0
.debug_info 161 0
.debug_abbrev 103 0
.debug_line 158 0
.debug_str 107 0
Total 1767
-------- end --------
> Process Exit Code: 0
> Time Taken: 00:02
Poniżej kawałki makefile dotyczące avrdude.
#---------------- Programming Options (avrdude) ----------------
# Programming hardware: alf avr910 avrisp bascom bsd
# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500
#
# Type: avrdude -c ?
# to get a full listing.
#
AVRDUDE_PROGRAMMER = avr910
# com1 = serial port. Use lpt1 to connect to parallel port.
AVRDUDE_PORT = com1 # programmer connected to serial device
AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
# Uncomment the following if you want avrdude's erase cycle counter.
# Note that this counter needs to be initialized first using -Yn,
# see avrdude manual.
#AVRDUDE_ERASE_COUNTER = -y
# Uncomment the following if you do /not/ wish a verification to be
# performed after programming the device.
AVRDUDE_NO_VERIFY = -V
# Increase verbosity level. Please use this when submitting bug
# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
# to submit bug reports.
#AVRDUDE_VERBOSE = -v -v
AVRDUDE_FLAGS = -p $(MCU) -c $(AVRDUDE_PROGRAMMER)
AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)
AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)
AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)
# Program the device.
program: $(TARGET).hex $(TARGET).eep
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)