mikaelpatel / Arduino-Shell

RPN Postscript/Forth Command Shell for Arduino
19 stars 5 forks source link

Enhance: Allow scripts in PROGMEM and/or EEMEM #6

Closed mikaelpatel closed 8 years ago

dpharris commented 8 years ago

This would seem to be a good extension.

mikaelpatel commented 8 years ago

Some example code in ShellScript. Uses a buffer and copies scripts from PROGMEM to the buffer before calling the shell. The pattern can be used to reduce SRAM for scripts. Only the command line buffer is needed.

mikaelpatel commented 8 years ago

Allowing scripts in program memory is an interesting challenge. One solution is to synthesis a combined address space so that the virtual machine can detect if the script is in random access or program memory. Please see commit https://github.com/mikaelpatel/Arduino-Shell/commit/f6f471b66080d9801be6d946c4cbfae0270ff9b7.

dpharris commented 8 years ago

Nice!