[ABANDONED] Can j-link cope with startup files called xxx.s?

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

  • [ABANDONED] Can j-link cope with startup files called xxx.s?

    Hello,

    I am facing a rather odd issue when using Jlink, I have a code that I compile with two different compilers clang and gcc.

    What I am observing is that if I use clang compiler and its startup script called startup_ARM_CLANG_CM7.s I get errors when trying to make break points or after the initialization as shown below

    Shell-Script

    1. Reading all registers
    2. Received monitor command: speed 4000
    3. Target interface speed set to 4000 kHz
    4. Received monitor command: flash breakpoints 1
    5. Flash breakpoints enabled
    6. Received monitor command: semihosting enable
    7. Semi-hosting enabled (Handle on BKPT)
    8. Received monitor command: semihosting IOClient 2
    9. Semihosting I/O set to GDB Client
    10. Downloading 16224 bytes @ address 0x00000000 - Verified OK
    11. Downloading 16256 bytes @ address 0x00003F60 - Verified OK
    12. Downloading 16096 bytes @ address 0x00007EE0 - Verified OK
    13. Downloading 16288 bytes @ address 0x0000BDC0 - Verified OK
    14. Downloading 16256 bytes @ address 0x0000FD60 - Verified OK
    15. Downloading 16256 bytes @ address 0x00013CE0 - Verified OK
    16. Downloading 16352 bytes @ address 0x00017C60 - Verified OK
    17. Downloading 11224 bytes @ address 0x0001BC40 - Verified OK
    18. Downloading 204 bytes @ address 0x20000000 - Verified OK
    19. Writing register (PC = 0x 44)
    20. Read 4 bytes @ address 0x00000044 (Data = 0xF802F000)
    21. Reading 64 bytes @ address 0x00001440
    22. Read 2 bytes @ address 0x0000145C (Data = 0xF240)
    23. Read 4 bytes @ address 0x00000286 (Data = 0xF04FD009)
    24. Reading 64 bytes @ address 0x20008000
    25. WARNING: Failed to read memory @ address 0x20008000
    26. WARNING: Failed to read memory @ address 0x20008024
    27. Reading 64 bytes @ address 0x20008000
    28. WARNING: Failed to read memory @ address 0x20008000
    29. WARNING: Failed to read memory @ address 0x20008024
    30. Reading 64 bytes @ address 0x20008000
    31. WARNING: Failed to read memory @ address 0x20008000
    32. WARNING: Failed to read memory @ address 0x20008024
    33. Reading 64 bytes @ address 0x20008000
    Display All


    However, using the gcc compiler and the startup script called startup_ARM_GCC_CM7.S I don't see any issue there


    Shell-Script

    1. Reading all registers
    2. Setting breakpoint @ address 0x000002A6, Size = 2, BPHandle = 0x0001
    3. Setting breakpoint @ address 0x0000032C, Size = 2, BPHandle = 0x0002
    4. Starting target CPU...
    5. ...Breakpoint reached @ address 0x000002A6
    6. Reading all registers
    7. Removing breakpoint @ address 0x000002A6, Size = 2
    8. Removing breakpoint @ address 0x0000032C, Size = 2
    9. Read 4 bytes @ address 0x000002A6 (Data = 0x22004B60)
    10. Reading 64 bytes @ address 0x20007FC0
    11. Read 4 bytes @ address 0x000008CA (Data = 0xBD80BF00)
    12. Reading 64 bytes @ address 0x20007F80
    13. Reading 64 bytes @ address 0x20007C80
    14. Reading 64 bytes @ address 0x20007CC0
    15. Reading 64 bytes @ address 0x20007D00
    16. Reading 64 bytes @ address 0x20007D40
    17. Reading 64 bytes @ address 0x20007D80
    18. Reading 64 bytes @ address 0x20007DC0
    19. Reading 64 bytes @ address 0x20007E00
    20. Reading 64 bytes @ address 0x20007E40
    21. Reading 64 bytes @ address 0x20007E80
    22. Reading 64 bytes @ address 0x20007EC0
    23. Reading 64 bytes @ address 0x20007F00
    24. Reading 64 bytes @ address 0x20007F40
    25. Reading 64 bytes @ address 0x2000794
    Display All


    So googling around I came across similar issue, where it is stated that Jlink has trouble with capitalization of the startup script, and files called xxx.s are not understood as those of xxx.S due to the small s as file extension. Could you let me know whether this may be an issue in my case too?


    Thanks in advance,

    The post was edited 1 time, last by ndarkness ().

  • Hi,

    Sorry to say but this thread makes zero sense so far...
    1) *.S files are assembler files. They have *nothing* to do with J-Link but are of interest for the IDE (compiler + assembler) only.
    2) J-Link does not even know about the existence of an *.S file.
    3) You are writing about getting errors with breakpoints but *both* log outputs you have send indicate exactly 0 errors. They actually look 100% identical to me

    If the IDE complaints of not being able to set breakpoints on lines in an assembler file (*.S) you best contact the vendor of this IDE.
    In case you are using SEGGER Embedded Studio, you ended up in the wrong sub forum, as this one here is about J-Link, not Embedded Studio.
    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.
  • SEGGER - Alex wrote:

    Hi,

    Sorry to say but this thread makes zero sense so far...
    3) You are writing about getting errors with breakpoints but *both* log outputs you have send indicate exactly 0 errors. They actually look 100% identical to me
    Sorry, I duplicate the good log, I have corrected the wrong log when using clang.

    My point is that I am using Eclipse CDT + Segger plugin to boot + debug my target cortex-m7