cancel
Showing results for 
Search instead for 
Did you mean: 

STM8S - Is it possible to execute program code from an external flash?

0ref
Associate

Hi,

I have an STM8S103F3P6 based development board & I wanted to know if it would be possible to execute program code from an external flash memory?

Regards,

Aditya.

 
 
 
1 ACCEPTED SOLUTION
6 REPLIES 6

Have you considered different architectures and approaches? Something appropriate to the problem you're attempting to solve..

You can bolt a QSPI flash to these devices and process something in an interpretive / p-code fashion.

External memory buses tend to eat pins, add complication, and are slower than more tightly coupled memories.

It's 2025, perhaps consider some of the small 32-bit ARM devices. You can find devices smaller than the SOIC20 with hundreds of KB of FLASH internally.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

I might consider something a 32-bit device, I was just wondering if this was an possibility. The p-code idea is nice but not what I'm looking for.

 

I don't recollect there being an external bus interface, perhaps look at the possibility of pulling code sections into RAM, and if you can execute it from there. Apt to be rather limiting

 

Most of the recent STM32 have QSPI interfaces, and can map up to 256MB of NOR Flash to within the Cortex's 4GB address space, and execute-in-place

Perhaps also look at the RPI Pico implementation, large external NOR Flash, and dual core CM0+

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
SofLit
ST Employee

Hello @0ref and welcome to the community,

That's not possible as there is no external memory bus available on the product and connecting a memory on SPI won't be see as a memory mapped mode.

You would consider a STM32 product which has either FSMC/FMC interface or QSPI/OCTOSPI/XSPI interface.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
PS:
1 - This is NOT an online support (https://ols.st.com) but a collaborative space.
2 - Please be polite in your reply. Otherwise, it will be reported as inappropriate and you will be permanently blacklisted from my help.

While @SofLit Clearly Answered That This Is Not Possible, I'm Accepting Your Answer Because It's The Closest To What I'm Looking For. Thank You All For Taking Your Time.

This Community Is A Very Great Place.