AnsweredAssumed Answered

Instruction Trap 0x83

Question asked by ramirez.jaime on May 3, 2013
Latest reply on May 13, 2013 by luca

Hi.

I have a program in STM8L152R8, my firmware has a size of 0xEFE1.

I want to prevent that for any reason my microcontroller work bad. So, I want to fill  the rest of the hex file (0x901E) with 0x83 (interrup trap).

in my programm I have the next code (main.c):

void vFill_Trap(void)
{
  #asm
     switch .text

     dcb.b 36894, $83    ; allocate trap bytes
                                       ; all initialized to $83

     #endasm
}

I need the main.c file be the last to compile.

How I can do this?

I use the STVD and Cosmic.

Thanks.

Outcomes