Main Site Documentation

How to debug RLP code while debugging Gadgeteer application?


#1

As the subject indicates, I’m trying to debug my Gadgeteer application, but do not know how to set up compilers/debuggers for RLP code debugging. I am working with Express versions of C++ and C# at work, so I do not have unified environment.

If there is a tutorial for this, I apologize, but I could not find it.


#2

AFAIK it may not be possible to step into RLP code when debugging a NETMF managed code application.

You may have to use debug print statements within the RLP code. Search the Code section for an example.

http://code.tinyclr.com/project/329/rlp-serial-debugging/

However it may help to build a test jig with the processor and use a JTAG emulator to step through and debug the RLP code in a native application. Once everything behaves as it should you can wrap up the code for RLP.


#3

Hmm… First, thank you very much for the reply.

Second, that method seems awfully complicated. Wouldn’t it be easier to do callbacks into C# code if you only wanted to print out debug messages?


#4

I just use one of the “code size limited” compilers, like keil or mdk, that has a built in emulator. I then create a rest C program to run my RPL code, all in the emulator. I find that that is the fastest way to debug. I won’t work if you need to interface to external hardware though…