[SOLVED] j-link memory dump AM5728

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] j-link memory dump AM5728

    Ii can't dump the ram memory with the jlink jtag
    CPU= TI AM5728
    DDR3 RAM = 4G

    I configure the jlink in the following way:

    Source Code

    1. JLink.exe -select USB -device AM5728_A15 -if cJTAG -speed adaptive




    then I execute a "halt"

    Source Code

    1. halt

    and then I try to read the memory

    Source Code

    1. savebin D:\test.bin 0x80000000 0x100000000


    (start address memory 0x80000000
    size : 0x100000000 )

    but I have 0 bytes read

    then i try to read only a few bytes but i always have 0 bytes read


    Source Code

    1. savebin D:\test.bin 0x80000000 0x100



    how can I do a full dump of the DDR memory?
  • Hi,

    Did you make sure that the DDR RAM controller is initialized, so the DDR RAM is actually accessible, at the point where you issued the "savebin" command?
    DDR RAM controllers need to be initialized before any connected DDR RAM can be read/written.

    I guess that issuing a "mem 0x80000000, 100" command will give you "Could not read memory", correct?
    This indicates that the DDR RAM is not accessible.


    BR
    Alex
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • I'm trying but unsuccessful,

    I proceed like this:

    I have to do a RAM memory dump, Linux yocto is running on the system.

    In terminal:

    root @ am57xx-phycore-rdk: ~ # grep "System RAM" / proc / iomem
    80000000-dfffffff: System RAM
    200000000-27ccfffff: System RAM


    I have the correct address of the memory and now
    with the jtag I make an example dump of only 0x1000 bytes length.

    Source Code

    1. Connecting to target via cJTAG
    2. InitTarget() start
    3. TI AM572x (Cortex-A15 core) J-Link script
    4. J-Link script: Init ICEPick
    5. TotalIRLen = 6, IRPrint = 0x01
    6. InitTarget() end
    7. TotalIRLen = 10, IRPrint = 0x0011
    8. JTAG chain detection found 2 devices:
    9. #0 Id: 0x3BA00477, IRLen: 04, CoreSight JTAG-DP
    10. #1 Id: 0x2B99002F, IRLen: 06, TI ICEPick
    11. DPv0 detected
    12. AP map detection skipped. Manually configured AP map found.
    13. AP[0]: AHB-AP (IDR: Not set)
    14. AP[1]: APB-AP (IDR: Not set)
    15. AP[2]: JTAG-AP (IDR: Not set)
    16. Using preconfigured AP[1] as APB-AP
    17. AP[1]: APB-AP found
    18. Found Cortex-A15 r2p2
    19. 6 code breakpoints, 4 data breakpoints
    20. Debug architecture ARMv7.1
    21. Data endian: little
    22. Main ID register: 0x412FC0F2
    23. I-Cache L1: 32 KB, 256 Sets, 64 Bytes/Line, 2-Way
    24. D-Cache L1: 32 KB, 256 Sets, 64 Bytes/Line, 2-Way
    25. Unified-Cache L2: 2048 KB, 2048 Sets, 64 Bytes/Line, 16-Way
    26. System control register:
    27. Instruction endian: little
    28. Level-1 instruction cache enabled
    29. Level-1 data cache enabled
    30. MMU enabled
    31. Branch prediction enabled
    32. Memory zones:
    33. Zone: Default Description: Default access mode
    34. Zone: AHB-AP (AP0) Description: DMA like acc. in AP0 addr. space
    35. Zone: APB-AP (AP1) Description: DMA like acc. in AP1 addr. space
    36. Cortex-A15 identified.
    37. J-Link>savebin D:\test.bin 0x80000000 0x1000
    38. Opening binary file for writing... [D:\test.bin]
    39. Reading 4096 bytes from addr 0x80000000 into file...Not all bytes could be read from target. 0x00000000 bytes successfully read.
    40. O.K.
    Display All



    but the "test.bin" file is 0 bytes !!!!


    The DDR RAM controller is initialized by u-boot
  • Yes, the test.bin is 0 bytes, as J-Link Commander indicated.
    It could read 0x0 bytes so the file size will be == NumBytesRead, so == 0.

    We know that reading / writing memory on Cortex-A15 is working, as it is not different from an A8 or A9 in that regard.
    We still suspect an MMU issue or something similar.
    You can try to halt the CPU, disable the MMU via the CP15 commands in J-Link Commander and then try savebin again.
    Note that disabling the MMU does not automatically flush the CPU cache, so there might be some data still be pending in the cache for write and may have not made it to the DDR yet.


    BR
    Alex
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.