|
OpenBSL
v.0.1.0
|
Core (HW-independent) source file of OpenBSL implementation. More...
Macros | |
| #define | PASSWORD_RECEIVED_FLAG (BV(0)) |
| #define | ENTRY(cmd, func) func, |
Functions | |
| void | OpenBSL_Init (void) |
| device/HW initialization function for OpenBSL More... | |
| void | OpenBSL_RunBSL (void) |
| BSL main routine. More... | |
| void | OpenBSL_CalcChksum (uint8_t byte, uint16_t *checksum) |
| OpenBSL checksum calcuation routine - based on the simple BSD checksum algorithm. More... | |
| void | OpenBSL_ProcGetMemInfo (void) |
| send memory info regarding on-chip non-volatile memory More... | |
| void | OpenBSL_ProcEraseImg (void) |
| erase application image/memory area More... | |
| void | OpenBSL_ProcDnldImg (void) |
| download/write incoming byte streams to application image/memory area, ended with 2 checksum bytes More... | |
| void | OpenBSL_ProcUpldImg (void) |
| upload/read application image/memory area as byte streams, ended with 2 checksum bytes More... | |
| void | OpenBSL_ProcCalcChksm (void) |
| calculate 2 checksum bytes of given memory area More... | |
| void | OpenBSL_ProcEraseSegment (void) |
| erase certain part of application image/memory area More... | |
| void | OpenBSL_ProcDnldSegment (void) |
| download/write input bytes to certain part of application image/memory area More... | |
| void | OpenBSL_ProcUpldSegment (void) |
| upload/read bytes from certain part of application image/memory area More... | |
| void | OpenBSL_ProcPwdCmd (void) |
| process incoming password to unlock other commands More... | |
| void | OpenBSL_ProcJumpToAddr (void) |
| process command to jump to certain given address More... | |
| void | OpenBSL_ProcRunApp (void) |
| process command to run application (jump to application reset vector at address APP_MEM_RESET_VECT_ADDR More... | |
Variables | |
| const OpenBSL_MemSect_t | MemInfo [OPEN_BSL_NUM_OF_MEM_SECTIONS] |
| uint16_t | OpenBSL_InChecksum = 0 |
| uint16_t | OpenBSL_OutChecksum = 0 |
Core (HW-independent) source file of OpenBSL implementation.
| void OpenBSL_CalcChksum | ( | uint8_t | byte, |
| uint16_t * | checksum | ||
| ) |
OpenBSL checksum calcuation routine - based on the simple BSD checksum algorithm.
| [in] | byte | input byte |
| [out] | checksum | pointer to the checksum buffer |
| void OpenBSL_Init | ( | void | ) |
| void OpenBSL_ProcCalcChksm | ( | void | ) |
calculate 2 checksum bytes of given memory area
OpenBSL_ProcCalcChksm
| - |
| void OpenBSL_ProcDnldImg | ( | void | ) |
download/write incoming byte streams to application image/memory area, ended with 2 checksum bytes
OpenBSL_ProcDnldImg
| - |
| void OpenBSL_ProcDnldSegment | ( | void | ) |
download/write input bytes to certain part of application image/memory area
OpenBSL_ProcDnldSegment
| - |
| void OpenBSL_ProcEraseImg | ( | void | ) |
erase application image/memory area
OpenBSL_ProcEraseImg
| - |
| void OpenBSL_ProcEraseSegment | ( | void | ) |
erase certain part of application image/memory area
OpenBSL_ProcEraseSegment
| - |
| void OpenBSL_ProcGetMemInfo | ( | void | ) |
send memory info regarding on-chip non-volatile memory
OpenBSL_ProcGetMemInfo
| - |
| void OpenBSL_ProcJumpToAddr | ( | void | ) |
process command to jump to certain given address
OpenBSL_ProcJumpToAddr
| - |
CMD packet format:
CMD (1 byte) = OPEN_BSL_CMD_JUMP_TO_ADDR ADDR (4 bytes) =
positive RESPONSE packet format:
RESP (1 byte) = OPEN_BSL_CMD_JUMP_TO_ADDR | OPEN_BSL_RESP_BIT_MASK
| void OpenBSL_ProcPwdCmd | ( | void | ) |
process incoming password to unlock other commands
OpenBSL_ProcPwdCmd
| - |
| void OpenBSL_ProcRunApp | ( | void | ) |
process command to run application (jump to application reset vector at address APP_MEM_RESET_VECT_ADDR
OpenBSL_ProcRun
| - |
CMD packet format:
CMD (1 byte) = OPEN_BSL_CMD_RUN_APP
positive RESPONSE packet format:
RESP (1 byte) = OPEN_BSL_CMD_RUN_APP | OPEN_BSL_RESP_BIT_MASK
| void OpenBSL_ProcUpldImg | ( | void | ) |
upload/read application image/memory area as byte streams, ended with 2 checksum bytes
OpenBSL_ProcUpldImg
| - |
| void OpenBSL_ProcUpldSegment | ( | void | ) |
upload/read bytes from certain part of application image/memory area
OpenBSL_ProcUpldSegment
| - |
| void OpenBSL_RunBSL | ( | void | ) |
1.8.5