Extending program flash memory

Thread Starter

Electrodood

Joined Aug 31, 2023
23
I am using an STM8S003F3P6, it has 8kb of programmable memory. I have made a small console like device with it and for now I have coded the PONG game for it. I plan on making more games for it and keep it flexible that even new games can be added after its development.
I have been able to interface with an SPI flash and the Micro's library allows me to write directly to the flash part of the internal memory. So even though this micro cant execute commands from external memory, can I just make the "Game" part of the code in the flash memory be replaced by another "Game"'s code in the SPI flash?

TL;DR Can I rotate different sections of code from the external SPI flash to the internal program flash and use this as a way to extend my program memory.
 
Top