![]() |
Kinetis Bootloader
2.0.0
Common bootloader for Kinetis devices
|
Bootloader context and API structures. More...
Collaboration diagram for Context:Data Structures | |
| struct | flash_driver_interface_t |
| Interface for the flash driver. More... | |
| struct | aes_driver_interface_t |
| Interface for AES 128 functions. More... | |
| struct | bootloader_context_t |
| Structure of bootloader global context. More... | |
| struct | bootloader_tree_t |
| Root of the bootloader API tree. More... | |
Typedefs | |
| typedef uint32_t | flash_driver_interface_t |
| typedef uint32_t | flash_config_t |
| typedef uint32_t | aes_driver_interface_t |
Enumerations | |
| enum | _bootloader_version_constants { kBootloader_Version_Name = 'K', kBootloader_Version_Major = 2, kBootloader_Version_Minor = 0, kBootloader_Version_Bugfix = 0 } |
| Version constants for the bootloader. | |
Variables | |
| bootloader_context_t | g_bootloaderContext |
| Bootloader global context data. More... | |
| const flash_driver_interface_t | g_flashDriverInterface |
| Function table for flash driver. | |
| const aes_driver_interface_t | g_aesInterface |
| bootloader_context_t | g_bootloaderContext |
| Bootloader global context data. More... | |
| const flash_driver_interface_t | g_flashDriverInterface |
| Function table for flash driver. | |
| const aes_driver_interface_t | g_aesInterface |
| const char | bootloaderCopyright [] = "Copyright (c) 2013-2016 Freescale Semiconductor, Inc. All rights reserved." |
| Copyright string for the bootloader. | |
| const bootloader_tree_t | g_bootloaderTree |
| Static API tree. More... | |
Bootloader Entry Point | |
| void | bootloader_user_entry (void *arg) |
| Entry point called by a user application to run the bootloader. More... | |
Bootloader context and API structures.
| struct flash_driver_interface_t |
Interface for the flash driver.
Collaboration diagram for flash_driver_interface_t:Data Fields | |
| standard_version_t | version |
| flash driver API version number. | |
| status_t(* | flash_init )(flash_config_t *config) |
| status_t(* | flash_erase_all )(flash_config_t *config, uint32_t key) |
| status_t(* | flash_erase_all_unsecure )(flash_config_t *config, uint32_t key) |
| status_t(* | flash_erase )(flash_config_t *config, uint32_t start, uint32_t lengthInBytes, uint32_t key) |
| status_t(* | flash_program )(flash_config_t *config, uint32_t start, uint32_t *src, uint32_t lengthInBytes) |
| status_t(* | flash_get_security_state )(flash_config_t *config, flash_security_state_t *state) |
| status_t(* | flash_security_bypass )(flash_config_t *config, const uint8_t *backdoorKey) |
| status_t(* | flash_verify_erase_all )(flash_config_t *config, flash_margin_value_t margin) |
| status_t(* | flash_verify_erase )(flash_config_t *config, uint32_t start, uint32_t lengthInBytes, flash_margin_value_t margin) |
| status_t(* | flash_verify_program )(flash_config_t *config, uint32_t start, uint32_t lengthInBytes, const uint32_t *expectedData, flash_margin_value_t margin, uint32_t *failedAddress, uint32_t *failedData) |
| status_t(* | flash_get_property )(flash_config_t *config, flash_property_tag_t whichProperty, uint32_t *value) |
| status_t(* | flash_register_callback )(flash_config_t *config, flash_callback_t callback) |
| status_t(* | flash_program_once )(flash_config_t *config, uint32_t index, uint32_t *src, uint32_t lengthInBytes) |
| status_t(* | flash_read_once )(flash_config_t *config, uint32_t index, uint32_t *dst, uint32_t lengthInBytes) |
| status_t(* | flash_read_resource )(flash_config_t *config, uint32_t start, uint32_t *dst, uint32_t lengthInBytes, flash_read_resource_option_t option) |
| status_t(* | flash_prepare_execute_in_ram_functions )(flash_config_t *config) |
| status_t(* | flash_is_execute_only )(flash_config_t *config, uint32_t start, uint32_t lengthInBytes, flash_execute_only_access_state_t *access_state) |
| status_t(* | flash_erase_all_execute_only_segments )(flash_config_t *config, uint32_t key) |
| status_t(* | flash_verify_erase_all_execute_only_segments )(flash_config_t *config, flash_margin_value_t margin) |
| status_t(* | flash_set_flexram_function )(flash_config_t *config, flash_flexram_function_option_t option) |
| status_t(* | flash_program_section )(flash_config_t *config, uint32_t start, uint32_t *src, uint32_t lengthInBytes) |
| struct aes_driver_interface_t |
| struct bootloader_context_t |
Structure of bootloader global context.
Collaboration diagram for bootloader_context_t:| Data Fields | ||
|---|---|---|
| const peripheral_descriptor_t * | activePeripheral | The currently active peripheral. |
| const aes_driver_interface_t * | aesInterface | Interface to the AES driver. |
| const peripheral_descriptor_t * | allPeripherals | Array of all peripherals. |
| const command_interface_t * | commandInterface | Interface to command processor operations. |
| const flash_driver_interface_t * | flashDriverInterface | Flash driver interface. |
| flash_config_t | flashState | Flash driver instance. |
| const memory_interface_t * | memoryInterface | Abstract interface to memory operations. |
| const memory_map_entry_t * | memoryMap | Memory map used by abstract memory interface. |
| const property_interface_t * | propertyInterface | Interface to property store. |
| struct bootloader_tree_t |
Root of the bootloader API tree.
An instance of this struct resides in read-only memory in the bootloader. It provides a user application access to APIs exported by the bootloader.
Collaboration diagram for bootloader_tree_t:Data Fields | |
| void(* | runBootloader )(void *arg) |
| Function to start the bootloader executing. | |
| standard_version_t | version |
| Bootloader version number. | |
| const char * | copyright |
| Copyright string. | |
| const bootloader_context_t * | runtimeContext |
| Pointer to the bootloader's runtime context. | |
| const flash_driver_interface_t * | flashDriver |
| Flash driver API. | |
| const aes_driver_interface_t * | aesDriver |
| AES driver API. | |
| standard_version_t | bootloader_version |
| Bootloader version number. | |
| const uint32_t * | reserved |
| Do NOT use. | |
| void bootloader_user_entry | ( | void * | arg | ) |
Entry point called by a user application to run the bootloader.
For ROM targets, this function configures the RCM_FM register so that the ROM will execute automatically out of reset. Then the system is reset.
Flash-resident configurations just call the reset handler as the entry point, since there is no way to automatically get back into the bootloader out of reset (or at least no guaranteed way).
| arg | For future expansion. Currently unused. |
| const aes_driver_interface_t g_aesInterface |
| bootloader_context_t g_bootloaderContext |
Bootloader global context data.
| bootloader_context_t g_bootloaderContext |
Bootloader global context data.
| const bootloader_tree_t g_bootloaderTree |
Static API tree.