Module kernel::debug
[−]
[src]
Support for in-kernel debugging.
For printing, this module uses an internal buffer to write the strings into.
If you are writing and the buffer fills up, you can make the size of
output_buffer
larger.
Before debug interfaces can be used, the board file must assign them hardware:
kernel::debug::assign_gpios( Some(&sam4l::gpio::PA[13]), Some(&sam4l::gpio::PA[15]), None, ); let kc = static_init!( capsules::console::App, capsules::console::App::default()); kernel::debug::assign_console_driver(Some(hail.console), kc);
Example
debug!("Yes the code gets here with value {}", i); debug_verbose!("got here"); // includes message count, file, and line debug_gpio!(0, toggle); // Toggles the first debug GPIO
Yes the code gets here with value 42 TOCK_DEBUG(0): /tock/capsules/src/sensys.rs:24: got here
Reexports
use callback::AppId; |
use callback::Callback; |
use core::slice; |
use core::str; |
use core::cmp::min; |
use core::fmt::write; |
use core::fmt::Arguments; |
use core::fmt::Result; |
use core::fmt::Write; |
use core::ptr::read_volatile; |
use core::ptr::write_volatile; |
use driver::Driver; |
use hil; |
use mem::AppSlice; |
use returncode::ReturnCode; |
Structs
DebugWriter |
Constants
APPID_IDX | |
BUF_SIZE |
Statics
DEBUG_GPIOS | |
DEBUG_WRITER | |
KERNEL_CONSOLE_CALLBACK |
Traits
Debug |
Functions
assign_console_driver⚠ | |
assign_gpios⚠ | |
begin_debug_fmt | |
begin_debug_verbose_fmt | |
flush⚠ | |
get_grant⚠ |