Share via


Serial Debugging (Boot Loader) (Compact 7)

3/12/2014

The serial debug functions initialize and communicate with a debug message output device. Typically, this device is a universal asynchronous receiver/transmitter (UART) connected over a null modem cable to a terminal emulator on the host computer. You may be able to use a single implementation of the serial debug functions for the boot loader and the OAL.

The header file that defines the serial debug interface is Public\Common\OAK\Inc\nkintr.h. The boot loader may use serial debug functions that are implemented in a library shared with the OAL, or the boot loader may use functions that are implemented in its own source code file.

The following are typical serial debug code locations:

  • Platform\Common\Src\Common\Other
  • Platform\<BSP Name>\Src\Bootloader\Eboot
  • Platform\<BSP Name>\Src\Boot\Serial
  • Platform\<BSP Name>\Src\OAL\Oallib

The following table lists the serial debug functions. For more information, see Boot Loader Debug Functions.

Purpose Function name Typical file name

Initializes the debug serial port

OEMDebugInit, OEMInitDebugSerial

init.c, debug.c

Outputs debug messages

OEMWriteDebugString, OEMWriteDebugByte

debug.c

Accepts input to the boot loader

OEMReadDebugByte

debug.c

See Also

Concepts

Boot Loader Code Overview