I'm terribly sorry for cross posting - I am just finding my way around and have already posted this question on the xmos support forum, however this community seems to be the best place to put my question.
I'm trying to develop some code to run on an XC-2 board and during debugging I'm using a test output port (ref clocked, so 100MHz) which I am toggling and examining on an oscilloscope. I found that if I build my code for debug, I get much slower execution with some things than building for release. In particular doing an input from a timer seems to be pretty slow in debug. For example;
Code:
p_test <: 1;
p_test <: 0;
produces a 10ns pulse in release mode as expected, but in debug this is a 30ns pulse.
If I add a timer input operation in between the two port outputs, like;
Code:
p_test <: 1;
t :> timeval;
p_test <: 0;
In release mode this outputs a 20ns pulse (again as expected), but running a debug build this produces a massive 110ns output pulse, so the timer input operation is taking much longer than expected. The port and timer are both clocked using the 100MHz ref clock, so I am a bit confused as to what is going on here, whether optimisations are coming into play or something else.
Am I missing something big here, or is there a really significant performance penalty when trying to debug stuff?