I have a question about expanding the program memory of an ATmega328P chip. I have a Winbond NOR flash SOIC8 chip that I managed to interface with the microcontroller over the SPI bus, and now I have about 8 MB of additional storage memory. I was wondering what is the best way to use this memory to store some additional code. I think I read somewhere that this microcontroller is unable to execute the AVR assembly code from a space other than its on progmem, so I can't simply upload some assembly on the SPI flash. Yes, I know that I can replace the atmega328p with another atmega with more flash, but that's not the goal here. I want to use atmega328p and the Winbond SPI flash because I have a bunch of them in storage.
I was thinking that some sort of scripting language may be the solution here. I realize atmega328p isn't very powerful and that interpreted scripting languages may be a bit overkill for it, but maybe with something that I can script on a PC and then compile into bytecode which is then uploaded to the SPI flash, the microcontroller won't have much difficulty working with the bytecode. Are there any such bytecode processors available for AVR? I only need some simple commands like arithmetics, bitwise/logical operations, for loops, variables, conditional sentences (if, else), custom function calls and the like.