Daniel,
>>MY_STK = READ_WRITE 0x0C60 TO 0x105F FILL 0x55;
I had also tried read_write instead of no_init. The result was same.
My total stack size is 0x400. And I only set first 0x3E0 bytes of it.
I don't touch last 32bytes at all. Can this cause any problem?
Code:
void main(void){ __RESET_WATCHDOG(); // initialize stack with 0x55 "U" memset((void*)0x0C60, 0x55, 0x3E0);...
Here is my prm file to fill unused program memory with illegal opcode (0x8D):
Code:
SEGMENTS /* Here all RAM/ROM areas of the device are listed. Used in PLACEMENT below. */ Z_RAM = READ_WRITE 0x0060 TO 0x00FF; // 160 byte RAM = READ_WRITE 0x0100 TO 0x085F; // 1888 byte NO_INIT_RAM_SEG = NO_INIT 0x0860 TO 0x0C5F; // 1024 byte MY_STK = NO_INIT 0x0C60 TO 0x105F; // 1024 byte NV_SAVE_SEG = READ_ONLY 0x1060 TO 0x13FF; // reserve 928 (512) byte for NV ROM1 = READ_ONLY 0x1400 TO 0x17FF FILL 0x8D; ROM = READ_ONLY 0x1870 TO 0xFEAF FILL 0x8D; FLASH_ROUTINE_SEG = READ_ONLY 0xFEB0 TO 0xFFAF FILL 0x8D; ROM2 = READ_ONLY 0xFFC0 TO 0xFFD1 FILL 0x8D;/* INTVECT = READ_ONLY 0xFFD2 TO 0xFFFF; Reserved for Int. Vectors*/END
and it seems working.
Thanks.
BP.