Package tockloader.board_interface Documentation
Class BoardInterface
Base class for interacting with hardware boards. All of the class functions should be overridden to support a new method of interacting with a board.
__init__
def __init__(self, args)
Initialize self. See help(type(self)) for accurate signature.
bootloader_is_present
def bootloader_is_present(self)
Check for the Tock bootloader. Returns True if it is present, False
if not, and None if unsure.
determine_current_board
def determine_current_board(self)
Figure out which board we are connected to. Most likely done by reading the attributes. Doesn't return anything.
enter_bootloader_mode
def enter_bootloader_mode(self)
Get to a mode where we can read & write flash.
erase_page
def erase_page(self, address)
Erase a specific page of internal flash.
exit_bootloader_mode
def exit_bootloader_mode(self)
Get out of bootloader mode and go back to running main code.
flash_binary
def flash_binary(self, address, binary)
Write a binary to the address given.
get_all_attributes
def get_all_attributes(self)
Get all attributes on a board. Returns an array of attribute dicts.
get_apps_start_address
def get_apps_start_address(self)
Return the address in flash where applications start on this platform. This might be set on the board itself, in the command line arguments to Tockloader, or just be the default.
get_attribute
def get_attribute(self, index)
Get a single attribute. Returns a dict with two keys: key and value.
get_board_arch
def get_board_arch(self)
Return the architecture of the board we are connected to.
get_board_name
def get_board_name(self)
Return the name of the board we are connected to.
get_bootloader_version
def get_bootloader_version(self)
Return the version string of the bootloader. Should return a value
like 0.5.0, or None if it is unknown.
get_page_size
def get_page_size(self)
Return the size of the page in bytes for the connected board.
open_link_to_board
def open_link_to_board(self)
Open a connection to the board.
print_known_boards
def print_known_boards(self)
Display the boards that have settings configured in tockloader.
read_range
def read_range(self, address, length)
Read a specific range of flash.
set_attribute
def set_attribute(self, index, raw)
Set a single attribute.
_decode_attribute
def _decode_attribute(self, raw)