This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libgloss, libnosys ?


rekisum@web.de wrote:
Hi,
I searched the web and this mailing list, but need more infos.
I'm trying to add printf and other functions to my ARM7 (STR7) standalone programm.
I got precompiled newlib libraries coming with the GNUARM toolchain.
Somewhere I read I've got to make my own _read, _write implementation for UART.
Ok, this fails because my compiler says their're already exist in syscalls.o, and got no newlib sources (can download of course, configure under windows?).
Maybe I use the wrong lib?
I got several of them under:
\lib
\lib\thumb ( for thumb mode?)
\lib\interwork ( for mixed thumb / no-thumb mode?)
\lib\fpu ( for (no) floating point hardware ?)
\lib\be ( ? for belgium users ?)
\lib\nofmult ( ? without floating point multiply ?)


Also there are differnet libs named libiberty, libnosys, I read something about libgloss?
I didn't found this information in the libc.pdf, so any help is appreciated.
Regards,
Joerg


Joerg,


If you read the FAQ on http://sources.redhat.com/newlib (no. 5) you will see a brief explanation of multilibs. The subdirectories and libraries you see above are for multilibs that correspond to major compiler options. For example, you don't want to choose a library built Big Endian (be) if the user has specified Little Endian via compiler options.

What you will need to do is to configure newlib with --disable-newlib-supplied-syscalls. This will keep the syscalls from being built into libc. The syscalls will instead be built into libgloss. Libgloss is where bsp libraries are put. You can edit the libgloss/arm directory and create your own library or modify an existing one. At compile/link time you will need to specify your library in addition to libc/libm. You will notice that some board libraries have spec files while others have ld scripts. If you go the ld script route, you just have to specify -Tyourscript.ld on the gcc compile/link call.

  Libnosys is a stub library used to fill in missing syscalls with
stubs.

-- Jeff J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]