attiny10: skipping incompatible avrtiny10/libgcc.a

1 post / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avr-gcc is not able to link attiny10 project (using the autogenerated main() function):

------ Build started: Project: attiny10_gcc, Configuration: Debug AVR ------
Build started.
Project "attiny10_gcc.avrgccproj" (default targets):
Target "PreBuildEvent" skipped, due to false condition; ('$(PreBuildEvent)'!='') was evaluated as (''!='').
Target "CoreBuild" in file "C:\Programme\Atmel\AVR Studio 5.0\Vs\AvrGCC.targets" from project "C:\Dokumente und Einstellungen\Besitzer\Eigene Dateien\AVRStudio\attiny10_gcc\attiny10_gcc\attiny10_gcc.avrgccproj" (target "Build" depends on it):
Task "RunAvrGCC"
make all
attiny10_gcc.c
Invoking: AVR/GNU C Compiler
"C:/Programme/Atmel/AVR Studio 5.0/extensions/Application/Avr ToolChain/bin/avr-gcc.exe" -funsigned-char -funsigned-bitfields -O0 -fpack-struct -fshort-enums -g2 -Wall -c -mmcu=attiny10 -MMD -MP -MF"attiny10_gcc.d" -MT"attiny10_gcc.d" -o"attiny10_gcc.o" ".././attiny10_gcc.c"
Finished building: .././attiny10_gcc.c
Building target: attiny10_gcc.elf
Invoking: AVR/GNU C Linker
"C:/Programme/Atmel/AVR Studio 5.0/extensions/Application/Avr ToolChain/bin/avr-gcc.exe" -mmcu=attiny10 -o attiny10_gcc.elf attiny10_gcc.o
C:\Dokumente und Einstellungen\Besitzer\Eigene Dateien\AVRStudio\attiny10_gcc\attiny10_gcc\Debug(1,1): skipping incompatible c:/programme/atmel/avr studio 5.0/extensions/application/avr toolchain/bin/../lib/gcc/avr/4.5.1/avrtiny10\libgcc.a when searching for -lgcc
C:\Dokumente und Einstellungen\Besitzer\Eigene Dateien\AVRStudio\attiny10_gcc\attiny10_gcc\Debug(1,1): skipping incompatible c:/programme/atmel/avr studio 5.0/extensions/application/avr toolchain/bin/../lib/gcc/avr/4.5.1\libgcc.a when searching for -lgcc
C:\Dokumente und Einstellungen\Besitzer\Eigene Dateien\AVRStudio\attiny10_gcc\attiny10_gcc\Debug(1,1): cannot find -lgcc
collect2: ld returned 1 exit status
make: *** [attiny10_gcc.elf] Error 1
Done executing task "RunAvrGCC" -- FAILED.
Done building target "CoreBuild" in project "attiny10_gcc.avrgccproj" -- FAILED.
Done building project "attiny10_gcc.avrgccproj" -- FAILED.

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

in order to fix this (for simple projects that dont need libgcc):
1) switch to "manual makefile"
2) change the lines in Makefile

# AVR/GNU C Linker
$(OUTPUT_FILE_PATH): $(OBJS) $(USER_OBJS)
@echo Building target: $@
@echo Invoking: AVR/GNU C Linker
$(QUOTE)$(AVR_APP_PATH)avr-gcc.exe$(QUOTE) -mmcu=attiny10 -o$(OUTPUT_FILE_PATH_AS_ARGS) $(OBJS_AS_ARGS) $(USER_OBJS) $(LIBS)
@echo Finished building target: $@

to

# AVR/GNU C Linker
$(OUTPUT_FILE_PATH): $(OBJS) $(USER_OBJS)
@echo Building target: $@
@echo Invoking: AVR/GNU C Linker
$(QUOTE)$(AVR_APP_PATH)avr-ld.exe$(QUOTE) -o$(OUTPUT_FILE_PATH_AS_ARGS) $(OBJS_AS_ARGS) $(USER_OBJS) $(LIBS)
@echo Finished building target: $@