On 10/22/2012 05:35 PM, Paul_Koning at
Dell.com wrote:
The main barrier to a bare metal binary, or for that matter a not so
bare metal one, is the supporting libraries. I did a *really* crude
hack job on newlib to give me just enough bare metal support that I
could run the GCC test suite under SIMH. But that certainly isn't
enough for real bare metal.
A pdp11 port of newlib would be a nice project.
I tried... But it is too big. I think I got a fatty library because I
selected the floating point support... I tried to use sprintf() and it
didn't even fit into the PDP address space :(.
The printf() family is GIGANTIC. In newlib there are non-FP-enabled
versions of those functions; iprintf(), siprintf(), etc. They are much,
much smaller than their floating-point counterparts. I suggest you try
again with that and see where things land.
I'm using them on ARM7 with great results. Granted that's got a much
larger address space, but my resultant binaries and stack utilization
are still pretty small.
The 2.11BSD lib looks
leaner, and I am using it in my pet OS project (I pick the pieces I need
"on the run", I have not done a complete port... yet).
If the above suggestion doesn't get you anywhere, perhaps avrlibc
could be hacked into a PDP-11 library. All of the hardware support will
have to be ripped out of course, but there are nice tight
implementations of generic library functions in there.
Nice idea. Or the libc from DECUS C?
Hmm yes. Will there be compiler compatibility issues there? (like
with anything done in assembler, asm/C interface etc?)
-Dave
--
Dave McGuire, AK4HZ
New Kensington, PA