makefile:631: *** multiple target patterns. Stop. (SOLVED)

I'm trying to compile the Caterina bootloader on Windows 7 but keeps getting:

makefile:631: *** multiple target patterns.  Stop.

I suspect it has something to with this line in the makefile?

OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o)

I'm using the Makefile at https://github.com/arduino-org/Arduino/blob/master/hardware/arduino/avr/bootloaders/caterina/Makefile

Are there spaces in any of the paths? It looks to me like they may not be handling that case correctly. Try compiling from a location where there aren't any spaces in the path and see if that works.

Alternately, can you see what the command line being generated there is?

DrAzzy:
Are there spaces in any of the paths? It looks to me like they may not be handling that case correctly. Try compiling from a location where there aren't any spaces in the path and see if that works.

Alternately, can you see what the command line being generated there is?

No spaces in the paths.

Here's a screenshot of Windows command line. Pasteboard - Uploaded Image

There is in makefile:

# make all = Make software.

and

# To rebuild project do "make clean" then "make all".

Try it.

make clean or make all results in the same error message.

As I see, you are trying it from Windows CMD. Probably you need something like MinGW installed to do it or to use Linux.

Just out of curiosity I tried on Linux. Firstly, it cannot find LUFA. Secondly, I used LUFA from Caterina-ORG but it ends with error:

-------- begin --------
avr-gcc (AVR_8_bit_GNU_Toolchain_3.5.3_1700) 4.9.2
Copyright (C) 2014 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: Descriptors.c
avr-gcc -c -mmcu=atmega32u4 -I. -gdwarf-2 -DF_CPU=16000000UL -DF_USB=16000000UL -DBOARD=BOARD_USER -DARCH=ARCH_AVR8 -DBOOT_START_ADDR=0x7000UL -DDEVICE_VID=UL -DDEVICE_PID=UL -D USB_DEVICE_ONLY -D DEVICE_STATE_AS_GPIOR=0 -D ORDERED_EP_CONFIG -D FIXED_CONTROL_ENDPOINT_SIZE=8 -D FIXED_NUM_CONFIGURATIONS=1 -D USE_RAM_DESCRIPTORS -D USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" -D NO_INTERNAL_SERIAL -D NO_DEVICE_SELF_POWER -D NO_DEVICE_REMOTE_WAKEUP -D NO_SOF_EVENTS -D NO_LOCK_BYTE_WRITE_SUPPORT -Os -funsigned-char -funsigned-bitfields -ffunction-sections -fno-inline-small-functions -fpack-struct -fshort-enums -fno-strict-aliasing -Wall -Wstrict-prototypes -Wa,-adhlns=./Descriptors.lst -ILUFA-111009/ -std=c99 -MMD -MP -MF .dep/Descriptors.o.d Descriptors.c -o Descriptors.o
<command-line>:0:12: error: 'UL' undeclared here (not in a function)
Descriptors.c:56:28: note: in expansion of macro 'DEVICE_VID'
  .VendorID               = DEVICE_VID,
                            ^
make: *** [Descriptors.o] Error 1

Then, I tried Caterina-ORG and it worked.

My OS is customized Linux Mint Mate 16.

Thanks for suggesting Linux. I just tried it on my Game Boy Zero with Raspberry Pi Zero in it and RetroPie installed (Raspbian linux) and it works great. I compiled it successfully. :slight_smile:

Installed these packages on RetroPie:

sudo apt-get install gcc-avr binutils-avr avr-libc

Thanks again!

Budvar10:
Just out of curiosity I tried on Linux. Firstly, it cannot find LUFA. Secondly, I used LUFA fro Caterina-ORG but it ends wit error:

-------- begin --------

avr-gcc (AVR_8_bit_GNU_Toolchain_3.5.3_1700) 4.9.2
Copyright (C) 2014 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: Descriptors.c
avr-gcc -c -mmcu=atmega32u4 -I. -gdwarf-2 -DF_CPU=16000000UL -DF_USB=16000000UL -DBOARD=BOARD_USER -DARCH=ARCH_AVR8 -DBOOT_START_ADDR=0x7000UL -DDEVICE_VID=UL -DDEVICE_PID=UL -D USB_DEVICE_ONLY -D DEVICE_STATE_AS_GPIOR=0 -D ORDERED_EP_CONFIG -D FIXED_CONTROL_ENDPOINT_SIZE=8 -D FIXED_NUM_CONFIGURATIONS=1 -D USE_RAM_DESCRIPTORS -D USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" -D NO_INTERNAL_SERIAL -D NO_DEVICE_SELF_POWER -D NO_DEVICE_REMOTE_WAKEUP -D NO_SOF_EVENTS -D NO_LOCK_BYTE_WRITE_SUPPORT -Os -funsigned-char -funsigned-bitfields -ffunction-sections -fno-inline-small-functions -fpack-struct -fshort-enums -fno-strict-aliasing -Wall -Wstrict-prototypes -Wa,-adhlns=./Descriptors.lst -ILUFA-111009/ -std=c99 -MMD -MP -MF .dep/Descriptors.o.d Descriptors.c -o Descriptors.o
:0:12: error: 'UL' undeclared here (not in a function)
Descriptors.c:56:28: note: in expansion of macro 'DEVICE_VID'
 .VendorID               = DEVICE_VID,
                           ^
make: *** [Descriptors.o] Error 1



Then, I tried Caterina-ORG and it worked.

My OS is customized Linux Mint Mate 16.

You are welcome. 8)