From: Paul Stoffregen <paul@pj...> - 2004-12-22 12:45:47
I'm about to check in lots of new floating point library code for
mcs51.... unless I hear objections or concerns. If I should hold off,
please let me know.
This new code is much smaller, a lot faster, and uses minimal RAM
compared to the existing float library. It makes floating point
calculations viable with small memory model. The downside is that it's
not reentrant. But the existing code, when compiled reentrant, uses so
much stack space that it's really not useful with the 8051's tiny
I've added float support to printf_fast. The "%f" float support adds
about 500 bytes of code and 5 bytes of RAM. I also included an
alternate, less accurate version that adds only 300 bytes and no extra
RAM. There are #defines to select which to include, or not include
float support at all. There also a new #define to use a smaller/slower
integer conversion. I'm leaning toward making the "default" printf_fast
have all the nice features (about 1.7k code, 7 bytes RAM), and anyone
who wants tiny code size can recompile to turn stuff off. Without
floats, longs, field width or fast integer, the printf_fast code size is
If anyone knows a reason I should wait, please contact me soon. Here's
the work in progress....
From: Paul Stoffregen <paul@pj...> - 2004-12-27 00:13:43
Added printf_tiny for mcs51. Also added float support and other options
to printf_fast, but not enabled by default.
Added 6 files to the library, which are shared functions used by the new
All the main float functions will be reentrant, so --float-reent must be
used. I'm considering changing the default for mcs51 to turn on
Get latest updates about Open Source Projects, Conferences and News.