CycloneBOOT 2.6.6
Secure Bootloader for ARM Cortex-M MCU
Loading...
Searching...
No Matches
boot_recovery.h
Go to the documentation of this file.
1
31#ifndef _STANDALONE_BOOT_RECOVERY_H
32#define _STANDALONE_BOOT_RECOVERY_H
33
34// Dependencies
35#include "boot_config.h"
36#include "core/cboot_error.h"
37#include "os_port.h"
38
39// C++ guard
40#ifdef __cplusplus
41extern "C"
42{
43#endif
44
58
69
70// Recovery related functions
73
74// Replaceable hook
76
77// C++ guard
78#ifdef __cplusplus
79}
80#endif
81#endif //_STANDALONE_BOOT_RECOVERY_H
RecoveryAction
What the bootloader does about it.
Definition boot_recovery.h:64
@ RECOVERY_ACTION_HALT
Stop.
Definition boot_recovery.h:67
@ RECOVERY_ACTION_ENTER_UPDATE
Wait for a new image.
Definition boot_recovery.h:65
@ RECOVERY_ACTION_RESTORE_FACTORY
Restore the factory image over the application.
Definition boot_recovery.h:66
cboot_error_t bootRecoveryCheckBootFailures(bool_t *exhausted)
Checks whether the boot attempt limit has been reached.
Definition boot_recovery.c:46
RecoveryReason
Reason recovery was entered.
Definition boot_recovery.h:50
@ RECOVERY_REASON_BOOT_FAILURES
The boot attempt limit was reached.
Definition boot_recovery.h:54
@ RECOVERY_REASON_REQUESTED
The application requested recovery.
Definition boot_recovery.h:56
@ RECOVERY_REASON_NO_IMAGE
No bootable image is resident.
Definition boot_recovery.h:53
@ RECOVERY_REASON_NOT_CONFIRMED
The application never confirmed the update.
Definition boot_recovery.h:55
@ RECOVERY_REASON_INSTALL_FAILED
The install did not complete.
Definition boot_recovery.h:52
@ RECOVERY_REASON_IMAGE_INVALID
Integrity or signature check failed.
Definition boot_recovery.h:51
cboot_error_t bootRecoveryHook(RecoveryReason reason, RecoveryAction *action)
Recovery action callback. It is declared weak and may be replaced in the user code space....
Definition boot_recovery.c:101
cboot_error_t bootRecoveryGetAction(RecoveryReason reason, RecoveryAction *action)
Selects the recovery action for a given reason. The hook decides, then any action the build cannot ho...
Definition boot_recovery.c:66
Error codes description.
cboot_error_t
Error codes.
Definition cboot_error.h:57