Part Number: TMS570LC4357
Hi,
I have been struggling with a data abort for few days now. We have implemented SDL(safeTI diagnostic Lib) with safeRTOS.
After execution of portRESTORE_CONTEXT the code is going into data abort function
_vPortSVC_start_first:
LDMFD SP!, {R4, R5, LR} ; Pop registers to keep stack pointer correct.
portRESTORE_CONTEXT
void vDataAbort( void )
{
volatile portUInt32Type ulDataFaultStatusReg;
volatile portUInt32Type ulDataFaultAddressReg;
ulDataFaultStatusReg = ulGetDataFaultStatusRegister(); <---- value of ulDataFaultStatusReg is 0x1C06
ulDataFaultAddressReg = ulGetDataFaultAddressRegister(); <----- value of ulDataFaultAddressReg is 0
for( ;; )
{
prvAbortDelay(); <-- enter here
}
}
below are the link.cmd file
MEMORY
{
VECTORS (X) : origin=0x00000000 length=0x00000080 vfill = 0xffffffff
KERN_FUNC (RX) : origin=0x00000080 length=0x0000ff80 vfill = 0xffffffff
FLASH0 (RX) : origin=0x00010000 length=0x001F0000 vfill = 0xffffffff
STACKS (RW) : origin=0x08000000 length=0x00003000
KERN_DATA (RW) : origin=0x08003000 length=0x00002000
HIGH_HANDLER (RWX) : origin=0x08005000 length=0x00001000
RAM (RW) : origin=0x08006000 length=0x0007A000
FEE (R) : origin=0xF0200000 length=0x00000064 fill=0xDEADBEEF /* For FEE testing, Valid only for sample application */
ECC_VEC (R) : origin=(0xf0400000 + (start(VECTORS) >> 3))
length=(size(VECTORS) >> 3)
ECC={algorithm=algoL2R5F021, input_range=VECTORS}
ECC_FLA0 (R) : origin=(0xf0400000 + (start(FLASH0) >> 3))
length=(size(FLASH0) >> 3)
ECC={algorithm=algoL2R5F021, input_range=FLASH0 }
}
SECTIONS
{
.intvecs palign(32), START( lnkStartFlashAddress ),START( lnkKernelFuncStartAddr )
fill =0xffffffff {} > VECTORS
.sl_stflash_SRAM : RUN = HIGH_HANDLER, LOAD = FLASH0, LOAD_START(ulHighHandlerLoadStart), LOAD_END(ulHighHandlerLoadEnd),
LOAD_SIZE(ulHighHandlerSize), RUN_START( ulHighHandlerStartAddr ), RUN_END( ulHighHandlerEndAddr )
.kernel_function END( lnkKernelFuncEndAddr ) :
{
*(KERNEL_FUNCTION)
} > KERN_FUNC
.unpriv_flash palign(32), END( lnkEndFlashAddress ) :
{
*(.text)
*(.const)
} > FLASH0
.cinit align(32) : {} > KERN_FUNC
.pinit align(32) : {} > KERN_FUNC
.STACK_DATA_svc : {. += 1024;} > STACKS, RUN_START(StackModeSVC)
.STACK_DATA_fiq : {. += 1024;} > STACKS, RUN_START(StackModeFIQ)
.STACK_DATA_irq : {. += 1024;} > STACKS, RUN_START(StackModeIRQ)
.STACK_DATA_abt : {. += 1024;} > STACKS, RUN_START(StackModeABT)
.STACK_DATA_und : {. += 1024;} > STACKS, RUN_START(StackModeUND)
.STACK_DATA_sys : {. += 1024;} > STACKS, RUN_START(StackModeSYS)
STACK_DATA START( lnkKernelDataStartAddr ) : {} > STACKS
KERNEL_DATA END( lnkKernelDataEndAddr ) : {} > KERN_DATA
.bss : {} > RAM
.data : {} > RAM
.sysmem : {} > RAM
LOG_DATA : > RAM //LOG
PROFILE_DATA : > RAM //PROFILE
__idle_hook_data__
: START( lnkIdleTaskDataStartAddr )
{} > RAM palign( 0x20 )
}
in HL_sys_intvecs.asm
.ref _c_int00
.ref vUndefAbort
.ref vSafeRTOSSVCHandler
.ref vPrefetchAbort
.ref vDataAbort
.ref phantomInterrupt
.def resetEntry
;-------------------------------------------------------------------------------
; interrupt vectors
resetEntry
b _c_int00
b vUndefAbort
b vSafeRTOSSVCHandler
b vPrefetchAbort
b vDataAbort
b phantomInterrupt
ldr pc,[pc,#-0x1b0]
ldr pc,[pc,#-0x1b0]
We have investigate that after execution of shedulatstart function it will run portSTART_FIRST_TASK();
in this function execution it will going to execute portRESTORE_CONTEXT and then code is going into data abort.
Please see and support us.
