Skip to contentSkip to conversation

Linking U-boot with Newlib

U-Boot-Users nico 3 participants 5 messages Mar 11, 2006 – Mar 13, 2006

lore
Share & tools
lore

nico

author
#0 lore raw

Hi all,
Ive been trying to link U-boot 1.1.4 with the Newlib C library instead of the buildin fonctions for IOs and... Im running desperately into troubles, I tried to avoid multiple definitions but it is still not resolving all the symbols...

Did anyone try that ?
Is there options in the build process for doing so ?

Thanks,
nicolas

#1 lore raw
Quoted 2 lines · In message <[email protected]> you…

I`ve been trying to link U-boot 1.1.4 with the Newlib C library

May I ask why you would want to do this?

Quoted 3 lines

instead of the buildin fonctions for IOs and... I`m running desperately into troubles, I tried to avoid multiple definitions but it is still not resolving all the symbols...

That is only to be expected. This code is very low-level and not at all the same as a user space library.

Quoted 1 line

Is there options in the build process for doing so ?

No, and I don't see any need for it. Maybe you can explain which problem you're trying to solve.

Best regards,

Wolfgang Denk

Signature · 3 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I have often regretted my speech, never my silence.
author
#2 lore raw

For sure this code is very low level, but I want to use some special IO features that Arm provided in a version of Newlib. Those special features are mainly used for Semihosting, or platform emulation when you emulate an Arm based hardware using the standard IO of the host to communicate.

I managed to implement some of the serial_getc, puts and so on in the board specific files but it`s not the same level of interoperability as with library linked software...

Quoted 27 lines · Wolfgang Denk
Quoted 2 lines · In message <[email protected]> you…

I`ve been trying to link U-boot 1.1.4 with the Newlib C library

May I ask why you would want to do this?

Quoted 3 lines

instead of the buildin fonctions for IOs and... I`m running desperately into troubles, I tried to avoid multiple definitions but it is still not resolving all the symbols...

That is only to be expected. This code is very low-level and not at all the same as a user space library.

Quoted 1 line

Is there options in the build process for doing so ?

No, and I don't see any need for it. Maybe you can explain which problem you're trying to solve.

Best regards,

Wolfgang Denk

--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de I have often regretted my speech, never my silence.

#3 lore raw

u-boot-users-admin at lists.sourceforge.net wrote on 11-03-2006 11:56:51:

Quoted 5 lines

For sure this code is very low level, but I want to use some special IO features that Arm provided in a version of Newlib. Those special features are mainly used for Semihosting, or platform emulation when you emulate an Arm based hardware using the standard IO of the host to communicate.

For semihosting it is not necessary to include support in u-boot. The rvdebug application does that automatically regardless of the binary being aware of it or not. You need to alter the CPU/connection definition. It has an boolean called Semihosting, toggle this to True and all your output will appear in RVDS application.

Kind greetings,

Jean-Paul Saman

Philips Semiconductors CTO/RTG
Philips HighTech Campus, building WDA 3.29
Professor van den Holstlaan 4
5655 AA Eindhoven
tel: +31 (0)40 27 45131

author
#4 lore raw

ok... thanks for your answer.
I don't have RVDEBUG yet, but having a look at the parameters if the cpu core in Maxsim, there is 2 options relevant to Semihosting:
- enable Semihosting
- Use RealView Semihosting i/o

You're speaking about the second one, right ?
Since I don't have an RVDS licence yet, I'm using the standard console emulation of Maxsim...

How does it work, by the way? if there's no support for the semihosting SWI in your code ? Do you know if there is a documentation about that issue ?

Best regards,
nicolas

Quoted 23 lines · Jean-Paul Saman

u-boot-users-admin at lists.sourceforge.net wrote on 11-03-2006 11:56:51:

Quoted 5 lines

For sure this code is very low level, but I want to use some special IO features that Arm provided in a version of Newlib. Those special features are mainly used for Semihosting, or platform emulation when you emulate an Arm based hardware using the standard IO of the host to communicate.

For semihosting it is not necessary to include support in u-boot. The rvdebug application does that automatically regardless of the binary being aware of it or not. You need to alter the CPU/connection definition. It has an boolean called Semihosting, toggle this to True and all your output will appear in RVDS application.

Kind greetings,

Jean-Paul Saman

Philips Semiconductors CTO/RTG
Philips HighTech Campus, building WDA 3.29
Professor van den Holstlaan 4
5655 AA Eindhoven
tel: +31 (0)40 27 45131