I have just created a bare-metal program with the bfin-elf toolchain and when I compile it I get the following warnings:
/public/gnu/2011R1-RC1/bfin-elf/bin/../lib/gcc/bfin-elf/4.3.5/../../../../bfin-elf/lib/libc.a(lib_a-closer.o): In function `_close_r':
Why are these occuring and how do I make them work?
By default, the bfin-elf toolchain uses the Newlib standard C library. The Blackfin port of this doesn't currently include native host support and will warn you whenever you try to use any stdio functionality.
It is left to the developer to implement their own low level stubs that work with the type of I/O they want to re-direct over.
More information on newlib and an example of stdio redirect over serial is available at the following link:
technically, the warning is coming from libgloss as that is where the stubs library lives. the warning appears to come from newlib because of the way the GNU linker handles the warning section -- the call site to the unimplemented function is included in the output so the user can fix the call site if they aren't supposed to be using the func.
it is up to the end developer to implement the low level I/O funcs provided by libgloss which newlib expects.