I'm not aware of any decent Open Source Forth for ATSAM because the flash controller only supports 256-bytes-at-once writes.
This is not true. It has to erase 256-byte row at once, but it can program any number of bytes. This is the same as with any other flash-based MCU.
There is a limit that only 8 writes can happen into a row before erase is necessary, but this can mostly be skipped for debugging. I don't know why Forth needs to write things into Flash, but hopefully it does not do that after application development is done.
"This is not true. It has to erase 256-byte row at once, but it can program any number of bytes."
Thank you for the feedback Ataradov, I'll pass that along to the Mecrisp-Stellaris Forth author. Does this apply to all SAM versions and would you mind giving a Assembly example of a 2 byte write if you have the time ?
"I don't know why Forth needs to write things into Flash"
Mecrisp-Stellaris Forth compiles to Ram or to Flash as the programmer decides.
My workflow is to develop in Ram until I'm satisfied with the function I'm creating, then I'll 'compiletoflash' so that after a MCU reset I don't have to reload everything again. If a function I'm developing in Ram needs modification I just reset the MCU and upload again ... and again until it's right, then I put it in Flash.
This technique is very fast as the serial source uploads at 460800 Baud and uses hardware handshaking. Everything is orchestrated from my VIM editor make button.
There really is no such thing as a generic "Forth" because in embedded they are all different, even Mecrisp-Stellaris varies between different MCU's of the same manufacturer depending on hardware capabilities, particularly Flash.
The premier Open Source Forth for PIC (in my opinion), FlashForth can only compile to Ram for instance.
"hopefully it does not do that after application development is done: ?
It certainly can, that's up to the developer. Perhaps they may require data be saved in the Flash for some reason. Mecrisp-Stellaris can easily check the remaining Flash to see if there is adequate room before performing such a write to Flash. It does this normally anyway when the developer "compilestoflash".