Spent more then a 2 weeks researching same topic.
Im using stm32f103c8 'blue pills' mostly, as a HID devices. Even with bloaty HAL libraries i have 45k FLASH and 15k of RAM free, and CPU is never used like at all.
Need to add complex logic on top of my apps. And make it work in hostile environment - user is stupid and can hang device or try to steal my IP with hacking.
So cant run another pure binary, need VM with execution time limits and all OPs arguments check.
User must have access to scripting, thru lightweight config utility. So no GCC! or complete Java compiler.
*
FORTH. Not my kind of syntax(sarcasm).
Good stuf.
If u have like 60k+ FLASH space go for
MicroPython, best choice today IMO. Very good code, not fastest one, but we dont need speed anyway. Can run bytecode from FLASH.
If u for new stuff -
BERRY, flash footprint with all modules off is 39k! very cool and clean syntax. Cant run bytecode from flash, yet.
https://github.com/Skiars/berry/tree/master/examplesLast thing worth mentioning -
PAWN. Very small and blazing fast VM, 15k flash size!. Very good documentation, on language itself and implementation.
Very bugy compiler(it ether corrupt stack and crush, or go infinite loop). Syntax is poor, but FFI is ok. All static, all compile time. No variable arrays, or dictionaries, or classes and rest of those new nonsense.
But static is good, no memory juggling = no fragmentation.
(im going with that one)
picoC. very slow, so sloooooow. Too slow.
mJS very nice javascript VM, but a litle too big for me.
LUA/eLUA have again strange syntax for my taste, i like classes and structs. and RAM usage is a bit too high for f103c8.(start form 10k).
some more reading attached