Cliff Hacks Things.

Thursday, February 07, 2008

New features for PropellerForth 8.02

I'm fleshing out the feature set for PropellerForth 8.02, due out in a couple weeks. This is just a teaser post describing what I've been working on; no code yet. :-)

The main new features at this time:
  • Block word set for reading/writing block devices and loading source code from storage
  • EEPROM Block backend, for treating the program EEPROM as a block device
  • SPI-mode SD/MMC card Block backend


The SD support is a traditional Forth disk layer: it doesn't implement FAT or any other filesystem. Instead, it lets you directly address blocks on the disk. By default you can use this to save and edit source code directly on the card, but it could also allow an enterprising individual to implement filesystem support.

Because source is stored in raw disk sectors instead of files, getting at it from a "real" computer will require a tool like dd. Since this is an embedded system, that doesn't bother me too much, but I wouldn't complain if someone implemented FAT16! :-)

The actual interface code is a direct port of Tom Rokicki's FSRW SPIN implementation. It's about 1KiB and currently gets about 5-6KiBps at 80MHz, twice the throughput of the SPIN version, despite being a pretty literal port. I hope to optimize it further before release.

Now, to work on a target compiler -- so that users of 8.02 can recompile their whole system from sources stored on EEPROM or SD.

Labels:

6 Comments:

  • Cliff,
    I left a comment in your startup word note, but I'm duplicating it here, since it's more appropriate here?

    I've enjoyed using PropellerForth, and have used it for some lab work w/ JTAG for ARMs, etc.

    I noticed that your generated code for OF is non-standard in that it does not drop the CASE value when it matches, letting it get dropped by the ENDCASE. This makes my code different for things between gforth and PropellferForth.

    What I've done in my Forths is to have OF generate a (OF),offset sequence, like a 0BRANCH. The (OF) code does the compare, and either drops the value or branches. This results in shorter code sequences and handles the semantics.

    BTW, I also generate calls to dummy (BEGIN), (CASE), etc., for debugging and ease in decompilation.

    Thanks for a great implementation!

    HigJJump

    By Blogger HighJump, at 8:03 AM  

  • Nice information, many thanks to the author. It is incomprehensible to me now, but in general, the usefulness and significance is overwhelming. Thanks again and good luck! Web Design Company

    By Blogger Pooja, at 10:06 PM  

  • Thanks you. Very good post.Unless they can offer a really compelling reason for users to come back, it will be the next Bebo, MySpace
    WMUD962P

    By Blogger WMUD962P, at 9:35 AM  

  • The post is pretty interesting. I really never thought I could have a good read by this time until I found out this site. I am grateful for the information given. Thank you for being so generous enough to have shared your knowledge with us.Houston Home Security

    By Blogger Janelyzhang, at 12:05 AM  

  • The post is pretty interesting. I really never thought I could have a good read by this time until I found out this site. I am grateful for the information given. Thank you for being so generous enough to have shared your knowledge with us.
    Houston Home Security

    By Blogger Janelyzhang, at 12:06 AM  

  • Forte School of Music is providing Music Lessons Howick Auckland , New Zealand. Forte School is best in Music , Singing , Guitar and Piano Classes. Contact us now 09 534 2223

    By Blogger steve7876, at 8:53 PM  

Post a Comment

<< Home