I have this really simple "Hello world" piece of software (project attached), running on a STM32WB55 Nucleo board (basically, it sends "HELLO WORLD\n" via USART1, every 1000 ms).
I would be particularly happy if I could manage to run this piece of software from RAM, instead of Flash. This MCU has 196604 bytes of RAM. And my project has a total size of 13332 bytes. So size should not be an issue.
What I'd like to do is: Program starts: load the program in RAM. Afterwards, disable flash, as to increase the overall performance of my program (faster access time) and decrease power consumption.
From what I've read, I should modify the linker script as to create a special section to place the code into and afterwards disable the MCU's flash.
Being the beginner that I am, I have no clue as to where to start.
PS: I'm using CLion (CMake) and GCC.