[SOLVED] JLink Flashing Fails ADUCM320

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

  • [SOLVED] JLink Flashing Fails ADUCM320

    Hi,

    I'm using GDB/GDB Server on OSX. When attempting to flash to an Analog Devices Cortex-M3 the verification step fails. GDB server output and .gdbinit included below.

    Thanks,

    Kenny

    .gdbinit

    Source Code

    1. target remote localhost:2331
    2. monitor reset
    3. monitor sleep 100
    4. monitor flash device ADUCM320
    5. monitor flash download = 1
    6. monitor WorkRAM = 0x20000000-0x2003FFFF
    7. monitor flash CFI = 0x00000000-0x00020000
    8. load


    GDB Server Output

    Source Code

    1. SEGGER J-Link GDB Server V4.84f Command Line Version
    2. JLinkARM.dll V4.84f (DLL compiled May 9 2014 20:17:59)
    3. -----GDB Server start settings-----
    4. GDBInit file: none
    5. GDB Server Listening port: 2331
    6. SWO raw output listening port: 2332
    7. Terminal I/O port: 2333
    8. Accept remote connection: yes
    9. Generate logfile: off
    10. Verify download: off
    11. Init regs on start: on
    12. Silent mode: off
    13. Single run mode: off
    14. Target connection timeout: 5 sec.
    15. ------J-Link related settings------
    16. J-Link Host interface: USB
    17. J-Link script: none
    18. J-Link settings file: none
    19. ------Target related settings------
    20. Target device: ADUCM320
    21. Target interface: SWD
    22. Target interface speed: 1000kHz
    23. Target endian: little
    24. Connecting to J-Link...
    25. J-Link is connected.
    26. Firmware: J-Link Lite-ADI Rev.1 compiled Jan 7 2013 17:58:04
    27. Hardware: V1.00
    28. S/N: 541000757
    29. OEM: ADI
    30. Checking target voltage...
    31. Target voltage: 3.58 V
    32. Listening on TCP/IP port 2331
    33. Connecting to target...Connected to target
    34. Waiting for GDB connection...Connected to 127.0.0.1
    35. Reading all registers
    36. Read 1 bytes @ address 0x00000000 (Data = 0xFF)
    37. Read 1 bytes @ address 0x00000000 (Data = 0xFF)
    38. Read 1 bytes @ address 0x00000000 (Data = 0xFF)
    39. Read 1 bytes @ address 0x00000000 (Data = 0xFF)
    40. Read 1 bytes @ address 0x00000000 (Data = 0xFF)
    41. Read 1 bytes @ address 0x00000000 (Data = 0xFF)
    42. Target endianess set to "little endian"
    43. Resetting target
    44. Sleep 100ms
    45. Selecting device: ADUCM320
    46. Flash download enabled
    47. Selecting work RAM area (0x20000000-0x2003FFFF)
    48. Selecting CFI flash area (0x00000000-0x00020000)
    49. GDB closed TCP/IP connection
    50. Connected to 127.0.0.1
    51. Reading all registers
    52. Read 1 bytes @ address 0x00000000 (Data = 0xFF)
    53. Target endianess set to "little endian"
    54. Resetting target
    55. Sleep 100ms
    56. Selecting device: ADUCM320
    57. Flash download enabled
    58. Selecting work RAM area (0x20000000-0x2003FFFF)
    59. Selecting CFI flash area (0x00000000-0x00020000)
    60. Downloading 392 bytes @ address 0x00000000
    61. Downloading 1232 bytes @ address 0x00000188
    62. Downloading 8 bytes @ address 0x00000658
    63. Downloading 8 bytes @ address 0x00000660
    64. Downloading 12 bytes @ address 0x00000668
    65. Downloading 4 bytes @ address 0x00000674
    66. Downloading 1076 bytes @ address 0x00000678
    67. Downloading 4 bytes @ address 0x00000AAC
    68. ERROR: Verification failed @ address 0x00000000
    69. Writing register (R8 = 0x00000265)
    70. Reading from address 0x00000000 (Data = 0xFFFFFFFF)
    Display All
  • Hi,

    Thanks for your inquiry.

    I assume that you are trying to program the internal flash of the ADuCM320.
    What I see in your gdbinit:

    monitor WorkRAM = 0x20000000-0x2003FFFF
    monitor flash CFI = 0x00000000-0x00020000


    Any idea what CFI flash is?
    It is a standard that is mainly used for external parallel NOR flash.
    The internal flash of the ADuCM320 has nothing to do with CFI.

    Just remove these two lines from your gdbinit and it has a pretty fair chance to work.
    Selecting the device should already do the job.


    - 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.
  • Hi Alex,

    Thanks for the response. Yes. I am aware of CFI. I think during some attempts I was trying even silly things.

    I recently got this working. I think it was a linker configuration issue but I very much appreciate that you took the time to look at this. I'm working on an OSX environment and it has been difficult to know what to trust in such an unproven environment (I've used Windows/Segger/IAR for many years).

    I appreciate that Segger supports OSX and Linux!

    Kenny
  • Hi Kenny,

    Good to hear that it is working after all. :)


    - 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.