[ABANDONED] J-Commander "Could not preserve target memory" error

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

  • [ABANDONED] J-Commander "Could not preserve target memory" error

    Hello.

    I have been learning to programm microcontrollers with J-Link Commander and have encountered an error I can not find any mention of anywhere.

    When I try to erase and reprogram my microcontroller J-Link Commander connects to the processor just fine, can successfully read its contents and erase them, but when I try to upload a .hex file it throws out an error.

    Source Code

    1. J-Link>loadfile C://Users/{path}/SMRL-BTL.hex
    2. 'loadfile': Performing implicit reset & halt of MCU.
    3. Reset: Halt core after reset via DEMCR.VC_CORERESET.
    4. Reset: Reset device via AIRCR.SYSRESETREQ.
    5. Reset: SYSRESETREQ has confused core.
    6. Found SW-DP with ID 0x2BA01477 DPv0 detected
    7. CoreSight SoC-400 or earlier
    8. AP map detection skipped. Manually configured AP map found.
    9. AP[0]: AHB-AP (IDR: Not set)
    10. AP[0]: Core found
    11. AP[0]: AHB-AP ROM base: 0xE00FF000 CPUID register: 0x05FA0004. Implementer code: 0x05 (???)
    12. Unknown core, assuming Cortex-M0
    13. Found Cortex-M0 r15p4, Little endian.
    14. Reset: Using fallback: VECTRESET.
    15. Reset: Halt core after reset via DEMCR.VC_CORERESET.
    16. Reset: Reset device via AIRCR.VECTRESET.
    17. Reset: VECTRESET has confused core.
    18. Reset: Using fallback: Reset pin.
    19. Reset: Halt core after reset via DEMCR.VC_CORERESET.
    20. Reset: Reset device via reset pin
    21. Reset: VC_CORERESET did not halt CPU. (Debug logic also reset by reset pin?).
    22. Reset: Reconnecting and manually halting CPU.
    23. Found SW-DP with ID 0x2BA01477
    24. DPv0 detected
    25. CoreSight SoC-400 or earlier
    26. AP map detection skipped. Manually configured AP map found.
    27. AP[0]: AHB-AP (IDR: Not set)
    28. AP[0]: Core found
    29. AP[0]: AHB-AP ROM base: 0xE00FF000 CPUID register: 0x05FA0004. Implementer code: 0x05 (???)
    30. Unknown core, assuming Cortex-M0
    31. Found Cortex-M0 r15p4, Little endian.
    32. Downloading file [C://Users/{path}/SMRL-BTL.hex]...
    33. ****** Error: Failed to prepare for programming.
    34. Could not preserve target memory.
    35. Unspecified error -1
    36. J-Link>
    Display All
    At the same time this very J-Link setup and command sequence programms the same processor just fine on my peer's machine.

    I suspect that it must be something dumb like the lack of some basic drivers or an intricasy of setting up file system and core access.

    The latter is the most probable cause, but I have already installed all recommended drivers and asked our tech team to grant J-Link Commander all possible file and USB device access.

    I would be really thankful if anyone knows what specifically might cause this problem.

    The post was edited 2 times, last by Gingerguy ().