Skip to main content
Visitor II
January 20, 2009
Question

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

  • January 20, 2009
  • 3 replies
  • 742 views
Posted on January 20, 2009 at 06:56

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

    This topic has been closed for replies.

    3 replies

    cyril23Author
    Visitor II
    May 17, 2011
    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 ]

    Visitor II
    May 17, 2011
    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)

    cyril23Author
    Visitor II
    May 17, 2011
    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