Bootloader Class Reference

Bootloader class. More...

`#include <Bootloader.h>`

Inheritance diagram for Bootloader:
[legend]
Collaboration diagram for Bootloader:
[legend]

## Classes

struct | EraseOption
| EraseOption struct contains information for an erase progress. More...
struct | FlashFirmwareOption
| FlashFirmwareOption struct contains information for an update progress. More...
struct | ProgramOnceOption
| ProgramOnceOption struct contains information for a program IFR progress. More...
struct | TargetInformation
| TargetInformation struct contains devices information. More...

## Public Types

enum | KibbleStatusCode { KBL_Status_Success = 0x0, KBL_Status_AbortDataPhase = 0x2712 }
| KibbleStatusCode struct contains two correct status code. More...

## Public Member Functions

| Bootloader ()
| Generated standard constructor.
virtual | ~Bootloader ()
| Generated standard destructor.
virtual BOOL | InitInstance ()
| Overrides.
virtual int | ExitInstance ()
| Overrides.
bool | CanRun ()
| Return whether currently a new operation can be processed.
DWORD | Open ()
| Do initialization and create a child thread.
void | Close ()
| Do deinitialization and wait for child thread exit.
DWORD | WaitForEvents (DWORD time)
| Wait an event to be triggered.
void | ResetEvents (DWORD events)
| Reset the triggered event after the corresponding progress is done.
void | Ping ()
| Triggered a ping even to text the connection.
void | Reset ()
| Triggered a reset even, and disconnect target device.
void | Connect (blfwkdll::Updater::PeripheralConfig *config)
| Triggered a connect even, and try to connect target device.
void | UpdateStatus ()
| Triggered a updatestatue even to collect device information.
void | UpdateImage (blfwkdll::Updater::PeripheralConfig *config, FlashFirmwareOption *option)
| Triggered a update even to do a update progress.
void | Erase (EraseOption *option)
| Triggered an erase even.
void | ProgramOnce (ProgramOnceOption *option)
| Triggered an programming ifr even.

## Static Public Member Functions

static void | progressCallback (int percentage, int segmentIndex, int segmentCount)
| the callback function to update the progress.

## Public Attributes

HANDLE | m_pingEvent
| Ping event.
HANDLE | m_statusEvent
| Update status event.
HANDLE | m_resetEvent
| Reset event.
HANDLE | m_connectEvent
| Connect event.
HANDLE | m_updateEvent
| Update event.
HANDLE | m_eraseEvent
| Erase event.
HANDLE | m_programOnceEvent
| Program IFR event.
HANDLE | m_exitEvent
| Exit event to let child thread exit.
CWinThread * | m_pThread
| Pointer to child thread.
bool | m_abort
| Flag is set to abort the update progress.
bool | m_isRunning
| Flag is set when there is an operation under processing.
bool | m_isExiting
| Flag is set to let child thread exit.
bool | m_isConneted
| Flag is set when connect to a target device.
TargetInformation | m_targetInfo
| Contains devices information.
FlashFirmwareOption | m_firmwareConfig
| Contains information for a update operation.
EraseOption | m_eraseOption
| Contains information for an erase operation.
ProgramOnceOption | m_programOnceOption
| Contains information for a programming-IFR operation.
blfwkdll::Updater::PeripheralConfig | m_config
| Contains information for peripheral configuration.
blfwkdll::Updater * | m_updater
| Pointer to a blfwkdll::Updater.

## Detailed Description

Bootloader class.

## Class Documentation

struct Bootloader::EraseOption

EraseOption struct contains information for an erase progress.

Class Members
| ERASE_OPERATION |

Class Members
uint32_t | length | Length in bytes to erase.
uint32_t | memoryID | Memory ID used for flash-erase-all command.
ERASE_OPERATION | option | Erase operation..
uint32_t | startAddress | Start address to erase.

struct Bootloader::FlashFirmwareOption

FlashFirmwareOption struct contains information for an update progress.

Collaboration diagram for Bootloader::FlashFirmwareOption:
[legend]

Class Members
BOOL | autoConnect | Auto connect device after an update, if set TRUE.(Currently, not used)
string | backdoorkey | Backdoor key.
uint32_t | baseAddress | Base address where image file is written to.(Only used for binary file.)
BOOL | doErasetoUnlock | Execute flash-erase-all-unsecure to unlock the device.
string | imageFilePath | Absolute path for image file.
BOOL | useKeytoUnlock | Execute flash-security-disable to unlock the device.

struct Bootloader::ProgramOnceOption

ProgramOnceOption struct contains information for a program IFR progress.

Collaboration diagram for Bootloader::ProgramOnceOption:
[legend]

Class Members
uint32_t | byteCount | IFR length( should be 4 or 8).
string | data | IFR data to write. 4 or 8 hex digits with on leading "0x".
uint32_t | index | IFR index.

struct Bootloader::TargetInformation

TargetInformation struct contains devices information.

Class Members
UINT32 | flashSectorSize | Flash memory sector size.
UINT32 | flashSize | Flash memory size.
UINT32 | procotolVersion | Serial procotol version.
UINT32 | ramSize | RAM memory size.
UINT32 | rsvRgnFlashEnd | End address of flash reserved region.
UINT32 | rsvRgnFlashStart | Start address of flash reserved region.
UINT32 | rsvRgnRamEnd | End address of RAM reserved region.
UINT32 | rsvRgnRamStart | Start address of RAM reserved region.
UINT32 | securityState | Security state.
UINT32 | supportedCmd | Current device supported command.
UINT32 | targetVersion | Bootloader version.

## Member Enumeration Documentation

enum Bootloader::KibbleStatusCode

KibbleStatusCode struct contains two correct status code.

Enumerator
KBL_Status_Success | Success status.
KBL_Status_AbortDataPhase | AbortDataPhase. This status will be received when executing RESET or

The documentation for this class was generated from the following files:

- apps/KinetisFlashTool/KinetisFlashTool/Bootloader.h
- apps/KinetisFlashTool/KinetisFlashTool/Bootloader.cpp