1.1.3.2.1. cli.cmd_bootloader.bootloader.Bootloader
- class cli.cmd_bootloader.bootloader.Bootloader(interface: BootloaderInterface, path_app_binary: Path | None = None, app_size: int | None = None, path_crc_64_table: Path | None = None)
Implementation of the communication between host-implementation of the bootloader and the embedded bootloader.
- __init__(interface: BootloaderInterface, path_app_binary: Path | None = None, app_size: int | None = None, path_crc_64_table: Path | None = None)
Init function.
- Parameters:
interface – the communication interface of the bootloader
path_app_binary – the path of the binary file
app_size – the size of the binary file of the application
path_crc_64_table – the path of the temporary file that stores the CRC table
Methods
__init__
(interface[, path_app_binary, ...])Init function.
check_target
()Check if the bootloader can be reached and print its current status.
reset_bootloader
()Reset bootloader
run_app
()Run application on bootloader
send_and_validate_vector_table
()Send vector table to the bootloader
send_app_binary
()Transfer the app binary to the embedded bootloader
send_app_data
(i_loop)Send the application binary file as data in 8 bytes (and calculated crc in 8 bytes) to the embedded bootloader.
send_data_as_a_sector
(i_loop, ...[, ...])Send data of one sector to the embedded bootloader.
send_data_as_a_sub_sector
(i_loop_start, ...)Send one sub-sector of data to bootloader.
send_pre_info
()Send CAN message to the embedded bootloader to let the embedded bootloader prepare for receiving the application data.