Pages: [1] 2   Go Down
Author Topic: Usare tutta la memoria dell' atmega8  (Read 1418 times)
0 Members and 1 Guest are viewing this topic.
Dueville (VI)
Offline Offline
Edison Member
*
Karma: 28
Posts: 1749
http://cesarecacitti.wordpress.com/
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Salve a tutti, oggi devo mettere lo sketch per il cubo led 3x3x smiley-evil su un atmega8, solo che lo sketch non ci sta, perchè l'ide contaggia anche lo spazio del bootloader che non c'è, io nel file boards.txt ho aggiunto questa stringa:
Code:
##############################################################

atmega8.name=Arduino NG or older w/ ATmega8

atmega8.upload.protocol=stk500
atmega8.upload.maximum_size=8000
atmega8.upload.speed=19200

atmega8.bootloader.low_fuses=0xdf
atmega8.bootloader.high_fuses=0xca
atmega8.bootloader.path=atmega8
atmega8.bootloader.file=ATmegaBOOT.hex
atmega8.bootloader.unlock_bits=0x3F
atmega8.bootloader.lock_bits=0x0F

atmega8.build.mcu=atmega8
atmega8.build.f_cpu=16000000L
atmega8.build.core=arduino

##############################################################
ma mi escono un sacco di errori quando compilo tipo questi:
Code:



In file included from ledcube.cpp:7:
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:13:22: error: WProgram.h: No such file or directory
In file included from ledcube.cpp:7:
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:19: error: expected `)' before 'size'
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:22: error: 'byte' does not name a type
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:23: error: 'byte' does not name a type
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:24: error: 'byte' does not name a type
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:26: error: 'byte' has not been declared
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:26: error: 'byte' has not been declared
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:26: error: 'byte' has not been declared
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:27: error: 'byte' has not been declared
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:27: error: 'byte' has not been declared
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:28: error: 'byte' has not been declared
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:28: error: 'byte' has not been declared
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:29: error: 'byte' has not been declared
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:29: error: 'byte' has not been declared
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:30: error: 'byte' has not been declared
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:30: error: 'byte' has not been declared
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:30: error: 'byte' has not been declared
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:31: error: 'byte' has not been declared
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:32: error: 'byte' has not been declared
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:32: error: 'byte' has not been declared
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:33: error: 'byte' has not been declared
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:34: error: 'byte' has not been declared
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:35: error: 'byte' has not been declared
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:36: error: 'byte' has not been declared
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:36: error: 'byte' has not been declared
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:37: error: 'byte' has not been declared
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:38: error: 'byte' has not been declared
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:40: error: 'boolean' has not been declared
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:41: error: 'boolean' has not been declared
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:45: error: 'byte' does not name a type
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:50: error: 'byte' does not name a type
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:51: error: 'byte' does not name a type
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:52: error: 'byte' does not name a type
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:53: error: ISO C++ forbids declaration of 'byte' with no type
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:53: error: expected ';' before '*' token
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:54: error: ISO C++ forbids declaration of 'byte' with no type
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:54: error: expected ';' before '*' token
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:55: error: ISO C++ forbids declaration of 'byte' with no type
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:55: error: expected ';' before '*' token
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:56: error: 'boolean' does not name a type
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:57: error: 'boolean' does not name a type
/Users/cesare/Documents/Arduino/libraries/LedCube/LedCube.h:60: error: 'byte' has not been declared
ledcube:11: error: 'byte' does not name a type
ledcube:12: error: 'byte' does not name a type
ledcube:14: error: 'levelPins' was not declared in this scope
ledcube:14: error: 'colPins' was not declared in this scope
ledcube.cpp: In function 'void loop()':
ledcube:22: error: 'delay' was not declared in this scope
ledcube:25: error: 'byte' was not declared in this scope
ledcube:25: error: expected `;' before 'level'
ledcube:25: error: 'level' was not declared in this scope
ledcube:25: error: 'class LedCube' has no member named 'getLevels'
ledcube:27: error: expected `;' before 'col'
ledcube:27: error: 'col' was not declared in this scope
ledcube:27: error: 'class LedCube' has no member named 'getCols'
ledcube:34: error: expected `;' before 'd'
ledcube:34: error: 'd' was not declared in this scope
ledcube:36: error: expected `;' before 'l'
ledcube:36: error: 'l' was not declared in this scope
ledcube:36: error: 'class LedCube' has no member named 'getLevels'
ledcube:43: error: expected `;' before 'level'
ledcube:43: error: 'level' was not declared in this scope
ledcube:43: error: 'class LedCube' has no member named 'getLevels'
ledcube:45: error: expected `;' before 'row'
ledcube:45: error: 'row' was not declared in this scope
ledcube:45: error: 'class LedCube' has no member named 'getLevels'
ledcube:52: error: expected `;' before 'i'
ledcube:52: error: 'i' was not declared in this scope
ledcube:54: error: expected `;' before 'row'
ledcube:54: error: 'row' was not declared in this scope
ledcube:54: error: 'class LedCube' has no member named 'getLevels'
ledcube:61: error: 'random' was not declared in this scope
ledcube:64: error: expected `;' before 'x'
ledcube:64: error: 'x' was not declared in this scope
ledcube:66: error: 'class LedCube' has no member named 'getCols'
ledcube:70: error: expected `;' before 'x'
ledcube:70: error: 'x' was not declared in this scope
ledcube:72: error: 'class LedCube' has no member named 'getLevels'
ledcube:76: error: expected `;' before 'planes'
ledcube:77: error: expected `;' before 'i'
ledcube:77: error: 'i' was not declared in this scope
ledcube:79: error: expected `;' before 'p'
ledcube:79: error: 'p' was not declared in this scope
ledcube:79: error: 'planes' was not declared in this scope
ledcube:90: error: expected `;' before 'c'
ledcube:90: error: 'c' was not declared in this scope
ledcube:100: error: expected `;' before 'c'
ledcube:100: error: 'c' was not declared in this scope
ledcube:104: error: 'd' was not declared in this scope
ledcube:114: error: 'd' was not declared in this scope
ledcube:124: error: 'd' was not declared in this scope
ledcube:132: error: expected `;' before 'diamond'
ledcube:133: error: expected `;' before 'box'
ledcube:138: error: 'box' was not declared in this scope
ledcube:139: error: 'diamond' was not declared in this scope
ledcube:142: error: expected `;' before 'topSeq'
ledcube:143: error: expected `;' before 'botSeq'
ledcube:144: error: expected `;' before 'loops'
ledcube:144: error: 'loops' was not declared in this scope
ledcube:146: error: expected `;' before 's'
ledcube:146: error: 's' was not declared in this scope
ledcube:148: error: expected `;' before 'seq'
ledcube:149: error: 'seq' was not declared in this scope
ledcube:158: error: expected `;' before 'w'
ledcube:158: error: 'w' was not declared in this scope
ledcube:158: error: 'max' was not declared in this scope
ledcube:161: error: 'l' was not declared in this scope
ledcube:161: error: 'class LedCube' has no member named 'getLevels'
ledcube:162: error: 'c' was not declared in this scope
ledcube:162: error: 'class LedCube' has no member named 'getCols'
ledcube:164: error: 'class LedCube' has no member named 'getBufferAt'
ledcube:164: error: 'HIGH' was not declared in this scope
COsa posso fare?
Logged

Il Vero Programmatore non ha bisogno di manuali sull'assembler, sono
  sufficienti i data sheet dei microprocessori.

Cagliari, Italy
Offline Offline
Tesla Member
***
Karma: 112
Posts: 7126
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

error: WProgram.h: No such file or directory

O aggiorni la libreria per essere compatibile con l'IDE 1.0 o 1.0.1 o usi l'IDE 023 o 022.
Logged

Code fast. Code easy. Codebender --> http://codebender.cc/?referrer=PaoloP

Dueville (VI)
Offline Offline
Edison Member
*
Karma: 28
Posts: 1749
http://cesarecacitti.wordpress.com/
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

error: WProgram.h: No such file or directory

O aggiorni la libreria per essere compatibile con l'IDE 1.0 o 1.0.1 o usi l'IDE 023 o 022.
ehehemmmm sto usando la 0022
Logged

Il Vero Programmatore non ha bisogno di manuali sull'assembler, sono
  sufficienti i data sheet dei microprocessori.

Cagliari, Italy
Offline Offline
Tesla Member
***
Karma: 112
Posts: 7126
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

error: WProgram.h: No such file or directory

O aggiorni la libreria per essere compatibile con l'IDE 1.0 o 1.0.1 o usi l'IDE 023 o 022.
ehehemmmm sto usando la 0022

Allora controlla i percorsi perché l'IDE non trova le librerie di Arduino.
Logged

Code fast. Code easy. Codebender --> http://codebender.cc/?referrer=PaoloP

Dueville (VI)
Offline Offline
Edison Member
*
Karma: 28
Posts: 1749
http://cesarecacitti.wordpress.com/
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

error: WProgram.h: No such file or directory

O aggiorni la libreria per essere compatibile con l'IDE 1.0 o 1.0.1 o usi l'IDE 023 o 022.
ehehemmmm sto usando la 0022

Allora controlla i percorsi perché l'IDE non trova le librerie di Arduino.
se io compilo x altre board va tutto a buon fine!
Logged

Il Vero Programmatore non ha bisogno di manuali sull'assembler, sono
  sufficienti i data sheet dei microprocessori.

Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 332
Posts: 22817
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Se hai l'IDE 0022 quella board nel file boards.txt ce lo dovresti avere di già, non dovresti inserirlo.
Questo l'ho estratto da un vecchio boards.txt della 0022 che ho (le modifiche in grassetto sono per sfruttare tutta la memoria e per flashare il firmware usando l'arduinoISP.

Quote
atmega8.name=Arduino NG or older w/ ATmega8

atmega8.upload.protocol=stk500
atmega8.upload.maximum_size=8192
atmega8.upload.speed=19200
atmega8.upload.using=arduino:arduinoisp
atmega8.bootloader.low_fuses=0xdf
atmega8.bootloader.high_fuses=0xca
atmega8.bootloader.path=atmega8
atmega8.bootloader.file=ATmegaBOOT.hex
atmega8.bootloader.unlock_bits=0x3F
atmega8.bootloader.lock_bits=0x0F

atmega8.build.mcu=atmega8
atmega8.build.f_cpu=16000000L
atmega8.build.core=arduino
Ah, ricordati che i kB sono composti da 1024 byte  smiley-twist, quindi 8192 e non 8000.
Logged


Dueville (VI)
Offline Offline
Edison Member
*
Karma: 28
Posts: 1749
http://cesarecacitti.wordpress.com/
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Se hai l'IDE 0022 quella board nel file boards.txt ce lo dovresti avere di già, non dovresti inserirlo.
Questo l'ho estratto da un vecchio boards.txt della 0022 che ho (le modifiche in grassetto sono per sfruttare tutta la memoria e per flashare il firmware usando l'arduinoISP.

Quote
atmega8.name=Arduino NG or older w/ ATmega8

atmega8.upload.protocol=stk500
atmega8.upload.maximum_size=8192
atmega8.upload.speed=19200
atmega8.upload.using=arduino:arduinoisp
atmega8.bootloader.low_fuses=0xdf
atmega8.bootloader.high_fuses=0xca
atmega8.bootloader.path=atmega8
atmega8.bootloader.file=ATmegaBOOT.hex
atmega8.bootloader.unlock_bits=0x3F
atmega8.bootloader.lock_bits=0x0F

atmega8.build.mcu=atmega8
atmega8.build.f_cpu=16000000L
atmega8.build.core=arduino
Ah, ricordati che i kB sono composti da 1024 byte  smiley-twist, quindi 8192 e non 8000.
sisi, nn avevo voglia di fare i conti.
Comunque io uso mac, nel quele il programma di arduino è un unico file da 100mb, non uno zip, quindi è impossibile avere accesso alle board originali che ci sono già
Logged

Il Vero Programmatore non ha bisogno di manuali sull'assembler, sono
  sufficienti i data sheet dei microprocessori.

Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 332
Posts: 22817
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Devi creare una cartella /hardware dentro alla tua cartella degli sketch, poi dentro ad essa ci crei una cartella /arduino e lì copi in un file che chiami boards.txt il contenuto che ti ho scritto.
Se mi ricordo bene i percorsi, così dovrebbe andare. Riavviando l'IDE, questa copia la boards che trova dentro alla cartella degli sketch e la fonde con quella sua.
Logged


Dueville (VI)
Offline Offline
Edison Member
*
Karma: 28
Posts: 1749
http://cesarecacitti.wordpress.com/
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Devi creare una cartella /hardware dentro alla tua cartella degli sketch, poi dentro ad essa ci crei una cartella /arduino e lì copi in un file che chiami boards.txt il contenuto che ti ho scritto.
Se mi ricordo bene i percorsi, così dovrebbe andare. Riavviando l'IDE, questa copia la boards che trova dentro alla cartella degli sketch e la fonde con quella sua.
anche facendo così mi riestituisce i medesimi errori smiley-sad
Logged

Il Vero Programmatore non ha bisogno di manuali sull'assembler, sono
  sufficienti i data sheet dei microprocessori.

Marche
Offline Offline
Edison Member
*
Karma: 34
Posts: 2272
azioni semplici per risultati complessi
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Prova ad assegnare un nome diverso al micro quando scrivi il nuovo txt, credo va in conflitto con la configurazione dell'atmega8 inclusa nell'ide.
Questo è quello che uso io, vedi se va...
Code:
##############################################################
atm8.name=ATmega8 standalone 16MHz
atm8.upload.protocol=stk500
atm8.upload.maximum_size=8192
atm8.upload.speed=19200
atm8.upload.using=arduino:arduinoisp
atm8.bootloader.low_fuses=0xdf
atm8.bootloader.high_fuses=0xca
atm8.bootloader.path=atmega8
atm8.bootloader.file=ATmegaBOOT.hex
atm8.bootloader.unlock_bits=0x3F
atm8.bootloader.lock_bits=0x0F
atm8.build.mcu=atmega8
atm8.build.f_cpu=16000000L
atm8.build.core=arduino
Logged

Lamezia Terme
Offline Offline
Shannon Member
****
Karma: 569
Posts: 12576
Le domande di chi vuol imparare rappresentano la sua sete di sapere
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

BUD, il nostro primo appuntamento, quanti ricordi smiley-cry
Logged

Guida alla programmazione ISP e seriale dei micro ATMEL (Caricare bootloader e sketch):
http://www.michelemenniti.it/Arduino_burn_bootloader.php
Guida alla Programmazione ATmega328 noP:
http://www.michelemenniti.it/atmega328nop.html
Articoli su Elettronica In:
http://www.michelemenniti.it/elettronica_in.html

Marche
Offline Offline
Edison Member
*
Karma: 34
Posts: 2272
azioni semplici per risultati complessi
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Piangi perchè hai cotto il micro dopo le prove vero? smiley-wink
Logged

Italy
Offline Offline
Full Member
***
Karma: 6
Posts: 102
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Comunque io uso mac, nel quele il programma di arduino è un unico file da 100mb, non uno zip, quindi è impossibile avere accesso alle board originali che ci sono già
Questa cosa non mi è chiara. click destro sull'icona Arduino e mostra contenuto pacchetto. A questo punto sei dentro la cartella come se fosse un programma installato su win. Naturalmente vale per tutte le applicazionisu mac. Era questo che non riuscivi a fare?
N.
Logged

"The question is not whether intelligent machines can have emotions, but whether machines can be intelligent without any emotions"

Lamezia Terme
Offline Offline
Shannon Member
****
Karma: 569
Posts: 12576
Le domande di chi vuol imparare rappresentano la sua sete di sapere
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Piangi perchè hai cotto il micro dopo le prove vero? smiley-wink
sì, non me lo posso perdonare  smiley-cry smiley-cry smiley-cry
Logged

Guida alla programmazione ISP e seriale dei micro ATMEL (Caricare bootloader e sketch):
http://www.michelemenniti.it/Arduino_burn_bootloader.php
Guida alla Programmazione ATmega328 noP:
http://www.michelemenniti.it/atmega328nop.html
Articoli su Elettronica In:
http://www.michelemenniti.it/elettronica_in.html

Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 332
Posts: 22817
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Prova ad assegnare un nome diverso al micro quando scrivi il nuovo txt, credo va in conflitto con la configurazione dell'atmega8 inclusa nell'ide.
Vero.
Logged


Pages: [1] 2   Go Up
Jump to: