^

AR# 36091 12.1 EDK - SDK could not find the frame base for "main" in debugging

I am using SDK to manage and debug my software project. Whenever I click "Debug as -> Launch on hardware" the debug perspective comes up and the following message appears in the console:

.gdbinit: No such file or directory.
Could not find the frame base for "main".


This error is due to a problem in the GNU tools. When this error occurs, you are not able to view the local variable in the function you are attempting to debug, but you are able to use the rest of the debug functionality.

This issue is being investigated and a fixed is being scheduled for 13.3, but a root cause has not yet been identified.

There are three possible work-arounds:

Solution 1:

NOTE: This option has worked in all designs seen up to this point.

To see the local variables use printf, or use xil_printf statements with a UART to view the local variables at the locations you would like to examine them. Breakpoints, single stepping, and step over operations can still be used. If a UART connection is unavailable, the MDM can be used as a UART over JTAG. For information on how to use the MDM core as a UART, refer to the Embedded System Tools Reference Manual.

Solution 2:

NOTE: This option works for most designs.

If there is a particular function that needs to be debugged, move all of the local variables defined in that function out to global variables defined outside of the function. This is only suggested as a temporary modification to the code since it impacts the memory footprint of the application.

Solution 3:

NOTE: This option is not usually successful.

Use function prototypes to define any functions after "main" has been defined.

Original:

int func1(. . . ) //func1 defined here
{
:
:
}

int main(void) //main defined here
{
:
:
}

Changed:

int func1(. . . ) //func1 prototype defined here

int main(void) //main defined here
{
:
:
}

int func1(. . . ) //func1 defined here
{
:
:
}
AR# 36091
Date Created 06/09/2010
Last Updated 07/01/2011
Status Active
Type
Tools
  • EDK - 12.1
Feed Back