実現したいこと
makeコマンドの後のエラーを解決したい。
###エラーコード
[INFO] : Begin compilation of project "Joystick"... avr-gcc (GCC) 5.4.0 Copyright (C) 2015 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. [GCC] : Compiling C file "Joystick.c" avr-gcc -c -pipe -gdwarf-2 -g2 -mmcu=atmega328p -fshort-enums -fno-inline-small-functions -fpack-struct -Wall -fno-strict-aliasing -funsigned-char -funsigned-bitfields -ffunction-sections -I. -DARCH=ARCH_AVR8 -DF_CPU=16000000UL -mrelax -fno-jump-tables -x c -Os -std=gnu99 -Wstrict-prototypes -DUSE_LUFA_CONFIG_HEADER -IConfig/ -I. -I./lufa/LUFA/.. -DARCH=ARCH_AVR8 -DBOARD=BOARD_NONE -DF_USB=16000000UL -MMD -MP -MF obj/Joystick.d Joystick.c -o obj/Joystick.o In file included from ./lufa/LUFA/../LUFA/Drivers/USB/USB.h:383:0, from Joystick.h:47, from Joystick.c:21: ./lufa/LUFA/../LUFA/Drivers/USB/Core/USBMode.h:260:7: error: #error USB_DEVICE_ONLY is not available for the currently selected microcontroller model. #error USB_DEVICE_ONLY is not available for the currently selected microcontroller model. ^ ./lufa/LUFA/../LUFA/Drivers/USB/Core/USBMode.h:271:6: error: #error The currently selected device, USB mode or architecture is not supported. #error The currently selected device, USB mode or architecture is not supported. ^ In file included from ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/../USBInterrupt.h:60:0, from ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h:56, from ./lufa/LUFA/../LUFA/Drivers/USB/Core/USBController.h:150, from ./lufa/LUFA/../LUFA/Drivers/USB/Core/USBTask.h:47, from ./lufa/LUFA/../LUFA/Drivers/USB/USB.h:386, from Joystick.h:47, from Joystick.c:21: ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/../AVR8/USBInterrupt_AVR8.h:84:4: error: expected identifier before ‘}’ token }; ^ In file included from ./lufa/LUFA/../LUFA/Drivers/USB/Core/USBController.h:150:0, from ./lufa/LUFA/../LUFA/Drivers/USB/Core/USBTask.h:47, from ./lufa/LUFA/../LUFA/Drivers/USB/USB.h:386, from Joystick.h:47, from Joystick.c:21: ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h:114:5: error: #error No PLL prescale value available for chosen F_USB value and AVR model. #error No PLL prescale value available for chosen F_USB value and AVR model. ^ ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h: In function ‘USB_Detach’: ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h:190:5: error: ‘UDCON’ undeclared (first use in this function) UDCON |= (1 << DETACH); ^ ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h:190:5: note: each undeclared identifier is reported only once for each function it appears in ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h:190:22: error: ‘DETACH’ undeclared (first use in this function) UDCON |= (1 << DETACH); ^ ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h: In function ‘USB_Attach’: ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h:204:5: error: ‘UDCON’ undeclared (first use in this function) UDCON &= ~(1 << DETACH); ^ ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h:204:22: error: ‘DETACH’ undeclared (first use in this function) UDCON &= ~(1 << DETACH); ^ ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h: In function ‘USB_PLL_On’: ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h:330:5: error: ‘PLLCSR’ undeclared (first use in this function) PLLCSR = USB_PLL_PSC; ^ ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h:330:14: error: ‘USB_PLL_PSC’ undeclared (first use in this function) PLLCSR = USB_PLL_PSC; ^ ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h:331:35: error: ‘PLLE’ undeclared (first use in this function) PLLCSR = (USB_PLL_PSC | (1 << PLLE)); ^ ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h: In function ‘USB_PLL_Off’: ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h:337:5: error: ‘PLLCSR’ undeclared (first use in this function) PLLCSR = 0; ^ ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h: In function ‘USB_PLL_IsReady’: ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h:343:14: error: ‘PLLCSR’ undeclared (first use in this function) return ((PLLCSR & (1 << PLOCK)) ? true : false); ^ ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h:343:29: error: ‘PLOCK’ undeclared (first use in this function) return ((PLLCSR & (1 << PLOCK)) ? true : false); ^ ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h: In function ‘USB_REG_On’: ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h:352:5: error: ‘REGCR’ undeclared (first use in this function) REGCR &= ~(1 << REGDIS); ^ ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h:352:22: error: ‘REGDIS’ undeclared (first use in this function) REGCR &= ~(1 << REGDIS); ^ ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h: In function ‘USB_REG_Off’: ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h:362:5: error: ‘REGCR’ undeclared (first use in this function) REGCR |= (1 << REGDIS); ^ ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h:362:22: error: ‘REGDIS’ undeclared (first use in this function) REGCR |= (1 << REGDIS); ^ ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h: In function ‘USB_CLK_Freeze’: ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h:383:5: error: ‘USBCON’ undeclared (first use in this function) USBCON |= (1 << FRZCLK); ^ ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h:383:22: error: ‘FRZCLK’ undeclared (first use in this function) USBCON |= (1 << FRZCLK); ^ ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h: In function ‘USB_CLK_Unfreeze’: ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h:389:5: error: ‘USBCON’ undeclared (first use in this function) USBCON &= ~(1 << FRZCLK); ^ ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h:389:22: error: ‘FRZCLK’ undeclared (first use in this function) USBCON &= ~(1 << FRZCLK); ^ ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h: In function ‘USB_Controller_Enable’: ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h:395:5: error: ‘USBCON’ undeclared (first use in this function) USBCON |= (1 << USBE); ^ ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h:395:22: error: ‘USBE’ undeclared (first use in this function) USBCON |= (1 << USBE); ^ ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h: In function ‘USB_Controller_Disable’: ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h:401:5: error: ‘USBCON’ undeclared (first use in this function) USBCON &= ~(1 << USBE); ^ ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h:401:22: error: ‘USBE’ undeclared (first use in this function) USBCON &= ~(1 << USBE); ^ ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h: In function ‘USB_Controller_Reset’: ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h:407:5: error: ‘USBCON’ undeclared (first use in this function) USBCON &= ~(1 << USBE); ^ ./lufa/LUFA/../LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h:407:22: error: ‘USBE’ undeclared (first use in this function) USBCON &= ~(1 << USBE); ^ In file included from Joystick.h:53:0, from Joystick.c:21: Descriptors.h: At top level: Descriptors.h:17:2: error: unknown type name ‘USB_HID_Descriptor_HID_t’ USB_HID_Descriptor_HID_t HID_JoystickHID; ^ lufa/LUFA/Build/DMBS/DMBS/gcc.mk:213: recipe for target 'obj/Joystick.o' failed make: *** [obj/Joystick.o] Error 1
エラーコードは上記です。
入力が多すぎて質問できなかったのでエラーコード少し切り取りました。
###その他
以前、ほかの方に回答してもらって作業は進んだんですが、このエラーコードで立ち止まり、、、
ネットで調べようとしましたが、エラーが多すぎてなんて調べたらいいかわからず、、、
###答え方
別にいいんですが、超初心者でもわかるように回答してくれたらうれしいです。
エラーがたくさん出ても、それは一つずつ解決するしかないんですよ。
回答2件
あなたの回答
tips
プレビュー