larsbrinkhoff / lbForth

Self-hosting metacompiled Forth, bootstrapping from a few lines of C; targets Linux, Windows, ARM, RISC-V, 68000, PDP-11, asm.js.
GNU General Public License v3.0
414 stars 113 forks source link

ROM-able forth #79

Closed neuschaefer closed 3 years ago

neuschaefer commented 5 years ago

Hi, I've been trying to port lbForth to the HiFive1 RISC-V board, but then I discovered that lbForth is not ready to have its compiled dictionary in read-only memory (such as SPI flash). For example, variables currently need to be in writable memory, and the stacks are by default placed after the compiled dictionary.

Are there any plans to support running from ROM?

larsbrinkhoff commented 5 years ago

Hello,

I'm sorry, I don't think I saw this issue until right now.

Having a ROM-able Forth is desirable, but I have no plans for it right now. However, lbForth relies quite a bit on having a hosting operating system so it may not be suitable for running on an evaluation board. My Forth cross compiler does put code and data in separate spaces.