Sign in

username:

password:



Not a member?

Search lpc2000



Search tips

Subscribe to lpc2000



lpc2000 by Keywords

2106 | ADC | ARM7 | Atmel | Bootloader | CAN | CrossStudio | CrossWorks | DDS | ECos | Ethernet | ETM | FIFO | FLASH | FPGA | GCC | GDB | GNU | GNUARM | GPIO | I2C | IAP | IAR | JTAG | Kickstart | LCD | Linux | LPC | LPC-E2294 | LPC2000 | LPC2100 | LPC2104 | Lpc2106 | Lpc210x | LPC2114 | LPC2119 | LPC2124 | LPC2129 | Lpc2138 | LPC213x | LPC21xx | LPC2210 | LPC2212 | LPC2214 | LPC2292 | LPC2294 | LPC2xxx | LPC3128 | MCB2100 | Olimex | Philips | PWM | Rowley | RTC | RTOS | SPI | SSP | UART | UART0 | UART1 | ULINK | USB | Watchdog | Wiggler

Ads

Discussion Groups

Discussion Groups | LPC2000 | Re: Problem building C++ project for LPC23xx

Discussion group dedicated to the Philips LPC2000 family of ARM MCUs

Problem building C++ project for LPC23xx - jsolla00 - Sep 25 15:47:42 2008

Hi there,

I'm trying to build a cpp project for a LPC2368. I'm using devkitARM
toolchain wich is working fine with al my C projects.

The problem comes when linking. The linker gives me the following errors:

/opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/libgcc.a(unwind-arm.o):
In function `get_eit_entry':
(.text+0x75c): undefined reference to `__exidx_start'
/opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/libgcc.a(unwind-arm.o):
In function `get_eit_entry':
(.text+0x760): undefined reference to `__exidx_end'
collect2: ld returned 1 exit status
Reading on some forums (http://en.mikrocontroller.net/topic/138778) i
discovered that there's a section missing on my linker script, but
linker scripts are "rocket science" for me.

Can somebody help me?
Thanks in advance,

Jorge.
------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )


Re: Problem building C++ project for LPC23xx - 42Bastian - Sep 25 16:01:39 2008


jsolla00 wrote:

> Hi there,
>
> I'm trying to build a cpp project for a LPC2368. I'm using devkitARM
> toolchain wich is working fine with al my C projects.
>
> The problem comes when linking. The linker gives me the following errors:
>
> /opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/libgcc.a(unwind-arm.o):
> In function `get_eit_entry':

Do you realy want to use exception handling ?

How do you link ? You should use g++, not gcc and _not_ ld.

BTW: ld will place code into the last section if you do not specify it
explicitly.

Ah, and did you try the CodeSourcery-hint (first when googling to the
undefined symbol):
"...you add the following three lines to your linker script file in
the ROM section.

__exidx_start = .;
.ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) }
__exidx_end = .;
"

--
42Bastian
------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: Problem building C++ project for LPC23xx - "Jorge S." - Sep 25 16:25:00 2008

On Thu, Sep 25, 2008 at 10:01 PM, 42Bastian wrote:
>
> > Hi there,
> >
> > I'm trying to build a cpp project for a LPC2368. I'm using devkitARM
> > toolchain wich is working fine with al my C projects.
> >
> > The problem comes when linking. The linker gives me the following errors:
> >
> > /opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/libgcc.a(unwind-arm.o):
> > In function `get_eit_entry':
>
> Do you realy want to use exception handling ?

No, i don't need / want to use exception handling.

>
> How do you link ? You should use g++, not gcc and _not_ ld.

I'm using a WinARM make file from a sample project. May be this is the
problem the error is this one:

Linking: main.elf
/dkp/bin/arm-eabi-gcc -mcpu=arm7tdmi-s -I. -gdwarf-2 -DROM_RUN
-D__WinARM__ -D__WINARMSUBMDL_LPC2378__ -Os -Wall -Wcast-align
-Wimplicit -Wpointer-arith -Wswitch -ffunction-sections
-fdata-sections -Wredundant-decls -Wreturn-type -Wshadow -Wunused
-Wa,-adhlns=Common/src/Startup.lst -ICommon/inc -Wcast-qual -MD -MP
-MF .dep/main.elf.d Common/src/Startup.o Common/src/swi_handler.o
fio.o uart.o syscalls.o Common/src/timer.o Common/src/target.o
Common/src/irq.o hal/adc.o hal/dac.o main.o --output main.elf
-nostartfiles -Wl,-Map=main.map,--cref,--gc-sections -lc -lm -lc
-lgcc -lstdc++ -TCommon//LPC2378-ROM.ld
/opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/libgcc.a(unwind-arm.o):
In function `get_eit_entry':
(.text+0x75c): undefined reference to `__exidx_start'
/opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/libgcc.a(unwind-arm.o):
In function `get_eit_entry':
(.text+0x760): undefined reference to `__exidx_end'
collect2: ld returned 1 exit status

It shows GCC compiling, so it looks like this is my problem isn't it?

>
> BTW: ld will place code into the last section if you do not specify it
> explicitly.
>
> Ah, and did you try the CodeSourcery-hint (first when googling to the
> undefined symbol):
> "...you add the following three lines to your linker script file in
> the ROM section.
>
> __exidx_start = .;
> .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) }
> __exidx_end = .;

I did it but i get a "section overlap" error.
Thanks for your help.

------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: Problem building C++ project for LPC23xx - "Jorge S." - Sep 25 16:29:12 2008

42Bastian:

It works! You gave me the idea....

I forgot to uncomment a line on the Makefile:

CPPFLAGS = -fno-rtti -fno-exceptions

Now it links without any problem. I'm going to test it tomorrow on the uC.

Thank you!!!

On Thu, Sep 25, 2008 at 10:24 PM, Jorge S. wrote:
> On Thu, Sep 25, 2008 at 10:01 PM, 42Bastian wrote:
>>
>> > Hi there,
>> >
>> > I'm trying to build a cpp project for a LPC2368. I'm using devkitARM
>> > toolchain wich is working fine with al my C projects.
>> >
>> > The problem comes when linking. The linker gives me the following errors:
>> >
>> > /opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/libgcc.a(unwind-arm.o):
>> > In function `get_eit_entry':
>>
>> Do you realy want to use exception handling ?
>
> No, i don't need / want to use exception handling.
>
>>
>> How do you link ? You should use g++, not gcc and _not_ ld.
>
> I'm using a WinARM make file from a sample project. May be this is the
> problem the error is this one:
>
> Linking: main.elf
> /dkp/bin/arm-eabi-gcc -mcpu=arm7tdmi-s -I. -gdwarf-2 -DROM_RUN
> -D__WinARM__ -D__WINARMSUBMDL_LPC2378__ -Os -Wall -Wcast-align
> -Wimplicit -Wpointer-arith -Wswitch -ffunction-sections
> -fdata-sections -Wredundant-decls -Wreturn-type -Wshadow -Wunused
> -Wa,-adhlns=Common/src/Startup.lst -ICommon/inc -Wcast-qual -MD -MP
> -MF .dep/main.elf.d Common/src/Startup.o Common/src/swi_handler.o
> fio.o uart.o syscalls.o Common/src/timer.o Common/src/target.o
> Common/src/irq.o hal/adc.o hal/dac.o main.o --output main.elf
> -nostartfiles -Wl,-Map=main.map,--cref,--gc-sections -lc -lm -lc
> -lgcc -lstdc++ -TCommon//LPC2378-ROM.ld
> /opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/libgcc.a(unwind-arm.o):
> In function `get_eit_entry':
> (.text+0x75c): undefined reference to `__exidx_start'
> /opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/libgcc.a(unwind-arm.o):
> In function `get_eit_entry':
> (.text+0x760): undefined reference to `__exidx_end'
> collect2: ld returned 1 exit status
>
> It shows GCC compiling, so it looks like this is my problem isn't it?
>
>>
>> BTW: ld will place code into the last section if you do not specify it
>> explicitly.
>>
>> Ah, and did you try the CodeSourcery-hint (first when googling to the
>> undefined symbol):
>> "...you add the following three lines to your linker script file in
>> the ROM section.
>>
>> __exidx_start = .;
>> .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) }
>> __exidx_end = .;
>
> I did it but i get a "section overlap" error.
> Thanks for your help.
>

------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )