This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
adapting newlib for a certain target board (memory, STDOUT, ...)?
- From: Torsten Mohr <tmohr at s dot netic dot de>
- To: newlib at sourceware dot org
- Date: Thu, 27 Apr 2006 20:01:02 +0200
- Subject: adapting newlib for a certain target board (memory, STDOUT, ...)?
Hi,
i just configured and compiled a toolchain for an embedded target,
a V850E in detail.
I want to write some programs for that target, but i don't know
how to tell newlib what the memory layout is.
When linking i give some options like:
$(F_ELF) $(F_MAP) : $(OBJ)
$(CC) -o $(F_ELF) \
-Wl,-Map=$(F_MAP) \
-Wl,--section-start=.vectors=0x000000 \
-Wl,--section-start=.text=0x000640 \
-Wl,--section-start=.data=0x03ffe000 \
-Wl,--section-start=.stack=0x03fffc00 \
$(OBJ)
But i don't know how to tell where the memory ends.
malloc() is based on sbrk(), right? sbrk() seems to
start at "_end". How can i tell it how much memory
there is?
Another question, i'd like to use printf() and relatives.
How do i tell newlib where to dump the characters that are meant
for STDOUT?
And what about STDIN and STDERR?
Is there already some description on how to handle this available?
Best regards,
Torsten.