AnsweredAssumed Answered

MPC5744P IVOR1 exception when accessing16 bits of DMEM

Question asked by Ilya Kogan on Nov 27, 2018
Latest reply on Nov 30, 2018 by David Tosenovjan

With stack in the local memory there is an exception when accessing 16-bit local variables:

 

j is a 16-bit variable.

r31 = 0x50800748

 

 93 int argc=0;
40007fa0: se_li r7,0
40007fa2: se_stw r7,44(r31)
ee_u16 j=0;
40007fa4: se_li r7,0


40007fa6: se_sth r7,10(r31)


e_u16 num_algorithms=0;
40007fa8: se_li r7,0
40007faa: se_sth r7,12(r31)
ee_s16 known_id=-1;
40007fac: se_bmaski r7,0
40007fae: se_sth r7,14(r31)
ee_s16 total_errors=0;
40007fb0: se_li r7,0
40007fb2: se_sth r7,16(r31)
ee_u16 seedcrc=0;

 

MEMORY
{

SRAM : org = 0x40000000, len = 384K

local_dmem : org = 0x50800000, len = 64K
}

.stack (NOLOAD) : ALIGN(16)
{
__HEAP = . ;
PROVIDE (_end = . );
PROVIDE (end = . );
. += __HEAP_SIZE ;
__HEAP_END = . ;
_stack_end = . ;
. += __STACK_SIZE ;
_stack_addr = . ;
__SP_INIT = . ;
. += 4;
} > local_dmem

Outcomes