Помощь - Поиск - Пользователи - Календарь
Полная версия этой страницы: AT90USB162 - HID - LUFA
Форум разработчиков электроники ELECTRONIX.ru > Сайт и форум > В помощь начинающему > Программирование
kuliba
Ну раз ветка для начинающих, то тут как раз место задать свои глупые вопросы.

Я совсем начинающий. Сделал схемку мыши. Далее, как я правильно понял, мне нужно откомпилировать демку из библиотеки LUFA и получившуюся прошивку залить на МК. И тут я уперся:

1. Где в библиотеке/проекте указать на каких выводах у меня сидят три мышиные кнопки и scroll encoder?
2. Как откомпилировать библиотеку? Делаю rebuild all, выскакивают ошибки типа:

../../../../LUFA/Drivers/Board/USBKEY/Joystick.h:98: error: 'DDRE' undeclared (first use in this function)
../../../../LUFA/Drivers/Board/USBKEY/Joystick.h:101: error: 'PORTE' undeclared (first use in this function)
../../../../LUFA/Drivers/Board/USBKEY/Joystick.h: In function 'Joystick_GetStatus':
../../../../LUFA/Drivers/Board/USBKEY/Joystick.h:107: error: 'PINE' undeclared (first use in this function)
In file included from ../../../../LUFA/Drivers/Board/Buttons.h:77,
../../../../LUFA/Drivers/Board/USBKEY/Buttons.h: In function 'Buttons_Init':

rezident
Сообщение модератора.
Если вы хотите реальной помощи, то дополните свое сообщение необходимыми подробностями. Какой именно компилятор? Приведите ваш проект полностью (в приложении к сообщению) или исходный код его. Дайте ссылку на упоминаемую вами библиотеку LUFA или присоедините ее к своему сообщению. Ссылка на LUFA конечно гуглится за 5 секунд, но вдруг у вас какой-то специфичный реализ?
kuliba
Прошу прощения.

Связка AVR Studio 4 и WinAVR. LUFA стандартная. Проекта еще нет, есть попытка скомпилировать демонстрационный проект, который расположен в библиотеке LUFA по адресу Demos/Device/ClassDriver/Mouse
Злодей
Вы точно билдите все примеры? Помню, что собрать один отдельный пример у меня не получалось из-за таких-же ошибок, само собирает только когда делаешь билд всех примеров...
kuliba
Цитата(Злодей @ Jul 16 2010, 01:37) *
Вы точно билдите все примеры? Помню, что собрать один отдельный пример у меня не получалось из-за таких-же ошибок, само собирает только когда делаешь билд всех примеров...


Всех, использую корневой makefile.
dimka76
Цитата(kuliba @ Jul 15 2010, 16:10) *
1. Где в библиотеке/проекте указать на каких выводах у меня сидят три мышиные кнопки и scroll encoder?


в makefile с ключиками -D, это если смотреть в папке Project.
Да и сами можете нужные дефайны прописать в своем makefile
Злодей
Покажите всю консоль, начиная с команды make
Код
C:\LUFA100513>make
Executing "make all" on all LUFA library elements.

make -C LUFA all -s
make -C Demos all -s

-------- begin --------
Cleaning project:
-------- end --------


-------- begin --------
avr-gcc (WinAVR 20100110) 4.3.3
Copyright (C) 2008 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.

Compiling C: AudioInput.c
Compiling C: Descriptors.c
Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/DevChapter9.c
Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Endpoint.c
Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Host.c
Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/HostChapter9.c
Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/LowLevel.c
Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Pipe.c


Цитата(kuliba @ Jul 15 2010, 16:10) *
Где в библиотеке/проекте указать на каких выводах у меня сидят три мышиные кнопки и scroll encoder?


В файле c:\LUFA100513\Demos\Device\XXX\Mouse\Mouse.h подключение описаний железа.
Код
#include <LUFA/Drivers/Board/Joystick.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/Board/Buttons.h>


Эти файлы подключают расположения кнопок в зависимости от того, какую оценочную плату вы используете.

В файле c:\LUFA100513\Demos\Device\XXX\Mouse\makefile.h задана оценочная плата, например:

Код
BOARD  = USBKEY
kuliba
Цитата(Злодей @ Jul 18 2010, 02:52) *
Покажите всю консоль, начиная с команды make


Вот полный лог:

CODE

Build started 15.7.2010 at 13:55:54
Executing "make all" on all LUFA library elements.

make -C LUFA all -s

Generating LUFA event name list...
EVENT_CDC_Device_BreakSent
EVENT_CDC_Device_ControLineStateChanged
EVENT_CDC_Device_LineEncodingChanged
EVENT_CDC_Host_ControLineStateChanged
EVENT_USB_Device_ConfigurationChanged
EVENT_USB_Device_Connect
EVENT_USB_Device_Disconnect
EVENT_USB_Device_Reset
EVENT_USB_Device_StartOfFrame
EVENT_USB_Device_Suspend
EVENT_USB_Device_UnhandledControlRequest
EVENT_USB_Device_WakeUp
EVENT_USB_Host_DeviceAttached
EVENT_USB_Host_DeviceEnumerationComplete
EVENT_USB_Host_DeviceEnumerationFailed
EVENT_USB_Host_DeviceUnattached
EVENT_USB_Host_HostError
EVENT_USB_InitFailure
EVENT_USB_UIDChange
make -C Demos all -s

-------- begin --------
Cleaning project:
-------- end --------


-------- begin --------
avr-gcc (WinAVR 20100110) 4.3.3
Copyright © 2008 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.


Compiling C: AudioInput.c

Compiling C: Descriptors.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/DevChapter9.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Endpoint.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Host.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/HostChapter9.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/LowLevel.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Pipe.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/USBInterrupt.c

Compiling C: ../../../../LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c

Compiling C: ../../../../LUFA/Drivers/USB/HighLevel/Events.c

Compiling C: ../../../../LUFA/Drivers/USB/HighLevel/USBTask.c

Compiling C: ../../../../LUFA/Drivers/USB/Class/Device/Audio.c

Linking: AudioInput.elf

Creating load file for Flash: AudioInput.hex

Creating load file for EEPROM: AudioInput.eep

Creating Extended Listing: AudioInput.lss

Creating Symbol Table: AudioInput.sym

Checking for invalid events...

---- Compile Time Library Options ----
USB_DEVICE_ONLY
FIXED_CONTROL_ENDPOINT_SIZE=8
FIXED_NUM_CONFIGURATIONS=1
USE_FLASH_DESCRIPTORS
USE_STATIC_OPTIONS=(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)
--------------------------------------

--------- Target Information ---------
AVR Model: at90usb1287
Board: USBKEY
Clock: 8000000Hz CPU, 8000000Hz Master
--------------------------------------

Size after:
AVR Memory Usage
----------------
Device: at90usb1287

Program: 2822 bytes (2.2% Full)
(.text + .data + .bootloader)

Data: 21 bytes (0.3% Full)
(.data + .bss + .noinit)



-------- end --------


-------- begin --------
Cleaning project:
-------- end --------


-------- begin --------
avr-gcc (WinAVR 20100110) 4.3.3
Copyright © 2008 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.


Compiling C: AudioOutput.c

Compiling C: Descriptors.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/DevChapter9.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Endpoint.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Host.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/HostChapter9.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/LowLevel.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Pipe.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/USBInterrupt.c

Compiling C: ../../../../LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c

Compiling C: ../../../../LUFA/Drivers/USB/HighLevel/Events.c

Compiling C: ../../../../LUFA/Drivers/USB/HighLevel/USBTask.c

Compiling C: ../../../../LUFA/Drivers/USB/Class/Device/Audio.c

Linking: AudioOutput.elf

Creating load file for Flash: AudioOutput.hex

Creating load file for EEPROM: AudioOutput.eep

Creating Extended Listing: AudioOutput.lss

Creating Symbol Table: AudioOutput.sym

Checking for invalid events...

---- Compile Time Library Options ----
USB_DEVICE_ONLY
FIXED_CONTROL_ENDPOINT_SIZE=8
FIXED_NUM_CONFIGURATIONS=1
USE_FLASH_DESCRIPTORS
USE_STATIC_OPTIONS=(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)
--------------------------------------

--------- Target Information ---------
AVR Model: at90usb1287
Board: USBKEY
Clock: 8000000Hz CPU, 8000000Hz Master
--------------------------------------

Size after:
AVR Memory Usage
----------------
Device: at90usb1287

Program: 2924 bytes (2.2% Full)
(.text + .data + .bootloader)

Data: 21 bytes (0.3% Full)
(.data + .bss + .noinit)



-------- end --------


-------- begin --------
Cleaning project:
-------- end --------


-------- begin --------
avr-gcc (WinAVR 20100110) 4.3.3
Copyright © 2008 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.


Compiling C: DualVirtualSerial.c

Compiling C: Descriptors.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/DevChapter9.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Endpoint.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Host.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/HostChapter9.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/LowLevel.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Pipe.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/USBInterrupt.c

Compiling C: ../../../../LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c

Compiling C: ../../../../LUFA/Drivers/USB/HighLevel/Events.c

Compiling C: ../../../../LUFA/Drivers/USB/HighLevel/USBTask.c

Compiling C: ../../../../LUFA/Drivers/USB/Class/Device/CDC.c

Compiling C: ../../../../LUFA/Drivers/USB/Class/Host/CDC.c

Linking: DualVirtualSerial.elf

Creating load file for Flash: DualVirtualSerial.hex

Creating load file for EEPROM: DualVirtualSerial.eep

Creating Extended Listing: DualVirtualSerial.lss

Creating Symbol Table: DualVirtualSerial.sym

Checking for invalid events...

---- Compile Time Library Options ----
USB_DEVICE_ONLY
FIXED_CONTROL_ENDPOINT_SIZE=8
FIXED_NUM_CONFIGURATIONS=1
USE_FLASH_DESCRIPTORS
USE_STATIC_OPTIONS=(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)
--------------------------------------

--------- Target Information ---------
AVR Model: at90usb1287
Board: USBKEY
Clock: 8000000Hz CPU, 8000000Hz Master
--------------------------------------

Size after:
AVR Memory Usage
----------------
Device: at90usb1287

Program: 4034 bytes (3.1% Full)
(.text + .data + .bootloader)

Data: 140 bytes (1.7% Full)
(.data + .bss + .noinit)



-------- end --------


-------- begin --------
Cleaning project:
-------- end --------


-------- begin --------
avr-gcc (WinAVR 20100110) 4.3.3
Copyright © 2008 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.


Compiling C: GenericHID.c

Compiling C: Descriptors.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/DevChapter9.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Endpoint.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Host.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/HostChapter9.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/LowLevel.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Pipe.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/USBInterrupt.c

Compiling C: ../../../../LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c

Compiling C: ../../../../LUFA/Drivers/USB/HighLevel/Events.c

Compiling C: ../../../../LUFA/Drivers/USB/HighLevel/USBTask.c

Compiling C: ../../../../LUFA/Drivers/USB/Class/Device/HID.c

Compiling C: ../../../../LUFA/Drivers/USB/Class/Host/HID.c

Compiling C: ../../../../LUFA/Drivers/USB/Class/Host/HIDParser.c

Linking: GenericHID.elf

Creating load file for Flash: GenericHID.hex

Creating load file for EEPROM: GenericHID.eep

Creating Extended Listing: GenericHID.lss

Creating Symbol Table: GenericHID.sym

Checking for invalid events...

---- Compile Time Library Options ----
USB_DEVICE_ONLY
FIXED_CONTROL_ENDPOINT_SIZE=8
FIXED_NUM_CONFIGURATIONS=1
USE_FLASH_DESCRIPTORS
USE_STATIC_OPTIONS=(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)
--------------------------------------

--------- Target Information ---------
AVR Model: at90usb1287
Board: USBKEY
Clock: 8000000Hz CPU, 8000000Hz Master
--------------------------------------

Size after:
AVR Memory Usage
----------------
Device: at90usb1287

Program: 4144 bytes (3.2% Full)
(.text + .data + .bootloader)

Data: 46 bytes (0.6% Full)
(.data + .bss + .noinit)



-------- end --------


-------- begin --------
Cleaning project:
-------- end --------


-------- begin --------
avr-gcc (WinAVR 20100110) 4.3.3
Copyright © 2008 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.


Compiling C: Joystick.c

Compiling C: Descriptors.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/DevChapter9.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Endpoint.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Host.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/HostChapter9.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/LowLevel.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Pipe.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/USBInterrupt.c

Compiling C: ../../../../LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c

Compiling C: ../../../../LUFA/Drivers/USB/HighLevel/Events.c

Compiling C: ../../../../LUFA/Drivers/USB/HighLevel/USBTask.c

Compiling C: ../../../../LUFA/Drivers/USB/Class/Device/HID.c

Compiling C: ../../../../LUFA/Drivers/USB/Class/Host/HID.c

Compiling C: ../../../../LUFA/Drivers/USB/Class/Host/HIDParser.c

Linking: Joystick.elf

Creating load file for Flash: Joystick.hex

Creating load file for EEPROM: Joystick.eep

Creating Extended Listing: Joystick.lss

Creating Symbol Table: Joystick.sym

Checking for invalid events...

---- Compile Time Library Options ----
USB_DEVICE_ONLY
FIXED_CONTROL_ENDPOINT_SIZE=8
FIXED_NUM_CONFIGURATIONS=1
USE_FLASH_DESCRIPTORS
USE_STATIC_OPTIONS=(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)
--------------------------------------

--------- Target Information ---------
AVR Model: at90usb1287
Board: USBKEY
Clock: 8000000Hz CPU, 8000000Hz Master
--------------------------------------

Size after:
AVR Memory Usage
----------------
Device: at90usb1287

Program: 4190 bytes (3.2% Full)
(.text + .data + .bootloader)

Data: 30 bytes (0.4% Full)
(.data + .bss + .noinit)



-------- end --------


-------- begin --------
Cleaning project:
-------- end --------


-------- begin --------
avr-gcc (WinAVR 20100110) 4.3.3
Copyright © 2008 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.


Compiling C: Keyboard.c

Compiling C: Descriptors.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/DevChapter9.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Endpoint.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Host.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/HostChapter9.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/LowLevel.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Pipe.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/USBInterrupt.c

Compiling C: ../../../../LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c

Compiling C: ../../../../LUFA/Drivers/USB/HighLevel/Events.c

Compiling C: ../../../../LUFA/Drivers/USB/HighLevel/USBTask.c

Compiling C: ../../../../LUFA/Drivers/USB/Class/Device/HID.c

Compiling C: ../../../../LUFA/Drivers/USB/Class/Host/HID.c

Compiling C: ../../../../LUFA/Drivers/USB/Class/Host/HIDParser.c

Linking: Keyboard.elf

Creating load file for Flash: Keyboard.hex

Creating load file for EEPROM: Keyboard.eep

Creating Extended Listing: Keyboard.lss

Creating Symbol Table: Keyboard.sym

Checking for invalid events...

---- Compile Time Library Options ----
USB_DEVICE_ONLY
FIXED_CONTROL_ENDPOINT_SIZE=8
FIXED_NUM_CONFIGURATIONS=1
USE_FLASH_DESCRIPTORS
USE_STATIC_OPTIONS=(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)
--------------------------------------

--------- Target Information ---------
AVR Model: at90usb1287
Board: USBKEY
Clock: 8000000Hz CPU, 8000000Hz Master
--------------------------------------

Size after:
AVR Memory Usage
----------------
Device: at90usb1287

Program: 4292 bytes (3.3% Full)
(.text + .data + .bootloader)

Data: 35 bytes (0.4% Full)
(.data + .bss + .noinit)



-------- end --------


-------- begin --------
Cleaning project:
-------- end --------


-------- begin --------
avr-gcc (WinAVR 20100110) 4.3.3
Copyright © 2008 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.


Compiling C: KeyboardMouse.c

Compiling C: Descriptors.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/DevChapter9.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Endpoint.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Host.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/HostChapter9.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/LowLevel.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Pipe.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/USBInterrupt.c

Compiling C: ../../../../LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c

Compiling C: ../../../../LUFA/Drivers/USB/HighLevel/Events.c

Compiling C: ../../../../LUFA/Drivers/USB/HighLevel/USBTask.c

Compiling C: ../../../../LUFA/Drivers/USB/Class/Device/HID.c

Compiling C: ../../../../LUFA/Drivers/USB/Class/Host/HID.c

Compiling C: ../../../../LUFA/Drivers/USB/Class/Host/HIDParser.c

Linking: KeyboardMouse.elf

Creating load file for Flash: KeyboardMouse.hex

Creating load file for EEPROM: KeyboardMouse.eep

Creating Extended Listing: KeyboardMouse.lss

Creating Symbol Table: KeyboardMouse.sym

Checking for invalid events...

---- Compile Time Library Options ----
USB_DEVICE_ONLY
FIXED_CONTROL_ENDPOINT_SIZE=8
FIXED_NUM_CONFIGURATIONS=1
USE_FLASH_DESCRIPTORS
USE_STATIC_OPTIONS=(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)
--------------------------------------

--------- Target Information ---------
AVR Model: at90usb1287
Board: USBKEY
Clock: 8000000Hz CPU, 8000000Hz Master
--------------------------------------

Size after:
AVR Memory Usage
----------------
Device: at90usb1287

Program: 4510 bytes (3.4% Full)
(.text + .data + .bootloader)

Data: 50 bytes (0.6% Full)
(.data + .bss + .noinit)



-------- end --------


-------- begin --------
Cleaning project:
-------- end --------


-------- begin --------
avr-gcc (WinAVR 20100110) 4.3.3
Copyright © 2008 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.


Compiling C: MassStorage.c

Compiling C: Descriptors.c

Compiling C: Lib/SCSI.c

Compiling C: Lib/DataflashManager.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/DevChapter9.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Endpoint.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Host.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/HostChapter9.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/LowLevel.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Pipe.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/USBInterrupt.c

Compiling C: ../../../../LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c

Compiling C: ../../../../LUFA/Drivers/USB/HighLevel/Events.c

Compiling C: ../../../../LUFA/Drivers/USB/HighLevel/USBTask.c

Compiling C: ../../../../LUFA/Drivers/USB/Class/Device/MassStorage.c

Compiling C: ../../../../LUFA/Drivers/USB/Class/Host/MassStorage.c

Linking: MassStorage.elf

Creating load file for Flash: MassStorage.hex

Creating load file for EEPROM: MassStorage.eep

Creating Extended Listing: MassStorage.lss

Creating Symbol Table: MassStorage.sym

Checking for invalid events...

---- Compile Time Library Options ----
USB_DEVICE_ONLY
FIXED_CONTROL_ENDPOINT_SIZE=8
FIXED_NUM_CONFIGURATIONS=1
USE_FLASH_DESCRIPTORS
USE_STATIC_OPTIONS=(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)
INTERRUPT_CONTROL_ENDPOINT
--------------------------------------

--------- Target Information ---------
AVR Model: at90usb1287
Board: USBKEY
Clock: 8000000Hz CPU, 8000000Hz Master
--------------------------------------

Size after:
AVR Memory Usage
----------------
Device: at90usb1287

Program: 6558 bytes (5.0% Full)
(.text + .data + .bootloader)

Data: 125 bytes (1.5% Full)
(.data + .bss + .noinit)



-------- end --------


-------- begin --------
Cleaning project:
-------- end --------


-------- begin --------
avr-gcc (WinAVR 20100110) 4.3.3
Copyright © 2008 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.


Compiling C: MassStorageKeyboard.c

Compiling C: Descriptors.c

Compiling C: Lib/SCSI.c

Compiling C: Lib/DataflashManager.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/DevChapter9.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Endpoint.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Host.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/HostChapter9.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/LowLevel.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Pipe.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/USBInterrupt.c

Compiling C: ../../../../LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c

Compiling C: ../../../../LUFA/Drivers/USB/HighLevel/Events.c

Compiling C: ../../../../LUFA/Drivers/USB/HighLevel/USBTask.c

Compiling C: ../../../../LUFA/Drivers/USB/Class/Device/MassStorage.c

Compiling C: ../../../../LUFA/Drivers/USB/Class/Device/HID.c

Linking: MassStorageKeyboard.elf

Creating load file for Flash: MassStorageKeyboard.hex

Creating load file for EEPROM: MassStorageKeyboard.eep

Creating Extended Listing: MassStorageKeyboard.lss

Creating Symbol Table: MassStorageKeyboard.sym

-------- Unhooked LUFA Events --------
USB_Device_Reset
USB_Device_Suspend
USB_Device_WakeUp
--------------------------------------

---- Compile Time Library Options ----
USB_DEVICE_ONLY
FIXED_CONTROL_ENDPOINT_SIZE=8
FIXED_NUM_CONFIGURATIONS=1
USE_FLASH_DESCRIPTORS
USE_STATIC_OPTIONS=(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)
INTERRUPT_CONTROL_ENDPOINT
--------------------------------------

--------- Target Information ---------
AVR Model: at90usb1287
Board: USBKEY
Clock: 8000000Hz CPU, 8000000Hz Master
--------------------------------------

Size after:
AVR Memory Usage
----------------
Device: at90usb1287

Program: 8150 bytes (6.2% Full)
(.text + .data + .bootloader)

Data: 145 bytes (1.8% Full)
(.data + .bss + .noinit)



-------- end --------


-------- begin --------
Cleaning project:
-------- end --------


-------- begin --------
avr-gcc (WinAVR 20100110) 4.3.3
Copyright © 2008 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.


Compiling C: MIDI.c

Compiling C: Descriptors.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/DevChapter9.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Endpoint.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Host.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/HostChapter9.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/LowLevel.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/Pipe.c

Compiling C: ../../../../LUFA/Drivers/USB/LowLevel/USBInterrupt.c

Compiling C: ../../../../LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c

Compiling C: ../../../../LUFA/Drivers/USB/HighLevel/Events.c

Compiling C: ../../../../LUFA/Drivers/USB/HighLevel/USBTask.c

Compiling C: ../../../../LUFA/Drivers/USB/Class/Device/MIDI.c

Linking: MIDI.elf

Creating load file for Flash: MIDI.hex

Creating load file for EEPROM: MIDI.eep

Creating Extended Listing: MIDI.lss

Creating Symbol Table: MIDI.sym

Checking for invalid events...

---- Compile Time Library Options ----
USB_DEVICE_ONLY
FIXED_CONTROL_ENDPOINT_SIZE=8
FIXED_NUM_CONFIGURATIONS=1
USE_FLASH_DESCRIPTORS
USE_STATIC_OPTIONS=(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)
--------------------------------------

--------- Target Information ---------
AVR Model: at90usb1287
Board: USBKEY
Clock: 8000000Hz CPU, 8000000Hz Master
--------------------------------------

Size after:
AVR Memory Usage
----------------
Device: at90usb1287

Program: 3428 bytes (2.6% Full)
(.text + .data + .bootloader)

Data: 24 bytes (0.3% Full)
(.data + .bss + .noinit)



-------- end --------


-------- begin --------
Cleaning project:
-------- end --------


-------- begin --------
avr-gcc (WinAVR 20100110) 4.3.3
Copyright © 2008 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.


Compiling C: Mouse.c
In file included from ../../../../LUFA/Drivers/Board/Joystick.h:76,
from Mouse.h:51,
from Mouse.c:37:
../../../../LUFA/Drivers/Board/USBKEY/Joystick.h: In function 'Joystick_Init':
../../../../LUFA/Drivers/Board/USBKEY/Joystick.h:98: error: 'DDRE' undeclared (first use in this function)
../../../../LUFA/Drivers/Board/USBKEY/Joystick.h:98: error: (Each undeclared identifier is reported only once
../../../../LUFA/Drivers/Board/USBKEY/Joystick.h:98: error: for each function it appears in.)
../../../../LUFA/Drivers/Board/USBKEY/Joystick.h:101: error: 'PORTE' undeclared (first use in this function)
../../../../LUFA/Drivers/Board/USBKEY/Joystick.h: In function 'Joystick_GetStatus':
../../../../LUFA/Drivers/Board/USBKEY/Joystick.h:107: error: 'PINE' undeclared (first use in this function)
In file included from ../../../../LUFA/Drivers/Board/Buttons.h:77,
from Mouse.h:53,
from Mouse.c:37:
../../../../LUFA/Drivers/Board/USBKEY/Buttons.h: In function 'Buttons_Init':
../../../../LUFA/Drivers/Board/USBKEY/Buttons.h:79: error: 'DDRE' undeclared (first use in this function)
../../../../LUFA/Drivers/Board/USBKEY/Buttons.h:80: error: 'PORTE' undeclared (first use in this function)
../../../../LUFA/Drivers/Board/USBKEY/Buttons.h: In function 'Buttons_GetStatus':
../../../../LUFA/Drivers/Board/USBKEY/Buttons.h:86: error: 'PINE' undeclared (first use in this function)
make[4]: *** [Mouse.o] Error 1
make[3]: *** [all] Error 2
make[2]: *** [all] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2
Build failed with 8 errors and 0 warnings...


Оценочная плата - AVR Simulator
alex6441161
Цитата(kuliba @ Jul 15 2010, 16:10) *
Ну раз ветка для начинающих, то тут как раз место задать свои глупые вопросы.

Я совсем начинающий. Сделал схемку мыши. Далее, как я правильно понял, мне нужно откомпилировать демку из библиотеки LUFA и получившуюся прошивку залить на МК. И тут я уперся:

1. Где в библиотеке/проекте указать на каких выводах у меня сидят три мышиные кнопки и scroll encoder?
2. Как откомпилировать библиотеку? Делаю rebuild all, выскакивают ошибки типа:

../../../../LUFA/Drivers/Board/USBKEY/Joystick.h:98: error: 'DDRE' undeclared (first use in this function)
../../../../LUFA/Drivers/Board/USBKEY/Joystick.h:101: error: 'PORTE' undeclared (first use in this function)
../../../../LUFA/Drivers/Board/USBKEY/Joystick.h: In function 'Joystick_GetStatus':
../../../../LUFA/Drivers/Board/USBKEY/Joystick.h:107: error: 'PINE' undeclared (first use in this function)
In file included from ../../../../LUFA/Drivers/Board/Buttons.h:77,
../../../../LUFA/Drivers/Board/USBKEY/Buttons.h: In function 'Buttons_Init':


приветствую, у вас получилось реализовать аппаратное USB? Если да то можете мне помочь?
Для просмотра полной версии этой страницы, пожалуйста, пройдите по ссылке.
Invision Power Board © 2001-2025 Invision Power Services, Inc.