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
Hi Stephen
I'm uploading an .elf file that is for sure, what I find a little bit strange is that commands like -gdwarf-3 are not recognized by the compiler, it could be because the project was based on ECOS (old OS for microcontrollers) and maybe -gdwarf-3 wasn't created at the time.
The compiler that I'm using is the arm-elf-gcc and I'm not sure how to use --debugging or --debug-dump, I tried to add it as a symbol for debugging but it is not recognizing neither of those by the compiler.
Thanks for the help
Alan
Hi AlanThe 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
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
Hi AlanI'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?
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?
Alan.Blumenstein said:Any other suggestions?
debug in Eclipse ?
or (shudders) GDB command line ...