shadown / python-on-a-chip

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

Fix float endian issue #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Floats work for the desktop, but are byte-reversed on the mbed platform.

Wikipedia says floats have no defined endianness 
(http://en.wikipedia.org/wiki/Endianness#Floating-point_and_endianness).
James says that the ARM EABI defines an endianness.

Make an env var for the build systems, define them as little or big for all 
the platforms and update the Makefile additions in HowToPortPyMite.txt

Original issue reported on code.google.com by dwhall...@gmail.com on 16 Apr 2009 at 7:26

GoogleCodeExporter commented 9 years ago

Original comment by dwhall...@gmail.com on 18 Apr 2009 at 4:10

GoogleCodeExporter commented 9 years ago

Original comment by dwhall...@gmail.com on 18 Apr 2009 at 10:16

GoogleCodeExporter commented 9 years ago
Forcing pmImgCreator.py to format a float as "little endian".  Moving 
src/vm/pmfeatures.h to src/platform/<platform>/pmfeatures.h because vm 
configuration 
is platform specific; changed platform Makefiles and SConscripts to handle new 
location of pmfeatures.h.  

Renamed HEAP_SIZE to PM_HEAP_SIZE and moved it out of build system, into 
pmfeatures.h.  Moved UART_BAUD out of build system, into plat.c.  

Updated docs/src/HowToPortPyMite.txt

Defined PM_FLOAT_BIG_ENDIAN in src/platform/mbed/pmfeatures.h so that its 
floats work 
properly.

Tested Make and SCons builds for each platform.

Removed unused variable in __bi.Co()

Original comment by dwhall...@gmail.com on 18 Apr 2009 at 11:08

GoogleCodeExporter commented 9 years ago
Using the mbed on-line compiler means that neither Makefiles nor SConscripts 
are 
executed to build the VM.  Since there may be other platforms in the future 
that are 
built without Make/Scons, I decided it was important to define a place to put 
platform-
specific VM configurations.  I moved pmfeatures.h to the plat directory since 
it was 
already doing platform-specific VM configurations.

Original comment by dwhall...@gmail.com on 18 Apr 2009 at 11:12

GoogleCodeExporter commented 9 years ago
System tests pass.  Mainlined directly, see r341

Original comment by dwhall...@gmail.com on 19 Apr 2009 at 2:46

GoogleCodeExporter commented 9 years ago
Post mainline check-in.  The patch failed to add files to the repository and 
delete one 
that was marked.  See r342

Original comment by dwhall...@gmail.com on 19 Apr 2009 at 2:54

GoogleCodeExporter commented 9 years ago
Removed PM_HEAP_SIZE build option from docs/src/BuildSystem.txt

Tested via: make ../html/BuildSystem.html
passes

POST CHECK-IN MAINLINE directly, see r345

Original comment by dwhall...@gmail.com on 19 Apr 2009 at 3:15

GoogleCodeExporter commented 9 years ago
Changed r08 to R08

Original comment by dwhall...@gmail.com on 12 Mar 2010 at 8:22

GoogleCodeExporter commented 9 years ago

Original comment by dwhall...@gmail.com on 13 Mar 2010 at 1:30