Author Topic: Another WinAVR-compile issue  (Read 7294 times)

Offline drnicolas

  • Multiple posting newcomer
  • *
  • Posts: 11
Another WinAVR-compile issue
« on: February 20, 2011, 10:11:30 pm »
okay, after the first problems all my source files seem to compile succesfully.

But then, codeblocks calls avr-g++. Eclipse calls avr-gcc again for the linking process.
I just try to move an existing project from Elcipse to codeblocks.

This is the line:
[100.0%] avr-g++.exe  -o bin\Debug\CAN2USB.elf obj\Debug\CAN-Adapter\CANUSB-Adapter\Firmware\CAN2USB_Konverter.o obj\Debug\CAN-Adapter\CANUSB-Adapter\Firmware\Main.o obj\Debug\Simulator-Panel\Allgemein\Module\CAN_RingBuffer.o obj\Debug\Simulator-Panel\Allgemein\Module\UART\UART.o obj\Debug\Simulator-Panel\Allgemein\Module\UART\UART_RingBuffer.o obj\Debug\Simulator-Panel\AvionicMaster\Firmware\Sources\Message_Conversion.o obj\Debug\Y\Hardware\AT90CANxxx\CAN-Driver\AT90CANxxx_CAN_drv.o obj\Debug\CAN-Adapter\CANUSB-Adapter\Firmware\CAN2USB-Adapter.o   -mmcu= -Wl,-Map=bin\Debug\CAN2USB.elf.map,--cref 
c:/elektronik/winavr/bin/../lib/gcc/avr/4.3.3/../../../../avr/bin/ld.exe: avr:51 architecture of input file `obj\Debug\CAN-Adapter\CANUSB-Adapter\Firmware\CAN2USB_Konverter.o' is incompatible with avr output
c:/elektronik/winavr/bin/../lib/gcc/avr/4.3.3/../../../../avr/bin/ld.exe: avr:51 architecture of input file `obj\Debug\CAN-Adapter\CANUSB-Adapter\Firmware\Main.o' is incompatible with avr output
c:/elektronik/winavr/bin/../lib/gcc/avr/4.3.3/../../../../avr/bin/ld.exe: avr:51 architecture of input file `obj\Debug\Simulator-Panel\Allgemein\Module\CAN_RingBuffer.o' is incompatible with avr output
c:/elektronik/winavr/bin/../lib/gcc/avr/4.3.3/../../../../avr/bin/ld.exe: avr:51 architecture of input file `obj\Debug\Simulator-Panel\Allgemein\Module\UART\UART.o' is incompatible with avr output
c:/elektronik/winavr/bin/../lib/gcc/avr/4.3.3/../../../../avr/bin/ld.exe: avr:51 architecture of input file `obj\Debug\Simulator-Panel\Allgemein\Module\UART\UART_RingBuffer.o' is incompatible with avr output
c:/elektronik/winavr/bin/../lib/gcc/avr/4.3.3/../../../../avr/bin/ld.exe: avr:51 architecture of input file `obj\Debug\Simulator-Panel\AvionicMaster\Firmware\Sources\Message_Conversion.o' is incompatible with avr output
c:/elektronik/winavr/bin/../lib/gcc/avr/4.3.3/../../../../avr/bin/ld.exe: avr:51 architecture of input file `obj\Debug\Y\Hardware\AT90CANxxx\CAN-Driver\AT90CANxxx_CAN_drv.o' is incompatible with avr output
c:/elektronik/winavr/bin/../lib/gcc/avr/4.3.3/../../../../avr/bin/ld.exe: avr:51 architecture of input file `obj\Debug\CAN-Adapter\CANUSB-Adapter\Firmware\CAN2USB-Adapter.o' is incompatible with avr output
c:/elektronik/winavr/bin/../lib/gcc/avr/4.3.3/../../../../avr/bin/ld.exe: bin\Debug\CAN2USB.elf section .text will not fit in region text
c:/elektronik/winavr/bin/../lib/gcc/avr/4.3.3/../../../../avr/bin/ld.exe: region text overflowed by 3148 bytes
obj\Debug\CAN-Adapter\CANUSB-Adapter\Firmware\Main.o: In function `main':
X:\CodeBlocks\CAN2USB/..\..\CAN-Adapter\CANUSB-Adapter\Firmware/Main.c:106: undefined reference to `__eerd_block_can128'
Process terminated with status 1 (0 minutes, 1 seconds)
1 errors, 0 warnings


This is completely different form my elcipse experience
Computer Windows7 in a domain-environment
Codeblocks 10.05

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9493
Re: Another WinAVR-compile issue
« Reply #1 on: February 21, 2011, 10:24:48 am »
...I believe there used to be an Eclipse plugin that allowed to export/convert eclipse project into C::B projects.

You can try to search the forums, IMHO it was mariocup...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Another WinAVR-compile issue
« Reply #2 on: February 21, 2011, 11:01:37 am »
'c:/elektronik/winavr/bin/../lib/gcc/avr/4.3.3/../../../../avr/bin/ld.exe' this path is very complicated for the executable. The default should be 'c:/elektronik/winavr/bin/' for avr-ld.exe or 'c:/elektronik/winavr/avr/bin/' for ld.exe. There seems to be something wrong with compiler paths in the make file.