Secure Bootloader Sample Reference Macro Definition Documentation

 

VT_OFFSET_STACK_POINTER

#define VT_OFFSET_STACK_POINTER 0

 

Vector table offset for the stack pointer.

 

Location: bl_check.h:47

 

VT_OFFSET_RESET_VECTOR

#define VT_OFFSET_RESET_VECTOR 1

 

Vector table offset for the reset vector.

 

Location: bl_check.h:50

 

VT_OFFSET_VERSION_INFO

#define VT_OFFSET_VERSION_INFO 8

 

Vector table offset for the version information pointer.

 

Location: bl_check.h:53

 

VT_OFFSET_IMAGE_SIZE

#define VT_OFFSET_IMAGE_SIZE 9

 

Vector table offset for the used image size pointer.

 

Location: bl_check.h:56

 

VT_OFFSET_CERT_SIZE

#define VT_OFFSET_CERT_SIZE 10

 

Vector table offset for the certificate size.

 

Location: bl_check.h:59

 

BL_CONFIGURATION_BASE

#define BL_CONFIGURATION_BASE ((BL_AppConfiguration_t *) FLASH0_DATA_BASE)

 

Base address of the boot configuration in flash.

 

Location: bl_configuration.h:47

 

BL_CONFIGURATION_WORDS

#define BL_CONFIGURATION_WORDS (sizeof(BL_AppConfiguration_t) >> 2)

 

Define the size of the configuration area in words.

 

Location: bl_configuration.h:50

 

FLASH_BOND_INFO_SIZE

#define FLASH_BOND_INFO_SIZE 0x800

 

Location: bl_memory.h:53

 

BL_CODE_SECTOR_SIZE

#define BL_CODE_SECTOR_SIZE 2048

 

The image block size when loading data.

 

(Size of a code sector.)

 

Location: bl_memory.h:56

 

BL_DATA_SECTOR_SIZE

#define BL_DATA_SECTOR_SIZE 256

 

The image block size when loading data.

 

(Size of a code sector.)

 

Location: bl_memory.h:59

 

BL_FLASH_RESERVED_SIZE

#define BL_FLASH_RESERVED_SIZE (FLASH_DEU_RESERVED_SIZE + FLASH_BOND_INFO_SIZE)

 

The size of the area reserved for use by the ROM and stack.

 

Location: bl_memory.h:62

 

BL_SECURE_STORAGE_BASE

#define BL_SECURE_STORAGE_BASE (FLASH0_DATA_BASE + BL_FLASH_RESERVED_SIZE)

 

Define the base address of the secure storage area.

 

Location: bl_memory.h:66

 

BL_SECURE_STORAGE_SIZE

#define BL_SECURE_STORAGE_SIZE (FLASH0_DATA_RSL15_284_TOP - BL_SECURE_STORAGE_BASE + 1)

 

Define a size for the secure storage area.

 

Location: bl_memory.h:69

 

BL_SECURE_STORAGE_TOP

#define BL_SECURE_STORAGE_TOP (BL_SECURE_STORAGE_BASE + BL_SECURE_STORAGE_SIZE - 1)

 

Define the top of the secure storage area.

 

Location: bl_memory.h:73

 

BL_BOOTLOADER_BASE

#define BL_BOOTLOADER_BASE FLASH0_CODE_BASE

 

The base address of the bootloader flash.

 

Location: bl_memory.h:77

 

BL_BOOTLOADER_KB

#define BL_BOOTLOADER_KB (24 * 1024)

 

Define the size of the bootloader in kB.

 

Location: bl_memory.h:104

 

BL_BOOTLOADER_SIZE

#define BL_BOOTLOADER_SIZE BL_BOOTLOADER_KB

 

The size of the area reserved for use by the bootloader.

 

Location: bl_memory.h:110

 

BL_FLASH_CODE_BASE

#define BL_FLASH_CODE_BASE (BL_BOOTLOADER_BASE + BL_BOOTLOADER_SIZE)

 

The base of the code flash.

 

Location: bl_memory.h:113

 

BL_FLASH_DATA_BASE

#define BL_FLASH_DATA_BASE (BL_SECURE_STORAGE_TOP + 1)

 

The base of the data flash, offset by the reserved areas.

 

Location: bl_memory.h:116

 

BL_FLASH_CODE_TOP

#define BL_FLASH_CODE_TOP FLASH0_CODE_TOP

 

Define the top of code flash in 512K device.

 

Location: bl_memory.h:129

 

BL_FLASH_DATA_TOP

#define BL_FLASH_DATA_TOP FLASH0_DATA_TOP

 

Define the top of data flash in 512K device.

 

Location: bl_memory.h:132

 

BL_FLASH_CODE_SIZE

#define BL_FLASH_CODE_SIZE (BL_FLASH_CODE_TOP - BL_FLASH_CODE_BASE + 1)

 

Code size is derived from the base and top addresses.

 

Location: bl_memory.h:137

 

BL_FLASH_DATA_SIZE

#define BL_FLASH_DATA_SIZE (BL_FLASH_DATA_TOP - BL_FLASH_DATA_BASE + 1)

 

Data size is derived from the base and top addresses.

 

Location: bl_memory.h:140

 

BL_APPLICATION_BASE

#define BL_APPLICATION_BASE BL_FLASH_CODE_BASE

 

Define the base address of the application.

 

Location: bl_memory.h:143

 

BL_AVAILABLE_SIZE

#define BL_AVAILABLE_SIZE (BL_FLASH_CODE_SIZE + BL_FLASH_DATA_SIZE)

 

Define the total available flash for application and download.

 

Location: bl_memory.h:146

 

BL_APPLICATION_SIZE

#define BL_APPLICATION_SIZE ((BL_AVAILABLE_SIZE >> 1) & 0xFFFFF800)

 

Define the maximum size of an application.

 

(must be 2K aligned)

 

Location: bl_memory.h:149

 

BL_DOWNLOAD_BASE

#define BL_DOWNLOAD_BASE (BL_APPLICATION_BASE + BL_APPLICATION_SIZE)

 

Define the base address of the download area.

 

Location: bl_memory.h:152

 

BL_DOWNLOAD_SIZE

#define BL_DOWNLOAD_SIZE BL_APPLICATION_SIZE

 

Define the maximum size of the download area.

 

Location: bl_memory.h:155

 

BL_OPT_FEATURE_ENABLED

#define BL_OPT_FEATURE_ENABLED 1

 

Indicator that a given feature should be enabled.

 

Location: bl_options.h:47

 

BL_OPT_FEATURE_DISABLED

#define BL_OPT_FEATURE_DISABLED 0

 

Indicator that a given features should be disabled.

 

Location: bl_options.h:50

 

BL_OPT_FEATURE_BOOTLOADER

#define BL_OPT_FEATURE_BOOTLOADER BL_OPT_FEATURE_ENABLED

 

Marker indicating that the bootloader feature is enabled.

 

Location: bl_options.h:56

 

BL_OPT_FEATURE_SECURE_BOOTLOADER

#define BL_OPT_FEATURE_SECURE_BOOTLOADER BL_OPT_FEATURE_DISABLED

 

Marker indicating that the bootloader supports authenticated update of images.

 

Location: bl_options.h:62

 

BL_OPT_FEATURE_SECURE_STORAGE

#define BL_OPT_FEATURE_SECURE_STORAGE BL_OPT_FEATURE_DISABLED

 

Marker indicating if the secure storage feature is provided.

 

Location: bl_options.h:67

 

BL_OPT_FEATURE_ATTESTATION

#define BL_OPT_FEATURE_ATTESTATION BL_OPT_FEATURE_DISABLED

 

Marker indicating if the bootloader supports attestation protocols.

 

Location: bl_options.h:72

 

BL_OPT_ATTEST_KEY_AES

#define BL_OPT_ATTEST_KEY_AES BL_OPT_FEATURE_DISABLED

 

Marker indicating that the attestation feature supports AES keys.

 

Location: bl_options.h:110

 

BL_OPT_ATTEST_KEY_RSA

#define BL_OPT_ATTEST_KEY_RSA BL_OPT_FEATURE_DISABLED

 

Marker indicating that the attestation feature supports RSA keys.

 

Location: bl_options.h:116

 

BL_OPT_ATTEST_KEY_ECC

#define BL_OPT_ATTEST_KEY_ECC BL_OPT_FEATURE_DISABLED

 

Marker indicating that the attestation feature supports ECC keys.

 

Location: bl_options.h:122

 

BL_OPT_SECURE_FILE_SYSTEM_RESET

#define BL_OPT_SECURE_FILE_SYSTEM_RESET BL_OPT_FEATURE_DISABLED

 

Marker indicating that the attestation feature supports AES keys.

 

Location: bl_options.h:167

 

DEBUG_CATCH_GPIO

#define DEBUG_CATCH_GPIO 0

 

Location: bl_recovery.h:44

 

UART_CLK

#define UART_CLK 8000000

 

Set UART peripheral clock.

 

Location: bl_target.h:43

 

SENSOR_CLK

#define SENSOR_CLK 32768

 

Set sensor clock.

 

Location: bl_target.h:46

 

USER_CLK

#define USER_CLK 1000000

 

Set user clock.

 

Location: bl_target.h:49

 

VCC_BUCK_ENABLE

#define VCC_BUCK_ENABLE (1)

 

Enable or disable the buck converter.

 

The system allows for two methods of reducing the battery power supply from a higher voltage (1.2V-3.6V) to usable supply voltage (1.0V-1.31V). If the VBAT supply voltage is less than 1.4V, this should be disabled so that the device uses the low drop out (LDO) regulator. Otherwise, the buck (DC-DC) converter may be enabled. Set this to: => 0 to disable buck converter mode and enable linear mode => 1 to enable buck converter mode and disable linear mode

 

Location: bl_target.h:63

 

BL_TICKER_TIME_MS

#define BL_TICKER_TIME_MS 10

 

Define the time in ms for each interrupt.

 

Location: bl_ticker.h:45

 

BL_DEBUG

#define BL_DEBUG swmLogVerbose

 

Define the standard verbose/debug tracing routine.

 

Location: bl_trace.h:48

 

BL_TRACE

#define BL_TRACE swmLogInfo

 

Define the standard tracing routine.

 

Location: bl_trace.h:51

 

BL_WARNING

#define BL_WARNING swmLogWarn

 

Define the standard warning message routine.

 

Location: bl_trace.h:54

 

BL_ERROR

#define BL_ERROR swmLogError

 

Define the standard error message routine.

 

Location: bl_trace.h:57

 

BL_UART_RX_TIMEOUT_MS

#define BL_UART_RX_TIMEOUT_MS (3000)

 

Define the receive timeout in milliseconds.

 

Location: bl_uart.h:54

 

BL_WATCHDOG_FEED_ME_MS

#define BL_WATCHDOG_FEED_ME_MS (2000)

 

While waiting for UART input, ensure watch dog is fed.

 

Location: bl_uart.h:57

 

BL_UART_TX_TIMEOUT_MS

#define BL_UART_TX_TIMEOUT_MS (3000)

 

Define the send timeout in milliseconds.

 

Location: bl_uart.h:60

 

BL_UART_MAX_RX_LENGTH

#define BL_UART_MAX_RX_LENGTH (2048)

 

Define the maximum length of a single receive operation.

 

Location: bl_uart.h:63

 

BL_UART_MAX_TX_LENGTH

#define BL_UART_MAX_TX_LENGTH (2048)

 

Define the maximum length of a single send operation.

 

Location: bl_uart.h:66

 

BL_BAUD_RATE

#define BL_BAUD_RATE 115200

 

Define a baud rate for loading.

 

Location: bl_uart.h:69

 

BL_UART_DELAY_CYCLES

#define BL_UART_DELAY_CYCLES ((20 * SystemCoreClock) / BL_BAUD_RATE)

 

Define a delay time to allow the hardware buffers to clear.

 

Location: bl_uart.h:72

 

UPDATE_GPIO

#define UPDATE_GPIO 14

 

Define the GPIO pin to be used to indicate an update is required.

 

Location: bl_update.h:47

 

MIN

#define MIN ((a) < (b) ? (a) : (b))

 

Define a shorthand to get the minimum of two values.

 

Location: bl_util.h:46

 

MAX

#define MAX ((a) > (b) ? (a) : (b))

 

Define a shorthand to get the maximum of two values.

 

Location: bl_util.h:49

 

BITS2BYTES

#define BITS2BYTES ((x + 7) >> 3)

 

Calculate the number of bytes needed to hold x bits.

 

Location: bl_util.h:52

 

BITS2HALFWORDS

#define BITS2HALFWORDS ((x + 15) >> 4)

 

Calculate the number of 16 bit words needed to hold x bits.

 

Location: bl_util.h:55

 

BL_VERSION_ENCODE

#define BL_VERSION_ENCODE (((m) << 12) | ((n) << 8) | (r))

 

Define a mechanism to encode a version number as a uint16_t.

 

Location: bl_versions.h:54

 

BL_VERSION_DECODE

#define BL_VERSION_DECODE ((num >> 12) & 0xF), ((num >> 8) & 0xF), (num & 0xFF)

 

Define a mechanism to decode a version number from a uint16_t.

 

Location: bl_versions.h:57

 

BL_BOOT_VERSION

#define BL_BOOT_VERSION __attribute__ ((section(".rodata.boot.version"))) \ const BL_BootAppVersion_t blBootAppVersion = \ { \ id, BL_VERSION_ENCODE(major, minor, revision) \ };

 

Define the boot version including name and ensure it is stored in an easily accessible location.

 

Location: bl_versions.h:62

 

BL_WATCHDOG_MAX_HOLD_OFF_SECONDS

#define BL_WATCHDOG_MAX_HOLD_OFF_SECONDS 600

 

Define the maximum time that can elapse before the watchdog must be refreshed.

 

Location: bl_watchdog.h:50