Go Down

Topic: makefile:631: *** multiple target patterns. Stop. (SOLVED) (Read 221 times) previous topic - next topic

2n3904

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

Code: [Select]
makefile:631: *** multiple target patterns.  Stop.

I suspect it has something to with this line in the makefile?
Code: [Select]
OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o)

2n3904

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

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?
ATtiny core for 841+1634+828 and x313/x4/x5/x61/x7/x8 series Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts (some assembled), mosfets and awesome prototyping board in my store http://tindie.com/stores/DrAzzy

2n3904

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. https://pasteboard.co/HMaNM2i.png

Budvar10

There is in makefile:

Code: [Select]
# make all = Make software.
and 
Code: [Select]
# To rebuild project do "make clean" then "make all".
 Try it.
Arduino clone with ATmega1284P   http://forum.arduino.cc/index.php?topic=277260.0

2n3904

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

Budvar10

#6
Nov 08, 2018, 12:10 pm Last Edit: Nov 08, 2018, 12:27 pm by Budvar10
As I see, you are trying it from Windows CMD. Probably you need something like MinGW installed to do it or to use Linux.
Arduino clone with ATmega1284P   http://forum.arduino.cc/index.php?topic=277260.0

Budvar10

#7
Nov 08, 2018, 12:39 pm Last Edit: Nov 09, 2018, 06:27 am by Budvar10
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:
Code: [Select]
-------- 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.
Arduino clone with ATmega1284P   http://forum.arduino.cc/index.php?topic=277260.0

2n3904

#8
Nov 08, 2018, 03:07 pm Last Edit: Nov 08, 2018, 03:15 pm by 2n3904
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. :)

Installed these packages on RetroPie:

Code: [Select]
sudo apt-get install gcc-avr binutils-avr avr-libc

Thanks again!

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:
Code: [Select]
-------- 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.

Budvar10

Arduino clone with ATmega1284P   http://forum.arduino.cc/index.php?topic=277260.0

Go Up