Jump to content

Debug Utility


smc
 Share

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...