Hello All,
To summarize, I am having issues with a PnE GDB debug session taking an unreasonable amount of time to launch which appears to be dependent on the size of my .data segment.
My details are I am using KDS 3.0 and KDSK 1.3. I have a custom board with a K64F family of processor that uses the flexbus to connect some external SDRAM. In my linker file I defined a new memory segment m_flexbusram.
m_flexbusram (RW) : ORIGIN = 0x60000000, LENGTH = 0x04000000
in my project I define a number of data buffers in the new region so they will be located on my SDRAM. In the format:
unsigned short BUFFER[SIZE] __attribute__ ((section(".flexbusram")));
This is when I first encountered my project freezing at 98% when I tried to launch a debug session. I believed it was truly frozen until I tried shrinking the size of all my buffers located on SDRAM. Experimenting, I found that the speed at which my debug session launched was linearly related to the size of my buffers. While small, a project build reported my build size to be
text data bss dec
206796 24408 117708 348912
at this size the debug session launches in seconds. Switching to use the desired sizes for my buffers, the build reports
text data bss dec
206828 40804680 117708 41129216
and at this size the session requires about 90 minutes to launch.
Changing the buffer sizes between these two extremes results in linearly relative sizes of my .data segment and relative launch times for my debug session.
Once embedded on my board the software boots and runs just fine on power up, its the debug sessions which take lengthy amounts of time to launch. I'm trying to better understand what the GDB server is doing with my initialized data that it dislikes but I so far haven't made progress with my search results. I can include other pieces of the linker file I edited to create the new flexbusram region if anyone believes it is relevant but I wanted to avoid clutter above.
Any feedback or advice is of course appreciated!