cancel
Showing results for 
Search instead for 
Did you mean: 

EMC design: How to set TRAP instruction on all unused flash code?

cyril23
Associate II
Posted on January 20, 2009 at 06:56

EMC design: How to set TRAP instruction on all unused flash code?

3 REPLIES 3
cyril23
Associate II
Posted on May 17, 2011 at 15:02

Dear All,

EMC design How to set TRAP instruction on all unused flash code?

I want to fill unused flash memory with 0x83 (Trap instruction)

How it is possible with:

IDE: STVD 4.10

Compiler Cosmic 4.2.7.

Thanks

[ This message was edited by: cyril.rieu on 19-01-2009 17:28 ]

luca239955_st
Associate III
Posted on May 17, 2011 at 15:02

look for the -f option in the linker section of the manual: I'm not sure if STVD allows to manage this via the graphical interface, but, worst case, you can edit the .lkf file by hand.

Regards,

Luca (Cosmic)

cyril23
Associate II
Posted on May 17, 2011 at 15:02

thanks _luca.

Solution:

it is possible to set this option in

Project->settings->[tab]Linker Category ''input'' at the end of the section name if -m set. and add -f0x83 (filling with trap opcode)

We obtain this line in lkf file

+seg .const -b 0x8f00 -m 0xf100 -n .const -it -f0x83