Code::Blocks Forums

User forums => Embedded development => Topic started by: drnicolas on February 20, 2011, 10:11:30 pm

Title: Another WinAVR-compile issue
Post by: drnicolas 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
Title: Re: Another WinAVR-compile issue
Post by: MortenMacFly 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...
Title: Re: Another WinAVR-compile issue
Post by: scarphin 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.