0

http://flipmu.com/work/arduinome/instructions/uno-atmega-8u2-serial-number/

尝试使用 Windows 完成此操作,我的意图是从我的 Arduino Uno 中的 atmega 8u2 中刷新序列号。我在 Windows 上使用 Atmel Studio 6。

我已根据需要下载了 LUFA 库,按照信函中的步骤进行操作,并从命令行收到此响应:

e:\Downloads\LUFA-100807\Projects\arduino-usbserial>make build
The system cannot find the path specified.
The system cannot find the path specified.
ECHO is off.
Compiling C: Arduino-usbserial.c
avr-gcc -c -mmcu=atmega8u2 -I. -gdwarf-2 -DF_CPU=16000000UL  -DF_CLOCK=16000000U
L  -DARDUINO_MODEL_PID=0x0001 -DBOARD=BOARD_USER  -D USB_DEVICE_ONLY -D FIXED_CO
NTROL_ENDPOINT_SIZE=8 -D FIXED_NUM_CONFIGURATIONS=1 -D USE_FLASH_DESCRIPTORS -D
INTERRUPT_CONTROL_ENDPOINT -D DEVICE_STATE_AS_GPIOR=0 -D USE_STATIC_OPTIONS="(US
B_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" -DAVR_RESET_LI
NE_PORT="PORTD" -DAVR_RESET_LINE_DDR="DDRD" -DAVR_RESET_LINE_MASK="(1 << 7)" -DT
X_RX_LED_PULSE_MS=3 -DPING_PONG_LED_PULSE_MS=100 -Os -funsigned-char -funsigned-
bitfields -ffunction-sections -fno-inline-small-functions -fpack-struct -fshort-
enums -fno-strict-aliasing -Wall -Wstrict-prototypes -Wa,-adhlns=./Arduino-usbse
rial.lst -I../../ -std=gnu99 -Wundef -MMD -MP -MF .dep/Arduino-usbserial.o.d Ard
uino-usbserial.c -o Arduino-usbserial.o
In file included from ../../LUFA/Drivers/USB/HighLevel/../LowLevel/Device.h:60:0
,
                 from ../../LUFA/Drivers/USB/HighLevel/../LowLevel/USBController
.h:73,
                 from ../../LUFA/Drivers/USB/HighLevel/USBTask.h:49,
                 from ../../LUFA/Drivers/USB/USB.h:370,
                 from Descriptors.h:42,
                 from Arduino-usbserial.h:45,
                 from Arduino-usbserial.c:37:
../../LUFA/Drivers/USB/HighLevel/../LowLevel/Endpoint.h: In function 'Endpoint_D
iscard_Byte':
../../LUFA/Drivers/USB/HighLevel/../LowLevel/Endpoint.h:572:13: warning: variabl
e 'Dummy' set but not used [-Wunused-but-set-variable]
../../LUFA/Drivers/USB/HighLevel/../LowLevel/Endpoint.h: In function 'Endpoint_D
iscard_Word':
../../LUFA/Drivers/USB/HighLevel/../LowLevel/Endpoint.h:656:13: warning: variabl
e 'Dummy' set but not used [-Wunused-but-set-variable]
../../LUFA/Drivers/USB/HighLevel/../LowLevel/Endpoint.h: In function 'Endpoint_D
iscard_DWord':
../../LUFA/Drivers/USB/HighLevel/../LowLevel/Endpoint.h:749:13: warning: variabl
e 'Dummy' set but not used [-Wunused-but-set-variable]
Arduino-usbserial.c: At top level:
Arduino-usbserial.c:242:1: fatal error: opening dependency file .dep/Arduino-usb
serial.o.d: No such file or directory
compilation terminated.
make: *** [Arduino-usbserial.o] Error 1

我已经通过谷歌搜索了这个问题的解决方案,但我没有找到任何东西 - 我发现了类似的“错误 1”案例,但通过恢复到我正在使用的 LUFA 版本来修复它们。所以我一点头绪都没有。

非常感谢任何帮助。

更新:

以这种方式得到以下响应:

http://autosysprogs.blogspot.com.au/2011/05/arduino-uno-upload-new-firmware-to.html

e:\uno\arduino-usbserial>make all
The system cannot find the path specified.
The system cannot find the path specified.
ECHO is off.
-------- begin --------
avr-gcc (AVR_8_bit_GNU_Toolchain_3.4.0_663) 4.6.2
Copyright (C) 2011 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.

The system cannot find the path specified.
The system cannot find the path specified.
-f was unexpected at this time.
make: *** [sizebefore] Error 255
4

1 回答 1

1

看起来您没有设置适当的 LUFA 构建环境 - 具体来说,您缺少 LUFA 需要的 Bash shell“sh.exe”的 Windows 端口,
请参阅此

于 2012-12-04T10:03:04.273 回答