Witam,
Przeglądam Internet, w tym forum Elektrody od ok. 3 tygodni. Rozwiązałem mnóstwo problemów początkujących użytkowników zestawów mikroprocesorowych. Nie w tym problem. Jestem już bardzo blisko celu, a jest nim użytkowanie środowiska Eclipce, procesorów Avr (Atmega 644p), zakupionej płytki EvB v. 4.3 (dokumentacja płytki), języka C i programatora zewnętrznego względem płytki, czyli USBasp (tego na płytce - przejściówka przez FT232 nie sposób używać - przynajmniej nie znalazłem informacji o takiej możliwości poza tymi odnoszącymi się do zestawu f. Atnel -> ATBManager).
Mój (mam nadzieję) jeden z ostatnich problemów jest następujący.
Korzystam z programu:
Po "build" w Eclipse (ikona młotek), w zakładce Console na dole otrzymuje:
**** Build of configuration Release for project test ****
make all
Invoking: Print Size
avr-size --format=avr --mcu=atmega16 test.elf
AVR Memory Usage
----------------
Device: atmega16
Program: 156 bytes (1.0% Full)
(.text + .data + .bootloader)
Data: 0 bytes (0.0% Full)
(.data + .bss + .noinit)
Finished building: sizedummy
Invoking: AVRDude
C:\WinAVR-20100110\bin\avrdude -pm16 -cusbasp -F -Uflash:w:test.hex:a
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e960a
avrdude: Expected signature for ATMEGA16 is 1E 94 03
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "test.hex"
avrdude: input file test.hex auto detected as Intel Hex
avrdude: writing flash (156 bytes):
Writing | ################################################## | 100% 0.09s
avrdude: 156 bytes of flash written
avrdude: verifying flash memory against test.hex:
avrdude: load data flash data from input file test.hex:
avrdude: input file test.hex auto detected as Intel Hex
avrdude: input file test.hex contains 156 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.05s
avrdude: verifying ...
avrdude: 156 bytes of flash verified
avrdude done. Thank you.
Finished building: avrdudedummy
Następnie korzystam z "Upload current project to Atmel" (napis AVR i zielona strzałka w dół) i otrzymuję:
Launching C:\WinAVR-20100110\bin\avrdude -pm16 -cusbasp -F -Uflash:w:test.hex:a
Output:
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x000102
avrdude: Expected signature for ATMEGA16 is 1E 94 03
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: current erase-rewrite cycle count is -50462977 (if being tracked)
avrdude: erasing chip
avrdude: reading input file "test.hex"
avrdude: input file test.hex auto detected as Intel Hex
avrdude: writing flash (156 bytes):
Writing | ################################################## | 100% 0.08s
avrdude: 156 bytes of flash written
avrdude: verifying flash memory against test.hex:
avrdude: load data flash data from input file test.hex:
avrdude: input file test.hex auto detected as Intel Hex
avrdude: input file test.hex contains 156 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.05s
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
0x0c != 0x00
avrdude: verification error; content mismatch
avrdude done. Thank you.
avrdude finished
Czyli żadnych błędów. Przynajmniej ja nie widzę. Powyższa sekwencja czynności jest wykonywalna tylko raz. Po zmianie np. liczby ms i ponownym wykonaniu powyższych czynności wciąż wykonywany jest pierwszy wgrany program. Nie pomaga wgranie (bez błędów i problemów) bootloadera i ponowne wykonania powyższych czynności. Procesor zaprogramowany został raz i tak zostało i nie pomagają zmiany w kodzie i ponowne upload'y i restarty.
Proszę :=) : podpowiedzcie Panie i Panowie w czym może być problem i jak go ew. rozwiązać? Przyda się jakakolwiek wskazówka. Próbowałem przejść problem programowania procesora poprzez złącze USB na płytce (przez układ FT232..) i działa wszystko super ale tylko pod Bascom AVR. Kupiłem USBasp - ale to z kolei nie jest obsługiwane przez AVR Studio. MUSZĘ w Basicu programować :=) ? Potrzebuję odrobiny komfortu :=) (jeden, dwa klawisze) do przeniesienia programu z kodu źródłowego do procesora.
Jeszcze raz proszę o pomoc.
Przeglądam Internet, w tym forum Elektrody od ok. 3 tygodni. Rozwiązałem mnóstwo problemów początkujących użytkowników zestawów mikroprocesorowych. Nie w tym problem. Jestem już bardzo blisko celu, a jest nim użytkowanie środowiska Eclipce, procesorów Avr (Atmega 644p), zakupionej płytki EvB v. 4.3 (dokumentacja płytki), języka C i programatora zewnętrznego względem płytki, czyli USBasp (tego na płytce - przejściówka przez FT232 nie sposób używać - przynajmniej nie znalazłem informacji o takiej możliwości poza tymi odnoszącymi się do zestawu f. Atnel -> ATBManager).
Mój (mam nadzieję) jeden z ostatnich problemów jest następujący.
Korzystam z programu:
#include <util/delay.h>
#include <avr/io.h>
int main()
{
DDRD=0xFF;
while(1){
PORTD=0x00;
_delay_ms(300);
PORTD=0xFF;
_delay_ms(300);
}
return 0;
}
Po "build" w Eclipse (ikona młotek), w zakładce Console na dole otrzymuje:
**** Build of configuration Release for project test ****
make all
Invoking: Print Size
avr-size --format=avr --mcu=atmega16 test.elf
AVR Memory Usage
----------------
Device: atmega16
Program: 156 bytes (1.0% Full)
(.text + .data + .bootloader)
Data: 0 bytes (0.0% Full)
(.data + .bss + .noinit)
Finished building: sizedummy
Invoking: AVRDude
C:\WinAVR-20100110\bin\avrdude -pm16 -cusbasp -F -Uflash:w:test.hex:a
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e960a
avrdude: Expected signature for ATMEGA16 is 1E 94 03
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "test.hex"
avrdude: input file test.hex auto detected as Intel Hex
avrdude: writing flash (156 bytes):
Writing | ################################################## | 100% 0.09s
avrdude: 156 bytes of flash written
avrdude: verifying flash memory against test.hex:
avrdude: load data flash data from input file test.hex:
avrdude: input file test.hex auto detected as Intel Hex
avrdude: input file test.hex contains 156 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.05s
avrdude: verifying ...
avrdude: 156 bytes of flash verified
avrdude done. Thank you.
Finished building: avrdudedummy
Następnie korzystam z "Upload current project to Atmel" (napis AVR i zielona strzałka w dół) i otrzymuję:
Launching C:\WinAVR-20100110\bin\avrdude -pm16 -cusbasp -F -Uflash:w:test.hex:a
Output:
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x000102
avrdude: Expected signature for ATMEGA16 is 1E 94 03
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: current erase-rewrite cycle count is -50462977 (if being tracked)
avrdude: erasing chip
avrdude: reading input file "test.hex"
avrdude: input file test.hex auto detected as Intel Hex
avrdude: writing flash (156 bytes):
Writing | ################################################## | 100% 0.08s
avrdude: 156 bytes of flash written
avrdude: verifying flash memory against test.hex:
avrdude: load data flash data from input file test.hex:
avrdude: input file test.hex auto detected as Intel Hex
avrdude: input file test.hex contains 156 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.05s
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
0x0c != 0x00
avrdude: verification error; content mismatch
avrdude done. Thank you.
avrdude finished
Czyli żadnych błędów. Przynajmniej ja nie widzę. Powyższa sekwencja czynności jest wykonywalna tylko raz. Po zmianie np. liczby ms i ponownym wykonaniu powyższych czynności wciąż wykonywany jest pierwszy wgrany program. Nie pomaga wgranie (bez błędów i problemów) bootloadera i ponowne wykonania powyższych czynności. Procesor zaprogramowany został raz i tak zostało i nie pomagają zmiany w kodzie i ponowne upload'y i restarty.
Proszę :=) : podpowiedzcie Panie i Panowie w czym może być problem i jak go ew. rozwiązać? Przyda się jakakolwiek wskazówka. Próbowałem przejść problem programowania procesora poprzez złącze USB na płytce (przez układ FT232..) i działa wszystko super ale tylko pod Bascom AVR. Kupiłem USBasp - ale to z kolei nie jest obsługiwane przez AVR Studio. MUSZĘ w Basicu programować :=) ? Potrzebuję odrobiny komfortu :=) (jeden, dwa klawisze) do przeniesienia programu z kodu źródłowego do procesora.
Jeszcze raz proszę o pomoc.