Sign in

username:

password:



Not a member?

Search AT91SAM



Search tips

Subscribe to AT91SAM



Ads

Discussion Groups

Discussion Groups | AT91SAM ARM | AW: AW: AW: Arm Linking Problem

For users of the Atmel AT91SAM7 and AT91SAM9 ARM CPU chips. Atmel has taken a new direction by combining on chip flash and ram with the ARM CPU on a single die. This provides low cost devices for small systems using the ARM CPU. This group is to exchange information to help users get started and learn how to use the devices.

AW: AW: AW: Arm Linking Problem - "ICLI, Bekir (EXT)" - Feb 13 3:07:49 2008

Boot.lib is one of 5 .lib's I am trying to link together.

Right now I am using LFLAGS =3D -nostartfiles -fno-builtin -nostdlib=20
And I am where I have started with arm-elf-ld.=20
The only error is:

..\..\hardware\hardware_arm\lib\hardware.lib: In function `hw_stop_measure'=
:
k_watchdog.c:(.text+0x98c): undefined reference to `__udivsi3'

In this function, the code-line he complains about is:
t_100ns =3D ( diff * 10 ) / 49;

Where t_100ns and diff are "unsigned long"s.=20
Mit freundlichem Gru=DF / Best regards

Bekir ICLI

Siemens AG
Automation and Drives, Automation and Drives, A&D SC IC RD4
Tel. : +49 (721) 595-3280
mailto:b...@siemens.com
http://www.siemens.com/automation

Siemens Aktiengesellschaft: Chairman of the Supervisory Board: Gerhard Crom=
me
Managing Board: Peter Loescher, Chairman, President and Chief Executive Off=
icer;=20
Wolfgang Dehen, Heinrich Hiesinger, Joe Kaeser, Erich R. Reinhardt, Hermann=
Requardt,=20
Siegfried Russwurm, Peter Y. Solmssen
Registered offices: Berlin and Munich;=20
Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB 6684
WEEE-Reg.-No. DE 23691322

-----Urspr=FCngliche Nachricht-----
Von: A...@yahoogroups.com [mailto:A...@yahoogroups.com] Im Auftrag vo=
n 42Bastian
Gesendet: Mittwoch, 13. Februar 2008 08:53
An: A...@yahoogroups.com
Betreff: Re: AW: AW: [AT91SAM] Arm Linking Problem

Hi
> I've tried "-nostartfiles" option, and it reduced the errors from million=
s to 5-6.=20
> But the error is still the same. At the end, when i am trying to link mul=
tiple .lib files to generate the .bin file,=20
> it says there are multiple definitions in 2 of these .lib files. And the =
files that hold the definitions are the same.
>=20=20
> ..\lib_usb\boot.lib: In function `__aeabi_uidiv':
> C:\msys\1.0\home\yagarto\gcc-build\gcc/../../gcc-4.2.2/gcc/config/arm/lib=
1funcs.asm:730: multiple definition of `__udivsi3'

Next option would be -nostdlib. I just wonder, where does boot.lib come=20
from ? Is it really a library ?
--=20
42Bastian

Note: SPAM-only account, direct mail to bs42@...
=20

=20


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


Re: AW: AW: AW: Arm Linking Problem - 42Bastian - Feb 13 3:17:36 2008

Hi

> Right now I am using LFLAGS = -nostartfiles -fno-builtin -nostdlib
> And I am where I have started with arm-elf-ld.

Then I'd say, do not link against boot.lib or add __udivsi3 to your
project (the bootstrap sources from Atmel have it).

--
42Bastian

Note: SPAM-only account, direct mail to bs42@...



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

AW: AW: AW: Arm Linking Problem - "ICLI, Bekir (EXT)" - Feb 13 3:27:56 2008

Ok i got it solved:

Let me explain now how it has gone all the way up here:

I used at first arm-elf-ld. There i had this error:

..\..\hardware\hardware_arm\lib\hardware.lib: In function `hw_stop_measure':
k_watchdog.c:(.text+0x98c): undefined reference to `__udivsi3'

than i used arm-elf-gcc. with "no option!!", and had tons of errors.
finally i used "-nostartfiles -fno-builtin -nostdlib" as linking options, and had the same error that i had with arm-elf-ld
there, the problem was, (i guess), since i used -nostdlib with generating every .lib, he could not find `__udivsi3'.
When i used -nostdlib in one of the libs and not in the other, then it did not complain about anything.

I thought, it might help the future searches..

Thanks to 42Bastian, and everybody..

Mit freundlichem Gruß / Best regards

Bekir ICLI

________________________________

Von: A...@yahoogroups.com [mailto:A...@yahoogroups.com] Im Auftrag von ICLI, Bekir (EXT)
Gesendet: Mittwoch, 13. Februar 2008 09:05
An: A...@yahoogroups.com
Betreff: AW: AW: AW: [AT91SAM] Arm Linking Problem

Boot.lib is one of 5 .lib's I am trying to link together.

Right now I am using LFLAGS = -nostartfiles -fno-builtin -nostdlib
And I am where I have started with arm-elf-ld.
The only error is:

..\..\hardware\hardware_arm\lib\hardware.lib: In function `hw_stop_measure':
k_watchdog.c:(.text+0x98c): undefined reference to `__udivsi3'

In this function, the code-line he complains about is:
t_100ns = ( diff * 10 ) / 49;

Where t_100ns and diff are "unsigned long"s.

Mit freundlichem Gruß / Best regards

Bekir ICLI

Siemens AG
Automation and Drives, Automation and Drives, A&D SC IC RD4
Tel. : +49 (721) 595-3280
mailto:b...@siemens.com
http://www.siemens.com/automation

Siemens Aktiengesellschaft: Chairman of the Supervisory Board: Gerhard Cromme
Managing Board: Peter Loescher, Chairman, President and Chief Executive Officer;
Wolfgang Dehen, Heinrich Hiesinger, Joe Kaeser, Erich R. Reinhardt, Hermann Requardt,
Siegfried Russwurm, Peter Y. Solmssen
Registered offices: Berlin and Munich;
Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB 6684
WEEE-Reg.-No. DE 23691322

-----Ursprüngliche Nachricht-----
Von: A...@yahoogroups.com [mailto:A...@yahoogroups.com ] Im Auftrag von 42Bastian
Gesendet: Mittwoch, 13. Februar 2008 08:53
An: A...@yahoogroups.com
Betreff: Re: AW: AW: [AT91SAM] Arm Linking Problem

Hi
> I've tried "-nostartfiles" option, and it reduced the errors from millions to 5-6.
> But the error is still the same. At the end, when i am trying to link multiple .lib files to generate the .bin file,
> it says there are multiple definitions in 2 of these .lib files. And the files that hold the definitions are the same.
>
> ..\lib_usb\boot.lib: In function `__aeabi_uidiv':
> C:\msys\1.0\home\yagarto\gcc-build\gcc/../../gcc-4.2.2/gcc/config/arm/lib1funcs.asm:730: multiple definition of `__udivsi3'

Next option would be -nostdlib. I just wonder, where does boot.lib come
from ? Is it really a library ?

--
42Bastian

Note: SPAM-only account, direct mail to bs42@...

Yahoo! Groups Links



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

Re: AW: AW: AW: Arm Linking Problem - 42Bastian - Feb 13 7:53:37 2008

Hi
> than i used arm-elf-gcc. with "no option!!", and had tons of errors.
> finally i used "-nostartfiles -fno-builtin -nostdlib" as linking options, and had the same error that i had with arm-elf-ld
> there, the problem was, (i guess), since i used -nostdlib with generating every .lib, he could not find `__udivsi3'.
> When i used -nostdlib in one of the libs and not in the other, then it did not complain about anything.

Ok, it seems you are not building a library, your are building a
relocatable object. Libraries are build with "ar" and are more flexible,
as "ld" just picks what it wants.

--
42Bastian

Note: SPAM-only account, direct mail to bs42@...



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