Skip to main content
Associate
February 9, 2025
Solved

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

  • February 9, 2025
  • 2 replies
  • 3205 views

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.

 
 
 

    2 replies

    Tesla DeLorean
    Guru
    February 9, 2025

    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 VenmoUp vote any posts that you find helpful, it shows what's working..
    0refAuthor
    Associate
    February 9, 2025

    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.

     
    Tesla DeLorean
    Guru
    February 9, 2025

    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 VenmoUp vote any posts that you find helpful, it shows what's working..
    mƎALLEm
    Technical Moderator
    February 10, 2025

    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 "Best answer" on the reply which solved your issue or answered your question.