execution of unused memory
You have not mentioned type of the MCU, however I have one idea.
You should use FILL command in the for all unused memory in the prm file.
Example from a CodeWarrior IDE help
RAM_1 = READ_WRITE 0x800 TO 0x8FF
FILL 0xAA 0x55;
DUMMY INTO RAM_1
I suggest you to use filling value 0x3F which is code for assembler SWI instruction.
Then you should create interrupt routine to be able to service SWI.
When SWI then happens you can check stack and read from it an address from which you have jumped to SWI interrupt.
If you want to read stack you will have to use ASM instructions.
Best Regards, Ladislav
As I mentioned before, you should share type of the MCU. The reason is that, for example in the case of S12X MCUs you can use MPU module to check accesses.
Retrieving data ...