External W25Q32 SPI memory flash for ATMega328

Hi
I don't know what your level of hardware knowledge is and if the dataflow below can help you.
In this basic 8-bit AVR family dataflow below you can see how the program is "handled".
See that the program is in the Flash Program Memory, which is addressed by the Program Counter.
How are you going to stop the program from running, load new values
in Flash and reset the program counter?
What you are trying to do with Atmega is the equivalent of a virtual memory, paging flash memory.
Is there a "sketch" or virtual memorial library for Arduino?

RV mineirin

PS: Look if this help: GitHub - Virmak/ArduinoVM: Arduino Virtual Machine