7 years ago.

Unable to properly debug code in KDS

Hi all,

My team is trying to move away from using the online compiler towards an offline toolchain, which we think is essential for proper debugging and for our local source control.

I have a demo program which was generated on the online compiler and I have exported to a KDS project. I believe I have spotted a potential problem with the SPI when I view it on a logic analyser, so I am trying to debug the code in KDS. The problem I am having is that when I get to the SPI write, and I click "Step Into", it actually steps over - I never get to see the code that lies beneath the SPI call.

The line of code in question, which I am unable to step into is:

spi1.write(spiCount++);

this line is within a very simple ISR:

void ticker1Isr() { debugOut = 1; spi1.write(spiCount++); spi1.write(spiCount++); debugOut = 0; }

(debugOut is a GPIO pin)

If I use the debugger to find the declaration of the function, I am taken to the header file, SPI.h, where write is declared as a virtual function, but I cannot find any derived implementations, or any implementation at all. I am expecting to find a definition of something like,

SPI::write(...) { some implementation code }

in a file called "SPI.cpp" or something like that, but I just cannot find that code.

Am I doing something stupid? Should I be able to find this source code somewhere?

Thanks in advance

Tom

Be the first to answer this question.