sprhawk / python-on-a-chip

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

Port to the Econotag #86

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Port p14p to the Freescale MC1322x processor, specifically the econotag 
hardware from Redwire LLC.

Original issue reported on code.google.com by dwhall...@gmail.com on 17 Apr 2010 at 10:32

GoogleCodeExporter commented 9 years ago
Branch created, see r480

Original comment by dwhall...@gmail.com on 6 May 2010 at 7:04

GoogleCodeExporter commented 9 years ago
r483
Skeleton files added and Makefile created.  The Makefile is able to "make once" 
to get 
the libmc1322x git repo and set the toolchain prefix (arm-none-eabi-).  The 
Makefile 
also builds libmc1322x.a as well as libpmvm-econotag.a.  However, the 
arm-none-eabi-ld 
gives an error when trying to link main.elf; so everything but the final step 
is 
working!  plat.c has stubs and still needs to be implemented.

Original comment by dwhall...@gmail.com on 15 May 2010 at 9:49

GoogleCodeExporter commented 9 years ago
r484
Updated econotag/Makefile so that link stage is divested of values from 
libmc1322x/Makefile.include.  This allows the build to complete and a main.elf 
is 
generated.  However, the .elf is incomplete and the .bin made from .elf is 0 
bytes.

Original comment by dwhall...@gmail.com on 16 May 2010 at 8:10

GoogleCodeExporter commented 9 years ago
r485
Updated econotag/Makefile: added libmc1322x/src/src.a to the build as libsrc.a. 
 No 
effect on the output main.elf or main.bin.

Original comment by dwhall...@gmail.com on 17 May 2010 at 3:31

GoogleCodeExporter commented 9 years ago
r486
Added syscalls.c and removed --gc-sections from Makefile

Original comment by dwhall...@gmail.com on 19 May 2010 at 6:10

GoogleCodeExporter commented 9 years ago
r487
plat.c stubs functions filled in; untested.
Created patch to get rid of types.h in libmc1322x build (which conflicts with 
<stdint.h>.  Patch is applied during "make once".

Original comment by dwhall...@gmail.com on 19 May 2010 at 9:51

GoogleCodeExporter commented 9 years ago
r488
Added red-bsl.py tool to load bin to device.  Updated pmfeatures and created 
patch to 
update pmImgCreator so HAVE_* values agree.  Updated _write_r() in syscalls.c 
so 
printf() works.

Original comment by dwhall...@gmail.com on 20 May 2010 at 10:48

GoogleCodeExporter commented 9 years ago
r489
Touch-ups to the Makefile (had an error when libmc1322x tried to build twice), 
README 
(more complete instructions) and pmfeatures.h (float accidentally enabled here, 
will 
rollback)

Original comment by dwhall...@gmail.com on 24 May 2010 at 8:37

GoogleCodeExporter commented 9 years ago
r490
Floats disabled in pmfeatures.h (rollback from mistake in r489)

Original comment by dwhall...@gmail.com on 24 May 2010 at 8:37

GoogleCodeExporter commented 9 years ago
r491
Added Timer0 implementation to plat.c so sys.time() works and threads should 
work.  
Function calls were added in plat_init() to try to make RF (MACA) work, but 
they caused 
trouble and were commented out.  The VM would not respond to ipm when those 
calls were 
enabled.  Also reduced the heap to 0x4000 (16KB) for the time being.  Makefile 
modified 
to add include/link paths to more libmc1322x files, checkout a specific 
revision of 
libmc1322x and make clean doesn't clean libmc1322x

Original comment by dwhall...@gmail.com on 26 May 2010 at 10:35

GoogleCodeExporter commented 9 years ago
r492
Updated red-bsl.py and got approval from the author (Andrew Pullin)(pullin at 
berkeley dot edu) to include it in this project, although he didn't provide 
copyright/licensing info yet.  Changed Makefile so that start-romvars.o is used 
and 
TARGET_ROM_VARS=1 so that maca_init() and set_power() work properly.

Changes were also made to the libmc1322x sources and those have yet to be 
committed.  
So a fresh checkout of this rev will not build.  Here's the diff that is needed:

diff --git a/src/start.S b/src/start.S
index f89ae0f..d60c902 100644
--- a/src/start.S
+++ b/src/start.S
@@ -121,7 +121,9 @@ _begin:
       ldr     sp, =__sys_stack_top__  /* set the SYS stack pointer
    */

#ifdef USE_ROM_VARS    
-       bl _rom_data_init+.-base
+       ldr r12,=_rom_data_init
+       mov lr,pc
+       bx  r12
#endif 
       msr     CPSR_c, #(SYS_MODE)

Original comment by dwhall...@gmail.com on 2 Jun 2010 at 11:41

GoogleCodeExporter commented 9 years ago
r494
Created econotag.py with function stubs.
Updated git checkout to bring in libmc1322x's fix to start.S

Original comment by dwhall...@gmail.com on 7 Jun 2010 at 9:36

GoogleCodeExporter commented 9 years ago
r505
Merged trunk changes (mostly Issue #89 -- bytearrays) and also updated 
econotag/pmfeatures.h to have HAVE_BYTEARRAY).

Original comment by dwhall...@gmail.com on 24 Jun 2010 at 4:34

GoogleCodeExporter commented 9 years ago
r515
Filled out native functions, but haven't tested.
Have to check in so I can checkout on 2nd test system for tx/rx tests.

Original comment by dwhall...@gmail.com on 9 Jul 2010 at 6:54

GoogleCodeExporter commented 9 years ago

Original comment by dwhall...@gmail.com on 12 Aug 2010 at 2:39

GoogleCodeExporter commented 9 years ago
r572
- Merged trunk into this branch (Merging r505 through r571 into '.')

Original comment by dwhall...@gmail.com on 12 Aug 2010 at 4:00

GoogleCodeExporter commented 9 years ago
r576
- TEMP: set pmImgCreator.py to match Econotag settings
- TEMP: enabled class bytearray in __bi.py
- Created new global "bytearray" string so class can be found in builtins.
- Changed bytearray_print to use the new global "bytearray" string.
- In econotag/pmfeatures.h, enabled HAVE_STRING_FORMAT
- In econotag.py, added gpio_pad_dir(), gpio_data(), fixed rx_packet()
- Removed unnecessary line from econotag's Makefile

Original comment by dwhall...@gmail.com on 18 Aug 2010 at 3:51

GoogleCodeExporter commented 9 years ago
r577
- Added random() func to econotag module.  It uses MACA_RANDOM which is seeded 
in plat_init().
- Fixed rx_packet() to it uses the offset properly.  The first byte, which is 
the packet's length, is NOT copied to the Python bytearray.  At the Python 
level, the length is obtained via len() on the bytearray holding the received 
packet.

Original comment by dwhall...@gmail.com on 22 Aug 2010 at 12:47

GoogleCodeExporter commented 9 years ago
r578
- Revert TEMP pmImgCreator.py  These changes need to be in the patch.
- Revert TEMP __bi.py  A patch needs to make these changes.

Original comment by dwhall...@gmail.com on 23 Aug 2010 at 4:12

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
r579
- Updated patch files, 
- New patch file for __bi.py to uncomment the bytearray class
- Makefile mod to apply new patch
- New tool src/platform/econotag/rftestrx2pcap.py
- econotag.py: touchups and new APIs: gpio_data_get_hi(), gpio_data_get_lo()
- Makefile mod to use latest git head position

Original comment by dwhall...@gmail.com on 23 Aug 2010 at 4:29

GoogleCodeExporter commented 9 years ago
r580
- Added func gpio_func_sel(gpio, mode) to econotag.py per Mar's recommendation

Original comment by dwhall...@gmail.com on 23 Aug 2010 at 5:28

GoogleCodeExporter commented 9 years ago
r581
- Merged trunk to branch: Merging r572 through r580 into '.'

r582
- Rolled back to accidental check-ins:

Jrrr:branch.86 dwhall$ svn merge -r 581:580 src/lib/__bi.py 
--- Reverse-merging r581 into 'src/lib/__bi.py':
U    src/lib/__bi.py
Jrrr:branch.86 dwhall$ svn merge -r 581:580 src/tools/pmImgCreator.py
--- Reverse-merging r581 into 'src/tools/pmImgCreator.py':
U    src/tools/pmImgCreator.py

Original comment by dwhall...@gmail.com on 23 Aug 2010 at 2:28

GoogleCodeExporter commented 9 years ago
r583
- Final touch-ups before mainline:
- econotag/red-bsl.py: Gave credit to Andrew Pullin, tabs-to-spaces
- econotag/plat.c: put #defines near top of file.  Removed aligned-equals to 
meet coding convetions.
- econotag/SConscript removed because it doesn't work
- econotag/README: added URL for git.
- econotag/syscalls.c: removed my initials

Original comment by dwhall...@gmail.com on 23 Aug 2010 at 4:47

GoogleCodeExporter commented 9 years ago
r584
- Merging branch to trunk failed, switching to manual mode.
- src/platform/econotag files added
- src/vm/global.c global.h and bytearray.c modified to use new global 
PM_BYTEARRAY_STR

Original comment by dwhall...@gmail.com on 24 Aug 2010 at 7:45