At the debug session when initialization stage finished program execution fall on _abort vector, but in out of debug everything work.
What is the reasons? In which cases in happen?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
At the debug session when initialization stage finished program execution fall on _abort vector, but in out of debug everything work.
What is the reasons? In which cases in happen?
I use the Lauterbach debugger and the standard load script does not work correctly.
following happens ...
I set the debugger settings to execute code from the initial address. The debugger is at the zero address, I click "Go" execution stay on _dabort, then I press "Go" again the program runs and step on the _dabort vector, then I press "Go" again the program goes on the vector again _dabort. And only after the 3rd launch of programs it comes to main (where I set a breakpoint).
Seems to me it not the data abort
Why, after uploading the program, I can’t just get up immediately on main breakpoint? I have to perform all the manipulations manually.
Do you program the correct ECC codes along with the program into the Flash memory? Does your start-up sequence enable ECC checking for Flash memory accesses? You can identify the cause of the data abort by reading the Data Fault Address Register (DFAR) and Data Fault Status Register (DFSR) in the CPU.
Regards, Sunil
I not sure about ECC code because my script go to AutoECCGeneration branch.
Binary files supplied by the manufacturer of my debug device.
attach flash script
RESet
SYStem.RESet
SYStem.CPU TMS570LS1227-ZWT
SYStem.MemAccess DAP
SYStem.JtagClock CTCK 10MHz
SYStem.Up
; prepare flash programming (declarations)
DO ~~/demo/arm/flash/tms570ls12x.cmm PREPAREONLY
FLASH.ReProgram ALL
Data.LOAD.auto "~~~~/Hercules_16_Blinky_Simple.out" ; My firmware
FLASH.ReProgram OFF
SYStem.Up
Break.set main
Go.direct main
WAIT !STATE.RUN()
; code form ~~/demo/arm/flash/tms570ls12x.cmm
LOCAL ¶meters
ENTRY %LINE ¶meters
LOCAL ¶m_prepareonly
¶m_prepareonly=(STRing.SCAN(STRing.UPpeR("¶meters"),"PREPAREONLY",0)!=-1)
LOCAL &AutoECCGeneration
&AutoECCGeneration=STRing.SCANAndExtract(STRing.UPpeR("¶meters"),"AUTOECC=","1")
IF SYStem.MODE()<5
(
SYStem.RESet
MAP.RESet
IF !CPUIS(TMS570LS1227-ZWT)
SYStem.CPU TMS570LS1227-ZWT
SYStem.Up
)
FLASH.RESet
IF &AutoECCGeneration!=0
(
; === Flashing goes according to this branch !!! ===
; Program flash
FLASH.Create 1. 0x00000000--0x00017FFF 0x4000 TARGET Byte 0. ; Bank 0
FLASH.Create 1. 0x00018000--0x0001FFFF 0x8000 TARGET Byte 0. ; Bank 0
FLASH.Create 1. 0x00020000--0x0013FFFF 0x20000 TARGET Byte 0. ; Bank 0
; EEPROM emulation flash
FLASH.Create 8. 0xF0200000--0xF020FFFF 0x4000 TARGET Byte 7. ; Bank 7
FLASH.TARGET 0x08000000 0x08001000 0x4000 ~~/demo/arm/flash/byte_be/f021r4.bin
)
ELSE
(
; Program flash
FLASH.Create 1. 0x00000000--0x00017FFF 0x4000 TARGET Byte 0. /EraseALIAS 0xF0400000--0xF0402FFF ; Bank 0
FLASH.Create 1. 0x00018000--0x0001FFFF 0x8000 TARGET Byte 0. /EraseALIAS 0xF0403000--0xF0403FFF ; Bank 0
FLASH.Create 1. 0x00020000--0x0013FFFF 0x20000 TARGET Byte 0. /EraseALIAS 0xF0404000--0xF0427FFF ; Bank 0
; Program flash ECC
FLASH.Create 1. 0xF0400000--0xF0402FFF 0x800 TARGET Byte 0. /EraseALIAS 0x00000000--0x00017FFF ; Bank 0
FLASH.Create 1. 0xF0403000--0xF0403FFF 0x1000 TARGET Byte 0. /EraseALIAS 0x00018000--0x0001FFFF ; Bank 0
FLASH.Create 1. 0xF0404000--0xF0427FFF 0x4000 TARGET Byte 0. /EraseALIAS 0x00020000--0x0013FFFF ; Bank 0
; EEPROM emulation flash
FLASH.Create 8. 0xF0200000--0xF020FFFF 0x4000 TARGET Byte 7. /EraseALIAS 0xF0100000--0xF0101FFF ; Bank 7
; EEPROM emulation flash ECC
FLASH.Create 8. 0xF0100000--0xF0101FFF 0x800 TARGET Byte 7. /EraseALIAS 0xF0200000--0xF020FFFF ; Bank 7
FLASH.TARGET 0x08000000 0x08001000 0x4000 ~~/demo/arm/flash/byte_be/f021r4noecc.bin
)
FLASH.CLocK.AUTO
MAP.BUS16 0xF0400000--0xF04FFFFF
MAP.BUS16 0xF0100000--0xF013FFFF
IF ¶m_prepareonly
ENDDO PREPAREDONE
Data Fault Address = 0x08000010
DFSR 0x00000409 - Synchronous Parity/ECC Error 0b11001 Valid
I think I have debugging failure, but what to do with it is not clear.
It appears as though the setup is causing a read from the RAM location 0x08000010 without having first initialized it, and after ECC checking on RAM accesses is enabled. You should check with Lauterbach on their support for the standard load scripts and ask if it is possible using their scripts to read from a RAM location without first writing to it and having ECC checking enabled.
Regards, Sunil