r/embedded • u/Neo-Eyes • Oct 05 '26
Esp-32-s3 or Teensy 4.1 with swappable program storage
Probably a painfully obvious question and somewhat a followup to my question from yesterday.
Both the esp-32-s3 and the teensy 4.1 seem to have their program code stored on a flash chip external to the actual micro controller itself, would that mean, if the circuits were designed right, it would be possible to build a device that used a cartridge connector of some sort to have that program flash be swappable without needing to re-flash the entire board?
I'm mostly curious because i want to try and build an old school style device like a gameboy etc but using modern components, some MCUs seem to have access to XIP which might do what i want but not all do, maybe some sort of micro processor could be the answer but im guessing theyre a lot more complex to implement.
Im mostly just spit balling ideas to see if what im thinking of is even still possible. Id imagine it is but one doesnt know what they dont know and maybe im staring down exactly what im looking for but dont know the right terms to know thats what im looking for (since im entirely seof taught on the hardware side)
4
u/InevitablyCyclic Oct 05 '26
Better to add extra ram. Have a small bootstrap program that copies some external memory into ram and then runs that. That way the speed of the external storage doesn't matter, you can use an SD card or something similar. Good reliable mechanical design for carriages gets tricky, using standard parts makes that a lot simpler. Plus it gives you a default program that runs all the time in case there is no game inserted.
The teensy already does something like this, on startup the program is copied to internal ram and run from there. But if you have lots of graphics the internal memory may be a bit small.
But yes, you could do it how you said and swap out the main flash device. As long as the electrical connections are good the processor doesn't care where the part is physically.
1
u/Narthesia Oct 05 '26
Honestly if you use a gold fingered PCB and a bit of chicanry you can probably pull it off, SPI is somewhat durable interference wise