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

From where the Call Stack window information is read?

Dear Keil MDK-ARM uVision support,

I'm using Keil MDK-ARM uVision 5.14 for ARM Cortex-M3 core, STM32F103 device.

From time to time we get a HardFault exception.
We know that if the debugger is connected, it is somehow posible to deduce the offending
instruction/routine by opening the Call Stack window and following the hints. That´s fine.

But what about if you get a HardFault and the debugger is not connected?
When we get the HardFault, we want somehow to read the same information you are reading
for showing the Call Stack window.
Our intention is to read the same information you do and send it to a UART port
to be able to read it with a Hyperterminal or similar.

We know that reading the stack content is the first step. We are doing it already, but
it is not enought for us since in our case the application code is quite complex, and unrolling
the stack contents might be complex.

Thanks a lot for your help.

Parents
  • Dear Keil support,

    Just to close the discussion we would like to ask you the following.

    1)
    We know that using the following command:

    fromelf -c --output=.\Obj\file.txt .\Obj\file.axf

    we are able to get the dissasembly of the binary file with the absolute Flash memory addresses.
    This is fine, but this contains no C code, which is easier to understand for us.

    2)
    On the other hand we also know that selecting:

    'Options for Target xxx'-> 'Listing' -> 'Assembler Listing'
    'Options for Target xxx'-> 'Listing' -> 'C Compiler Listing'
    'Options for Target xxx'-> 'Listing' -> 'C Preprocessor Listing'

    we are able to get the mixed C/Assembler txt module source files with relative memory addresses.
    This contains C/Assembler, but just relative addresses.

    The question is: Is it posible to generate the mixed C/Assembler txt source files containing
    the absolute Flash addresses? How?

    Thank you very much for your time.

Reply
  • Dear Keil support,

    Just to close the discussion we would like to ask you the following.

    1)
    We know that using the following command:

    fromelf -c --output=.\Obj\file.txt .\Obj\file.axf

    we are able to get the dissasembly of the binary file with the absolute Flash memory addresses.
    This is fine, but this contains no C code, which is easier to understand for us.

    2)
    On the other hand we also know that selecting:

    'Options for Target xxx'-> 'Listing' -> 'Assembler Listing'
    'Options for Target xxx'-> 'Listing' -> 'C Compiler Listing'
    'Options for Target xxx'-> 'Listing' -> 'C Preprocessor Listing'

    we are able to get the mixed C/Assembler txt module source files with relative memory addresses.
    This contains C/Assembler, but just relative addresses.

    The question is: Is it posible to generate the mixed C/Assembler txt source files containing
    the absolute Flash addresses? How?

    Thank you very much for your time.

Children
No data