Build error recipe for target 'graphicstest.elf' failed

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Disclosure, I'm a hardware guy fumbling my way through this.

 

I tried importing an Ardruino sketch into AS7, and the conversion to c++ seemed to go smoothly, however when I build the project I get the following error:  Build error recipe for target 'graphicstest.elf' failed

 

I'm guessing this is a linker issue?   when I double click on the error it opens the following make file.

 

Can anyone suggest where I'm going wrong?

 

 

################################################################################
# Automatically-generated file. Do not edit!
################################################################################

SHELL := cmd.exe
RM := rm -rf

USER_OBJS :=

LIBS :=
PROJ :=

O_SRCS :=
C_SRCS :=
S_SRCS :=
S_UPPER_SRCS :=
OBJ_SRCS :=
ASM_SRCS :=
PREPROCESSING_SRCS :=
OBJS :=
OBJS_AS_ARGS :=
C_DEPS :=
C_DEPS_AS_ARGS :=
EXECUTABLES :=
OUTPUT_FILE_PATH :=
OUTPUT_FILE_PATH_AS_ARGS :=
AVR_APP_PATH :=$$$AVR_APP_PATH$$$
QUOTE := "
ADDITIONAL_DEPENDENCIES:=
OUTPUT_FILE_DEP:=
LIB_DEP:=
LINKER_SCRIPT_DEP:=

# Every subdirectory with source files must be described here
SUBDIRS :=  \
../Device_Startup/ \
../linker_scripts/ \
../linker_scripts/linker_scripts/ \
../linker_scripts/linker_scripts/gcc/

# Add inputs and outputs from these tool invocations to the build variables
C_SRCS +=  \
../Sketch.cpp

PREPROCESSING_SRCS +=

ASM_SRCS +=

OBJS +=  \
Sketch.o

OBJS_AS_ARGS +=  \
Sketch.o

C_DEPS +=  \
Sketch.d

C_DEPS_AS_ARGS +=  \
Sketch.d

OUTPUT_FILE_PATH +=graphicstest.elf

OUTPUT_FILE_PATH_AS_ARGS +=graphicstest.elf

ADDITIONAL_DEPENDENCIES:=

OUTPUT_FILE_DEP:= ./makedep.mk

LIB_DEP+=  \
C:/Users/EC-JRS/Documents/Atmel\ Studio/7.0/ArduinoSketchImport_1/ArduinoSketchImport_1/ArduinoCore/Debug/libArduinoCore.a

LINKER_SCRIPT_DEP+=  \
../Device_Startup/samd21g18a_flash.ld \
../Device_Startup/samd21g18a_sram.ld \
../linker_scripts/linker_scripts/gcc/flash_without_bootloader.ld \
../linker_scripts/linker_scripts/gcc/flash_with_bootloader.ld

# AVR32/GNU C Compiler
./Sketch.o: .././Sketch.cpp
    @echo Building file: $<
    @echo Invoking: ARM/GNU C Compiler : 6.3.1
    $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-g++.exe$(QUOTE) -mthumb -D__SAMD21G18A__ -DDEBUG -DF_CPU=48000000L -DARDUINO=10805 -DARDUINO_SAMD_MKRZERO -DARDUINO_ARCH_SAMD -DUSB_VID=0x2341 -DUSB_PID=0x804f -DUSB_PRODUCT="\"Arduino MKRZero\"" -DUSB_MANUFACTURER="\"Arduino LLC\"" -DUSBCON -DSAMD_SERIES  -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\cmsis\5.0.1\CMSIS\Include" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\SAMD21_DFP\1.3.331\samd21a\include" -I"..\\..\ArduinoCore\include\core" -I"..\\..\ArduinoCore\include\variants" -I"..\\..\ArduinoCore\include\core\avr" -I"..\\..\ArduinoCore\include\core\samd21" -I"..\\..\ArduinoCore\include\core\USB" -I"..\\..\ArduinoCore\include\core\samd21\include" -I"..\\..\ArduinoCore\include\core\samd21\include\component" -I"..\\..\ArduinoCore\include\core\samd21\include\instance" -I"..\\..\ArduinoCore\include\core\samd21\include\pio" -I"..\\..\ArduinoCore\include\libraries\adafruit_gfx_library" -I"..\\..\ArduinoCore\include\libraries\adafruit_ili9341" -I"..\\..\ArduinoCore\include\libraries\spi" -I"..\\..\ArduinoCore\include\libraries\adafruit_gfx_library\Fonts" -I"..\\..\ArduinoCore\include\libraries\adafruit_ili9341\examples\pictureEmbed"  -Os -fno-threadsafe-statics -fno-exceptions -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -g3 -w -mcpu=cortex-m0plus -c -std=gnu++11 --param max-inline-insns-single=500 -nostdlib -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)"   -o "$@" "$<"
    @echo Finished building: $<
    

 

# AVR32/GNU Preprocessing Assembler

 

# AVR32/GNU Assembler

 

ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(C_DEPS)),)
-include $(C_DEPS)
endif
endif

# Add inputs and outputs from these tool invocations to the build variables

# All Target
all: $(OUTPUT_FILE_PATH) $(ADDITIONAL_DEPENDENCIES)

$(OUTPUT_FILE_PATH): $(OBJS) $(USER_OBJS) $(OUTPUT_FILE_DEP) $(LIB_DEP) $(LINKER_SCRIPT_DEP)
    @echo Building target: $@
    @echo Invoking: ARM/GNU Linker : 6.3.1
    $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-g++.exe$(QUOTE) -o$(OUTPUT_FILE_PATH_AS_ARGS) $(OBJS_AS_ARGS) $(USER_OBJS) $(LIBS) -mthumb -Wl,-Map="graphicstest.map" --specs=nano.specs --specs=nosys.specs -Wl,--start-group -lm -lArduinoCore -l:Adafruit_ILI9341.h  -Wl,--end-group -L"..\\Device_Startup" -L"..\linker_scripts\linker_scripts\gcc" -L"C:\Users\EC-JRS\DOCUME~1\ATMELS~1\7.0\JEFFSA~1\JEFFSA~1\ARDUIN~1\Debug" -L"C:\Users\EC-JRS\Documents\Atmel Studio\7.0\ArduinoGT\ArduinoGT\Adafruit_ILI9341"  -Wl,--gc-sections -mcpu=cortex-m0plus -Tflash_without_bootloader.ld -Wl,--cref -Os -Wl,--check-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align  
    @echo Finished building target: $@
    "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-objcopy.exe" -O binary "graphicstest.elf" "graphicstest.bin"
    "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-objcopy.exe" -O ihex -R .eeprom -R .fuse -R .lock -R .signature  "graphicstest.elf" "graphicstest.hex"
    "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-objcopy.exe" -j .eeprom --set-section-flags=.eeprom=alloc,load --change-section-lma .eeprom=0 --no-change-warnings -O binary "graphicstest.elf" "graphicstest.eep" || exit 0
    "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-objdump.exe" -h -S "graphicstest.elf" > "graphicstest.lss"
    "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-objcopy.exe" -O srec -R .eeprom -R .fuse -R .lock -R .signature  "graphicstest.elf" "graphicstest.srec"
    "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-size.exe" "graphicstest.elf"
    
    

 

 

# Other Targets
clean:
    -$(RM) $(OBJS_AS_ARGS) $(EXECUTABLES)  
    -$(RM) $(C_DEPS_AS_ARGS)   
    rm -rf "graphicstest.elf" "graphicstest.a" "graphicstest.hex" "graphicstest.bin" "graphicstest.lss" "graphicstest.eep" "graphicstest.map" "graphicstest.srec"

 

 

 

 

Jester77

Last Edited: Sat. Feb 9, 2019 - 01:52 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

We need to see the build output to make any sense of it. If could be something simple like a misspelled file but the make file wont tell us that.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I tried re-importing the project and now I have a different error, I have attached the build output

 

FWIW, I notice in the solution explorer pane, ArduinoCore has a warning icon (triangle with !), when I double click the warning,  the error list states:

cannot find -lArduinoCore

recipe for target 'graphictest.elf' failed

ld returned 1 exit status

 

------ Build started: Project: ArduinoCore, Configuration: Debug ARM ------
Build started.
Project "ArduinoCore.cppproj" (default targets):
Target "PreBuildEvent" skipped, due to false condition; ('$(PreBuildEvent)'!='') was evaluated as (''!='').
Target "CoreBuild" in file "C:\Program Files (x86)\Atmel\Studio\7.0\Vs\Compiler.targets" from project "c:\users\ec-jrs\Documents\Atmel Studio\7.0\ArduinoGT2\ArduinoGT2\ArduinoCore\ArduinoCore.cppproj" (target "Build" depends on it):
    Task "RunCompilerTask"
        Shell Utils Path C:\Program Files (x86)\Atmel\Studio\7.0\shellUtils
        C:\Program Files (x86)\Atmel\Studio\7.0\shellUtils\make.exe all --jobs 4 --output-sync
        Building file: ../src/libraries/adafruit_gfx_library/fontconvert/fontconvert.c
        Invoking: ARM/GNU C Compiler : 6.3.1
c:\users\ec-jrs\Documents\Atmel Studio\7.0\ArduinoGT2\ArduinoGT2\ArduinoCore\src\libraries\adafruit_gfx_library\fontconvert\fontconvert.c(23,22): error: ft2build.h: No such file or directory
         #include <ft2build.h>
                              ^
        compilation terminated.
        make: *** [src/libraries/adafruit_gfx_library/fontconvert/fontconvert.o] Error 1
        "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe"  -x c -mthumb -D__SAMD21G18A__ -DDEBUG -DF_CPU=48000000L -DARDUINO=10805 -DARDUINO_SAMD_MKRZERO -DARDUINO_ARCH_SAMD -DUSB_VID=0x2341 -DUSB_PID=0x804f -DUSB_PRODUCT="\"Arduino MKRZero\"" -DUSB_MANUFACTURER="\"Arduino LLC\"" -DUSBCON -DSAMD_SERIES  -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\cmsis\5.0.1\CMSIS\Include" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\SAMD21_DFP\1.3.331\samd21a\include" -I"..\include\libraries\spi" -I"..\include\libraries\adafruit_gfx_library" -I"..\include\libraries\adafruit_gfx_library\Fonts" -I"..\include\libraries\adafruit_ili9341" -I"..\include\libraries\adafruit_ili9341\examples\pictureEmbed" -I"..\include\core" -I"..\include\core\avr" -I"..\include\core\USB" -I"..\include\variants" -I"..\include\core\samd21" -I"..\include\core\samd21\include" -I"..\include\core\samd21\include\component" -I"..\include\core\samd21\include\instance" -I"..\include\core\samd21\include\pio"  -Os -fno-threadsafe-statics -fno-exceptions -ffunction-sections -fdata-sections -g3 -w -mcpu=cortex-m0plus -c -std=gnu11 --param max-inline-insns-single=500 -nostdlib -MD -MP -MF "src/libraries/adafruit_gfx_library/fontconvert/fontconvert.d" -MT"src/libraries/adafruit_gfx_library/fontconvert/fontconvert.d" -MT"src/libraries/adafruit_gfx_library/fontconvert/fontconvert.o"   -o "src/libraries/adafruit_gfx_library/fontconvert/fontconvert.o" "../src/libraries/adafruit_gfx_library/fontconvert/fontconvert.c"
c:\users\ec-jrs\Documents\Atmel Studio\7.0\ArduinoGT2\ArduinoGT2\ArduinoCore\Debug\Makefile(519,1): error: recipe for target 'src/libraries/adafruit_gfx_library/fontconvert/fontconvert.o' failed
        make: *** Waiting for unfinished jobs....
        Building file: ../src/libraries/adafruit_gfx_library/glcdfont.c
        Invoking: ARM/GNU C Compiler : 6.3.1
        "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe"  -x c -mthumb -D__SAMD21G18A__ -DDEBUG -DF_CPU=48000000L -DARDUINO=10805 -DARDUINO_SAMD_MKRZERO -DARDUINO_ARCH_SAMD -DUSB_VID=0x2341 -DUSB_PID=0x804f -DUSB_PRODUCT="\"Arduino MKRZero\"" -DUSB_MANUFACTURER="\"Arduino LLC\"" -DUSBCON -DSAMD_SERIES  -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\cmsis\5.0.1\CMSIS\Include" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\SAMD21_DFP\1.3.331\samd21a\include" -I"..\include\libraries\spi" -I"..\include\libraries\adafruit_gfx_library" -I"..\include\libraries\adafruit_gfx_library\Fonts" -I"..\include\libraries\adafruit_ili9341" -I"..\include\libraries\adafruit_ili9341\examples\pictureEmbed" -I"..\include\core" -I"..\include\core\avr" -I"..\include\core\USB" -I"..\include\variants" -I"..\include\core\samd21" -I"..\include\core\samd21\include" -I"..\include\core\samd21\include\component" -I"..\include\core\samd21\include\instance" -I"..\include\core\samd21\include\pio"  -Os -fno-threadsafe-statics -fno-exceptions -ffunction-sections -fdata-sections -g3 -w -mcpu=cortex-m0plus -c -std=gnu11 --param max-inline-insns-single=500 -nostdlib -MD -MP -MF "src/libraries/adafruit_gfx_library/glcdfont.d" -MT"src/libraries/adafruit_gfx_library/glcdfont.d" -MT"src/libraries/adafruit_gfx_library/glcdfont.o"   -o "src/libraries/adafruit_gfx_library/glcdfont.o" "../src/libraries/adafruit_gfx_library/glcdfont.c"
        Finished building: ../src/libraries/adafruit_gfx_library/glcdfont.c
        Building file: ../src/libraries/spi/SPI.cpp
        Invoking: ARM/GNU C Compiler : 6.3.1
        "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-g++.exe" -mthumb -D__SAMD21G18A__ -DDEBUG -DF_CPU=48000000L -DARDUINO=10805 -DARDUINO_SAMD_MKRZERO -DARDUINO_ARCH_SAMD -DUSB_VID=0x2341 -DUSB_PID=0x804f -DUSB_PRODUCT="\"Arduino MKRZero\"" -DUSB_MANUFACTURER="\"Arduino LLC\"" -DUSBCON -DSAMD_SERIES  -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\cmsis\5.0.1\CMSIS\Include" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\SAMD21_DFP\1.3.331\samd21a\include" -I"..\include\libraries\spi" -I"..\include\libraries\adafruit_gfx_library" -I"..\include\libraries\adafruit_gfx_library\Fonts" -I"..\include\libraries\adafruit_ili9341" -I"..\include\libraries\adafruit_ili9341\examples\pictureEmbed" -I"..\include\core" -I"..\include\core\avr" -I"..\include\core\USB" -I"..\include\variants" -I"..\include\core\samd21" -I"..\include\core\samd21\include" -I"..\include\core\samd21\include\component" -I"..\include\core\samd21\include\instance" -I"..\include\core\samd21\include\pio"  -Os -fno-threadsafe-statics -fno-exceptions -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -g3 -w -mcpu=cortex-m0plus -c -std=gnu++11 --param max-inline-insns-single=500 -nostdlib -MD -MP -MF "src/libraries/spi/SPI.d" -MT"src/libraries/spi/SPI.d" -MT"src/libraries/spi/SPI.o"   -o "src/libraries/spi/SPI.o" "../src/libraries/spi/SPI.cpp"
        Finished building: ../src/libraries/spi/SPI.cpp
        Building file: ../src/libraries/adafruit_ili9341/Adafruit_ILI9341.cpp
        Invoking: ARM/GNU C Compiler : 6.3.1
        "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-g++.exe" -mthumb -D__SAMD21G18A__ -DDEBUG -DF_CPU=48000000L -DARDUINO=10805 -DARDUINO_SAMD_MKRZERO -DARDUINO_ARCH_SAMD -DUSB_VID=0x2341 -DUSB_PID=0x804f -DUSB_PRODUCT="\"Arduino MKRZero\"" -DUSB_MANUFACTURER="\"Arduino LLC\"" -DUSBCON -DSAMD_SERIES  -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\cmsis\5.0.1\CMSIS\Include" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\SAMD21_DFP\1.3.331\samd21a\include" -I"..\include\libraries\spi" -I"..\include\libraries\adafruit_gfx_library" -I"..\include\libraries\adafruit_gfx_library\Fonts" -I"..\include\libraries\adafruit_ili9341" -I"..\include\libraries\adafruit_ili9341\examples\pictureEmbed" -I"..\include\core" -I"..\include\core\avr" -I"..\include\core\USB" -I"..\include\variants" -I"..\include\core\samd21" -I"..\include\core\samd21\include" -I"..\include\core\samd21\include\component" -I"..\include\core\samd21\include\instance" -I"..\include\core\samd21\include\pio"  -Os -fno-threadsafe-statics -fno-exceptions -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -g3 -w -mcpu=cortex-m0plus -c -std=gnu++11 --param max-inline-insns-single=500 -nostdlib -MD -MP -MF "src/libraries/adafruit_ili9341/Adafruit_ILI9341.d" -MT"src/libraries/adafruit_ili9341/Adafruit_ILI9341.d" -MT"src/libraries/adafruit_ili9341/Adafruit_ILI9341.o"   -o "src/libraries/adafruit_ili9341/Adafruit_ILI9341.o" "../src/libraries/adafruit_ili9341/Adafruit_ILI9341.cpp"
        Finished building: ../src/libraries/adafruit_ili9341/Adafruit_ILI9341.cpp
    Done executing task "RunCompilerTask" -- FAILED.
Done building target "CoreBuild" in project "ArduinoCore.cppproj" -- FAILED.
Done building project "ArduinoCore.cppproj" -- FAILED.

Build FAILED.
------ Build started: Project: graphicstest, Configuration: Debug ARM ------
Build started.
Project "graphicstest.cppproj" (default targets):
Target "PreBuildEvent" skipped, due to false condition; ('$(PreBuildEvent)'!='') was evaluated as (''!='').
Target "CoreBuild" in file "C:\Program Files (x86)\Atmel\Studio\7.0\Vs\Compiler.targets" from project "c:\users\ec-jrs\Documents\Atmel Studio\7.0\ArduinoGT2\ArduinoGT2\graphicstest\graphicstest.cppproj" (target "Build" depends on it):
    Task "RunCompilerTask"
        Shell Utils Path C:\Program Files (x86)\Atmel\Studio\7.0\shellUtils
        C:\Program Files (x86)\Atmel\Studio\7.0\shellUtils\make.exe all --jobs 4 --output-sync
cannot find -lArduinoCorecollect2.exe(0,0): error: ld returned 1 exit status
        make: *** [graphicstest.elf] Error 1
        Building target: graphicstest.elf
        Invoking: ARM/GNU Linker : 6.3.1
        "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-g++.exe" -o graphicstest.elf  Sketch.o   -mthumb -Wl,-Map="graphicstest.map" --specs=nano.specs --specs=nosys.specs -Wl,--start-group -lm -lArduinoCore  -Wl,--end-group -L"..\\Device_Startup" -L"..\linker_scripts\linker_scripts\gcc" -L"c:\users\ec-jrs\Documents\Atmel Studio\7.0\ArduinoGT2\ArduinoGT2\ArduinoCore\Debug"  -Wl,--gc-sections -mcpu=cortex-m0plus -Tflash_without_bootloader.ld -Wl,--cref -Os -Wl,--check-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align  
c:\users\ec-jrs\Documents\Atmel Studio\7.0\ArduinoGT2\ArduinoGT2\graphicstest\Debug\Makefile(114,1): error: recipe for target 'graphicstest.elf' failed
        The command exited with code 2.
    Done executing task "RunCompilerTask" -- FAILED.
Done building target "CoreBuild" in project "graphicstest.cppproj" -- FAILED.
Done building project "graphicstest.cppproj" -- FAILED.

Build FAILED.
========== Build: 0 succeeded or up-to-date, 2 failed, 0 skipped ==========

 

Jester77

Last Edited: Sat. Feb 9, 2019 - 03:04 PM