3 ms·
I prototyped this sort of thing for an 8051 based project I was working on where we had more RAM and external EEPROM space than we really needed, but were regul
by daotoad 9y ago
I prototyped this sort of thing for an 8051 based project I was working on where we had more RAM and external EEPROM space than we really needed, but were regularly having to go back and grovel through the code looking for optimizations to make things fit in code memory.
The important thing to know is that 8051s have separate CODE and RAM address spaces. (Actually the RAM is divided up into multiple flavors too: direct, indirect, external and bit addressable.)
It turned out it wasn't worth the overhead. The interpreter and ancillary bits took up too much space and slowed things to a crawl. It was generally easier to rewrite sections of the code in a way that made the compiler and optimizer happy. By various techniques I managed to reduce the footprint of the system code by at least fourfold after a number of refactorings. The application kept needing new features, so it always barely fit in 16 code address space (some of which was already consumed by the bootloader).