This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DS-5 and DStream  set memory freescale i.MX6  error: ERROR(TAD11-NAL18)

I want to use the DS-5 and DStream to debug the u-boot, so I write a memory initialization sequence into file cmimx6q.ds, which is a list of commands like:

mem set 0x020e05a8  32  0x00000028

and I specify this file as the input of Run target initialization debugger script  from Debugger tab in Debug configuration Option . The attach png shows it.


And the problem cames:

Once I click debug , the error occurs, and the full log is following ( I chang the color of the error hint sentence) :

Stopping running target Freescale - i.MX6 Solo (Generic) on USB:001870 on connection
Connected to running target Freescale - i.MX6 Solo (Generic) on USB:001870
Execution stopped at: S:0xC00AF58C
S:0xC00AF58C   MOV      pc,lr
source /v "/home/hexiongjun/SmartAuto/uboot-imx/cmimx6q.ds"
+mem set 0x020e05a8  32  0x00000028
Target Message: Memory access caused precise abort.
Debug Precise Abort Registers : DFSR = 0x00000805, DFAR = 0x020E05A8
ERROR(TAD11-NAL18): 
# in /home/hexiongjun/SmartAuto/uboot-imx/cmimx6q.ds:1 while executing: mem set 0x020e05a8  32  0x00000028
! Failed to write 4 bytes to address S:0x020E05A8
! Bus error on memory operation.
ERROR(CMD656): The script /home/hexiongjun/SmartAuto/uboot-imx/cmimx6q.ds failed to complete due to an error during execution of the script
loadfile "/home/hexiongjun/SmartAuto/uboot-imx/u-boot"
ERROR(CMD16-TAD11-NAL18): 
! Failed to load "u-boot"
! Failed to write 179,688 bytes to address S:0x10000000
! Bus error on memory operation.
Target Message: Memory access caused precise abort.
Debug Precise Abort Registers : DFSR = 0x00000024, DFAR = 0x00007000
Target Message: Could not determine target state

So  I submit the command reset , it success:

reset
Target has been reset
Execution stopped at: S:0xC001FDB8
S:0xC001FDB8   TST      r3,#0x4000

then I submit command mem set 0x020e05a8  32  0x00000028 , it faled to write :

mem set 0x020e05a8  32  0x00000028
Target Message: Memory access caused precise abort.
Debug Precise Abort Registers : DFSR = 0x00000805, DFAR = 0x020E05A8
ERROR(TAD11-NAL18):
! Failed to write 4 bytes to address S:0x020E05A8
! Bus error on memory operation.

It seems the debug can't access the register 0x020e05a8 , I'm confused. 

I used to debug arm by J-Link, DStream is the first time. Can anyone help me ? Thanks in advance.

Parents
  • The PC with 0xC....... makes me think that the target may have booted a Linux kernel which turned on the MMU (and not mapped any memory to 0x020E05A8).  Try looking at the SCTLR in CP15 to see if the M bit is on.  The reset command may be having no effect.  You could fake the reset yourself by clearing the M bit, the caching btis, setting the CPSR, etc. but that wouldn't reset the rest of the chip (memory controller, etc.).  Can you change the bootcmd variable in U-Boot to not boot the kernel?

Reply
  • The PC with 0xC....... makes me think that the target may have booted a Linux kernel which turned on the MMU (and not mapped any memory to 0x020E05A8).  Try looking at the SCTLR in CP15 to see if the M bit is on.  The reset command may be having no effect.  You could fake the reset yourself by clearing the M bit, the caching btis, setting the CPSR, etc. but that wouldn't reset the rest of the chip (memory controller, etc.).  Can you change the bootcmd variable in U-Boot to not boot the kernel?

Children
  • 1】The PC with 0xC....... is: The SoC will boot from the SD Card[contain the u-boot and linux kernel] before I click the debug in DS-5, to avoid it, I remove the SD card this time, the PC changed to 0x0000108C, and it seems success to write memory for some address(Line6~Line14), but failed after that:

    Stopping running target Freescale - i.MX6 Solo (Generic) on USB:001870 on connection
    Connected to running target Freescale - i.MX6 Solo (Generic) on USB:001870
    Execution stopped at: S:0x0000108C
    S:0x0000108C   BX       lr
    source /v "/home/hexiongjun/SmartAuto/uboot-imx/cmimx6q.ds"
    +mem set 0x020e05a8  32  0x00000028
    +mem set 0x020e05b0  32  0x00000028
    +mem set 0x020e0524  32  0x00000028
    +mem set 0x020e051c  32  0x00000028
    +mem set 0x020e0518  32  0x00000028
    +mem set 0x020e050c  32  0x00000028
    +mem set 0x020e05b8  32  0x00000028
    +mem set 0x020e05c0  32  0x00000028
    +mem set 0x020e05ac  32  0x00000028
    +mem set 0x020e05b4  32  0x00000028
    ERROR(TAD11-NAL20): 
    # in /home/hexiongjun/SmartAuto/uboot-imx/cmimx6q.ds:12 while executing: mem set 0x020e05b4  32  0x00000028
    ! Failed to write 4 bytes to address S:0x020E05B4
    ! Verify error on memory operation.
    ERROR(CMD656): The script /home/hexiongjun/SmartAuto/uboot-imx/cmimx6q.ds failed to complete due to an error during execution of the script
    loadfile "/home/hexiongjun/SmartAuto/uboot-imx/u-boot"
    ERROR(CMD16-TAD11-NAL22): 
    ! Failed to load "u-boot"
    ! Failed to write 179,688 bytes to address S:0x10000000
    ! General error on memory or register access.
    Target Message: Could not determine target state
    

    2】scatter file:

    I think the u-boot ELF file should contain the entry point, so it's no necessary to add a scatter file.

  • 1 If your mem sets are to peripheral registers (e.g. memory controller) then they may not read back the same value that was written which is causing "Verify error on memory operation."

    You can use a command like memory 0x020e0500 +0x100 nocache,noverify,nobp,nohbp (for some apropriate base address and size) to tell the debugger where the peripherals are.  See also ARM DS-5 Debugger Command Reference: memory

    I suspect that the further loadfile error is probably a "cascade" error because the peripherals aren't all setup.

    2The scatter file (or linker script) is used to tell the linker how to build the image and what address to use for it.  It affects the image but doesn't directly tell the debugger anything.

  • I have tried the nocache,noverify,nobp,nohbp; and unlucky, it shows the same hint:

    1. ERROR(TAD11-NAL20):  
    2. # in /home/hexiongjun/SmartAuto/uboot-imx/cmimx6q.ds:12 while executing: mem set 0x020e05b4  32  0x00000028 
    3. ! Failed to write 4 bytes to address S:0x020E05B4 
    4. ! Verify error on memory operation. 

    I give up for the moment.  Thank you.

  • I'm sorry to hear that.  It would be interesting (to me, anyway) to see the output of info memory immediately before the command that fails.