cfbraun / python-on-a-chip

Automatically exported from code.google.com/p/python-on-a-chip
Other
0 stars 0 forks source link

Implement [sn]printf in a sli-like file to avoid using external libc #212

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
On 2011/08/12 on the maillist, dinau posted code and suggested using it to safe 
flash by not pulling in newlib for a stm32.  The code is an open-license lib 
for print routines written by Atmel.  dinau modified it to work for 32-bit 
platforms.

Original issue reported on code.google.com by dwhall...@gmail.com on 14 Aug 2011 at 12:25

Attachments:

GoogleCodeExporter commented 9 years ago
Issue 228 has been merged into this issue.

Original comment by dwhall...@gmail.com on 20 Feb 2012 at 5:22

GoogleCodeExporter commented 9 years ago
Backported changes from v10 branch that implement sli_ltoa10() and use it in 
heap.c, int.c and obj.c.
This eliminates all uses of snprintf() that are easy to get rid of.  The 
remaining ones are for floats and obj_repr() and string_format().

Original comment by dwhall...@gmail.com on 22 Mar 2012 at 4:38

GoogleCodeExporter commented 9 years ago
Changes mentioned above: r671c3700c482
Issue is not resolved, snprintf() still exists in strobj.c, obj.c and float.c

Original comment by dwhall...@gmail.com on 22 Mar 2012 at 4:42

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 57b0e880c022.

Original comment by dwhall...@gmail.com on 1 Apr 2012 at 8:37

GoogleCodeExporter commented 9 years ago
Primary actions:
- Created HAVE_SNPRINTF_FORMAT to allow platforms to include snprintf() for 
advanced formatting
- Refactored hex-printing from int into sli
- Created sli_ftoa() to format single precision floats, used it in 
float_print() and str_format().
- Removed all #include <stdio.h> and wrapped one in #ifdef HAVE_SNPRINTF_FORMAT 
in pm.h

Side effects: 
- Added hex() to builtins (commented out)
- Fixed system tests to use desktop64 as default (like main build)
? Adjusted some system tests that need more heap on desktop64
- Adjusted system test t205 to skip tests that need snprintf formatting
- Protected some pointers in pm_run() using temporary root

Original comment by dwhall...@gmail.com on 1 Apr 2012 at 8:43

GoogleCodeExporter commented 9 years ago
This issue was closed by revision d47b0e61b73a.

Original comment by dwhall...@gmail.com on 1 Apr 2012 at 10:10

GoogleCodeExporter commented 9 years ago
(this second push was for the v10 branch)

Original comment by dwhall...@gmail.com on 1 Apr 2012 at 10:11