Go Down

Topic: ATmega8U2 boards.txt (Read 88 times) previous topic - next topic

spaceball

Dec 10, 2019, 01:27 pm Last Edit: Dec 10, 2019, 01:52 pm by spaceball
Caio a tutti,
sto cercando di programmare un ATmega8U2 + ISP-Programmer + Arduino-IDE.
Senza bootloader, perché dopo voglio mettere il programma HID-project, che prende quasi 6KB.
Ho inserito come boards.local.txt nel sistema:
Code: [Select]
atmega8u2.name=ATmega8U2

atmega8u2.build.core=arduino:arduino
atmega8u2.build.variant=standart
atmega8u2.upload.tool=arduino:avrdude

atmega8u2.upload.maximum_size=8192
atmega8u2.upload.maximum_data_size=512

atmega8u2.build.mcu=atmega8u2
atmega8u2.build.f_cpu=16000000L
atmega8u2.build.board=atmega8u2

atmega8u2.bootloader.tool=arduino:avrdude
atmega8u2.bootloader.low_fuses=0xef
atmega8u2.bootloader.high_fuses=0xd9
atmega8u2.bootloader.extended_fuses=0xf4
atmega8u2.bootloader.unlock_bits=0x3F
atmega8u2.bootloader.lock_bits=0x0F

Adesso mi produce una lunga lista di errori......
Code: [Select]

Arduino: 1.8.10 (Windows 10), Board: "ATmega8U2"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                 from C:\Users\Tuttofare\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.2\cores\arduino\USBCore.cpp:20:

C:\Users\Tuttofare\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.2\cores\arduino\USBCore.cpp:73:29: error: 'USB_VID' was not declared in this scope
  D_DEVICE(0xEF,0x02,0x01,64,USB_VID,USB_PID,0x100,IMANUFACTURER,IPRODUCT,ISERIAL,1);
                             ^
C:\Users\Tuttofare\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.2\cores\arduino\USBCore.h:270:61: note: in definition of macro 'D_DEVICE'
  { 18, 1, USB_VERSION, _class,_subClass,_proto,_packetSize0,_vid,_pid,_version,_im,_ip,_is,_configs }
                                                             ^~~~
C:\Users\Tuttofare\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.2\cores\arduino\USBCore.cpp:73:29: note: suggested alternative: 'USB_Recv'
  D_DEVICE(0xEF,0x02,0x01,64,USB_VID,USB_PID,0x100,IMANUFACTURER,IPRODUCT,ISERIAL,1);
                            ^
C:\Users\Tuttofare\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.2\cores\arduino\USBCore.h:270:61: note: in definition of macro 'D_DEVICE'
  { 18, 1, USB_VERSION, _class,_subClass,_proto,_packetSize0,_vid,_pid,_version,_im,_ip,_is,_configs }
                                                             ^~~~
C:\Users\Tuttofare\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.2\cores\arduino\USBCore.cpp:73:37: error: 'USB_PID' was not declared in this scope
  D_DEVICE(0xEF,0x02,0x01,64,USB_VID,USB_PID,0x100,IMANUFACTURER,IPRODUCT,ISERIAL,1);
                                     ^
C:\Users\Tuttofare\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.2\cores\arduino\USBCore.h:270:66: note: in definition of macro 'D_DEVICE'
  { 18, 1, USB_VERSION, _class,_subClass,_proto,_packetSize0,_vid,_pid,_version,_im,_ip,_is,_configs }
                                                                  ^~~~
C:\Users\Tuttofare\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.2\cores\arduino\USBCore.cpp:73:37: note: suggested alternative: 'USB_Recv'
  D_DEVICE(0xEF,0x02,0x01,64,USB_VID,USB_PID,0x100,IMANUFACTURER,IPRODUCT,ISERIAL,1);
                                     ^
C:\Users\Tuttofare\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.2\cores\arduino\USBCore.h:270:66: note: in definition of macro 'D_DEVICE'
  { 18, 1, USB_VERSION, _class,_subClass,_proto,_packetSize0,_vid,_pid,_version,_im,_ip,_is,_configs }
                                                                  ^~~~
"C:\\Users\\Tuttofare\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino5/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega8u2 -DF_CPU=16000000L -DARDUINO=10810 -DARDUINO_atmega8u2 -DARDUINO_ARCH_AVR "-IC:\\Users\\Tuttofare\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.2\\cores\\arduino" "C:\\Users\\Tuttofare\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.2\\cores\\arduino\\WMath.cpp" -o "C:\\Users\\TUTTOF~1\\AppData\\Local\\Temp\\arduino_build_407677\\core\\WMath.cpp.o"
"C:\\Users\\Tuttofare\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino5/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega8u2 -DF_CPU=16000000L -DARDUINO=10810 -DARDUINO_atmega8u2 -DARDUINO_ARCH_AVR "-IC:\\Users\\Tuttofare\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.2\\cores\\arduino" "C:\\Users\\Tuttofare\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.2\\cores\\arduino\\WString.cpp" -o "C:\\Users\\TUTTOF~1\\AppData\\Local\\Temp\\arduino_build_407677\\core\\WString.cpp.o"
exit status 1
Fehler beim Kompilieren für das Board ATmega8U2.

Ho provato a mettere
Code: [Select]
#atmega8u2.vid.0=0x2341
#atmega8u2.pid.0=0x484E


Se mi potete aiutare a trovare l´errore......  8)  8)  8)

Alla fine del progetto dovrebbe essere visto dal PC come tastiera.

Saluti
Reinhard

gpb01

#1
Dec 10, 2019, 01:40 pm Last Edit: Dec 10, 2019, 01:40 pm by gpb01
Cortesemente modifica il tuo post qui sopra ed al posto dei tag di tabella, usa i tag CODE ... quelli  che, in fase di edit, ti inserisce il bottone </> ... primo a sinistra.  Grazie.

Guglielmo
Search is Your friend ... or I am Your enemy !

spaceball


gpb01

#3
Dec 10, 2019, 02:03 pm Last Edit: Dec 10, 2019, 02:04 pm by gpb01
USB_VID e USB_PID vengo passati normalmente nelle opzioni di lancio del compilatore assieme alle altre:

Code: [Select]
.... -DUSB_VID=0x2341 -DUSB_PID=0x484E ....
Guglielmo
Search is Your friend ... or I am Your enemy !

Maurotec

Quote
Se mi potete aiutare a trovare l´errore......  8)  8)  8)
Corretto come hai scritto, però devi togliere i cancelletti # che equivalgono a commenti.

Ciao.

Go Up