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

Debugging a compiled file compiled on Eclipse

Hi everyone,

I'm trying to debug a file compiled in Eclipse with the uVision version V5.14.0.0 in a microcontroller STR912FAW47. I can insert breakpoints in the assembler windows but the option is disable when I try to do the same in the windows with the C code (figure). Do I need to add something on the makefile to activate the debbuging?

Thanks in advance

Regards

Alan Blumenstein

Parents
  • Hi Alan

    The objdump and readelf utilities are normally provided with gcc.  

    If you are using arm-elf-gcc, then they will be named arm-elf-objdump and arm-elf-readelf.

    eCos seems to have a lot of debug configurations options, such as CYGVAR_KERNEL_THREADS_LIST.  You may need to check the settings of these options.

    Hope this helps you to progress.

    Stephen

Reply
  • Hi Alan

    The objdump and readelf utilities are normally provided with gcc.  

    If you are using arm-elf-gcc, then they will be named arm-elf-objdump and arm-elf-readelf.

    eCos seems to have a lot of debug configurations options, such as CYGVAR_KERNEL_THREADS_LIST.  You may need to check the settings of these options.

    Hope this helps you to progress.

    Stephen

Children
  • Hi Stephen

    The arm-elf-readelf works as a command, when I run it I got in the cmd this message:

    I'm not sure what should I look in this file, I already saved it in a document.

    regards

    Alan

  • Hi Alan

    I've not seen that error before, but it might indicate that the debug information is being generated incorrectly, which might then explain why the debugger is unable to handle it.

    A quick Google search for "Location lists in .debug_info section aren't in ascending order" points to this being caused by a bug in the toolchain.  To avoid this, you could try changing your source code, or reducing the optimization level.

    As a quick check, try compiling a simple Hello World program with "-g", then use readelf.  You should see something like:

    :
    Contents of the .debug_info section:

      Compilation Unit @ offset 0x0:
       Length:        0x22 (32-bit)
       Version:       2
       Abbrev Offset: 0x0
       Pointer Size:  4
     <0><b>: Abbrev Number: 1 (DW_TAG_compile_unit)
        <c>   DW_AT_stmt_list   : 0x0
        <10>   DW_AT_low_pc      : 0x80010128
        <14>   DW_AT_high_pc     : 0x80010278
    :

    Then load the image into the debugger.  Are you able to debug Hello World at source level?

  • Hi Stephen


    I made the minimal possible configuration for the system (keeping the ECOS configuration without change) and compiled the system, now when I run the arm-elf-readelf, there is no error back and it generates a file with a similar message as you described in your previous message. Anyway, I cannot debug it at source level.

    Any other suggestions?

    Regards

    Alan

  • Any other suggestions?

    debug in Eclipse ?

    or (shudders) GDB command line ...