I am a new Teensy user, and am in the process of porting my Forth implementation (BoardForth) to the Teensy 4.x, and have one area that I need help with. I need a way to persist data to the Teensy at run-time.
If you are familiar with Forth, you probably know that older Forth systems have a approach that uses "blocks" as the persistent storage mechanism. BoardForth has something similar.
BoardForth uses (and only ever will use) a small fraction of the program data space, so there is more than enough flash there for my needs. I would like to, if possible, use some of that unused flash space for a simple filesystem-like area that I can read from and write to at runtime. Even 64k would be way more than I need.
I am sure this is not a new idea, or request, and has been talked about before on the forum, and there is probably already something out there I can use. The thread I found on the topic has hundreds of replies, and it very difficult to wade though all the replies to find what I'm looking for.
In my implementation of BoardForth for the PC, I use fopen(), fclose() ... , where the filename is "block-<nnn>.blk". Something similar on the Teensy would be awesome, but not required . I'll learn how to use whatever is currently available.
FWIW, read/write speed is not a concern at all, as this would be used simply to be able to persist my interactively defined Forth words to the board and read them back them in when the board starts up.
Thanks for your consideration, Chris
If you are familiar with Forth, you probably know that older Forth systems have a approach that uses "blocks" as the persistent storage mechanism. BoardForth has something similar.
BoardForth uses (and only ever will use) a small fraction of the program data space, so there is more than enough flash there for my needs. I would like to, if possible, use some of that unused flash space for a simple filesystem-like area that I can read from and write to at runtime. Even 64k would be way more than I need.
I am sure this is not a new idea, or request, and has been talked about before on the forum, and there is probably already something out there I can use. The thread I found on the topic has hundreds of replies, and it very difficult to wade though all the replies to find what I'm looking for.
In my implementation of BoardForth for the PC, I use fopen(), fclose() ... , where the filename is "block-<nnn>.blk". Something similar on the Teensy would be awesome, but not required . I'll learn how to use whatever is currently available.
FWIW, read/write speed is not a concern at all, as this would be used simply to be able to persist my interactively defined Forth words to the board and read them back them in when the board starts up.
Thanks for your consideration, Chris