kernel

Module debug

Source
Expand description

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,
);

components::debug_writer::DebugWriterComponent::new(uart_mux)
    .finalize(components::debug_writer_component_static!());

§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

Structs§

Statics§

  • Object to hold the assigned debugging GPIOs.

Traits§

  • Implementation of std::io::Write for no_std.

Functions§