Friday 4 December 2009

What's wrong with the KITL_RETAILMSG() output?

When you setup a new BSP, your first challage will be getting KITL to work.
Some debug outputs might be helpful. But some of the KITL_RETAILMSG() "%" outputs are wrong and therefore will not appear on your terminal.
A look at the source code reveals the truth;
KITLOutputDebugString() doesn't support all the printf() format placeholders:

* @func void | KITLOutputDebugString | Simple formatted debug output string routine
*
* @rdesc none
*
* @parm LPCSTR | sz,... |
* Format String:
*
* @flag Format string | type
* @flag u | unsigned
* @flag d | int
* @flag c | char
* @flag s | string
* @flag x | 4-bit hex number
* @flag B | 8-bit hex number
* @flag H | 16-bit hex number
* @flag X | 32-bit hex number
*

Replace e.g. "%08x" by "%X" and the numbers are fine!

Tschüß Holger

No comments: