Debug Utility

Hi All,

I need something of a small routine (for eg a call procedure )which I can insert just about anywhere in the code (regarding MIOS8 projects) The routine should be capable to output the variable or register that you want to debug and to output these either thru the MIDI out ports or on the LCD (but prefer the MIDI port).

I would appreciate if some one has something like this available. Generally, this can be of course quite useful for all the MIDIBOX forum community.

Thanks

SMC

Hi,

MIOS8: just generate (valid) MIDI events to output the variable value, e.g.

MIOS_MIDI_TxBufferPut(0xc0); // program change allows to send one additional 7bit byte
MIOS_MIDI_TxBufferPut(the_variable & 0x7f);
[/code]




or:
[code]  
MIOS\_MIDI\_TxBufferPut(0xc0 | ((the\_variable & 0x80) ? 1 : 0)); // program change + MSB of variable  
MIOS\_MIDI\_TxBufferPut(the\_variable & 0x7f);  

Alternatively you could try the debug_msg module which is located under modules/debug_msg

See also http://svnmios.midibox.org/filedetails.php?repname=svn.mios&path=%2Ftrunk%2Fmodules%2Fdebug_msg%2FREADME.txt

It sends text strings to the MIOS terminal

MIOS32 (to complete this posting):

use MIOS32_MIDI_SendDebugMessage to generate debug messages with a printf like parameter list

See also http://svnmios.midibox.org/listing.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Ftutorials%2F003_debug_messages%2F

Best Regards, Thorsten.

Great, Thorsten… I am about to put this into practice

Thanks again for this!

:smiley:

SMC