adapting newlib for a certain target board (memory, STDOUT, ...)?

Torsten Mohr tmohr@s.netic.de
Fri Apr 28 08:28:00 GMT 2006


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.



More information about the Newlib mailing list