Debugging Owlware

Pardon my ignorance when it comes to embedded programming - How can I debug Owlware? Can I use STLink over the USB connection?

thanks

oli

AFAIK the only way to debug with ST-link (or st-util) is with a programmer attached to the SWD interface of the target device.
In the workshop, I use an ST Discovery board as programmer/debugger, connected via a 6-pin cable to the SWD header on the OWL digital board. I then run st-util and gdb server, which gives me full gdb debug facilities: break points, single step, memory inspection et c.
I’m not aware of any way to do that over usb, though, sorry!

But to answer your first question:
To debug OwlWare (without an SWD programmer) you can
a) blink the LED
b) send USB MIDI messages
c) configure the expression pedal pins as a serial port, connect a TTL-serial interface, and debug with printf() et c.

The last option c) is something of an easter egg, we’ve not yet developed this functionality very much in the firmware but the hw capability is there.

Thanks. Could you be a bit more specific about how you use the discovery board to debug? I have one. I am also interested in how I can profile my code for arm. I’ve developed a couple of really nice stereo effects but they are causing glitching and I need to work out where the bottlenecks are.

Oli

The discovery board user manual has instructions for setting up the board as a programmer - basically you remove 2 jumpers and use the 6-pin header.
It connects to the SWD header on the OWL digital board. You probably have to take the board out of the OWL to make the connection… You can use either hookup wires or a 6-pin jumper wire.

I should really write up a wiki page about this.

thanks for the info.

Another question… is it possible to change the samplerate on a per patch basis? This would be a great feature and might let me run some of the patches i’ve made!

cheers

That would be a good feature…

There is an experimental feature in the MIDI handler to change the sample rate at runtime, though I seem to recall this doesn’t yet work as expected.

There are a few global objects available in the firmware code, e.g.: ‘settings’ for the ApplicationSettings object and ‘codec’ for CodecController.

This bit of code should dynamically change the SR:
settings.audio_samplingrate = 96000;
codec.stop();
codec.init(settings);
codec.start();