|
Simple Build Info v2.0r1
Simple Build Info library provides macros for creating and handling build info from flash.
|
Classes | |
| struct | build_info_t |
| Build info struct. More... | |
Macros | |
| #define | SBI_VERSION "v2.0r1" |
| Library version string. | |
| #define | SBI_APP_NAME_LEN 16 |
| Maximum length of application name. | |
| #define | SBI_APP_VER_LEN 16 |
| Maximum length of application version. | |
| #define | SBI_APP_HW_LEN 16 |
| Maximum length of hardware version. | |
| #define | SBI_APP_FLAGS_LEN 12 |
| Maximum length of build flags. | |
| #define | __SBI(_name, _ver, _rev, _flags) |
| Code snippet for creating application build info in flash memory. | |
| #define | __SBI_EXT(_tag, _variant, _ver, _rev, _flags) |
| Code snippet for creating extended application build info in flash memory. | |
| #define | SBI_NAME __buildInfo.app.name |
| Macro for application name. | |
| #define | SBI_TAG __buildInfo.app.tag |
| Macro for application tag. | |
| #define | SBI_VARIANT __buildInfo.app.variant |
| Macro for application variant. | |
| #define | SBI_VER __buildInfo.appVer |
| Macro for application version. | |
| #define | SBI_HW __buildInfo.hwRev |
| Macro for application hardware revision. | |
| #define | SBI_DATE __buildInfo.buildDate |
Macro for application build date. Example date: Aug 8 2019 (day is padded). | |
| #define | SBI_FLAGS __buildInfo.buildFlags |
Macro for application build flags. Example: D flag for debug build. | |
| #define | SBI_USED (void)(SBI_NAME) |
| Code snippet for preventing compiler from removing build info from flash memory. | |
Variables | |
| volatile const build_info_t | __buildInfo |
Simple Build Info library
Library can be used only with GCC toolchain.
If SBI_NO_FIX is not defined during build, application build info is placed inside sBuildInfo section. User must ensure it exists in linker script.
Define SBI_NO_FIX in build and build info will not be placed at fixed location in flash memory.
Set maximum length of build info by providing SBI_APP_NAME_LEN, SBI_APP_VER_LEN, SBI_APP_HW_LEN and SBI_APP_FLAGS_LEN defines during build. Default length for info is 16 chars(12 for build flags) and 8 chars for application tag and variant.
Build flags example: DFT (one character per build flag)
D for build with debug prints.F for build with enabled FPU.T for build with trace log system. | #define __SBI | ( | _name, | |
| _ver, | |||
| _rev, | |||
| _flags | |||
| ) |
Code snippet for creating application build info in flash memory.
Application build info will be placed on fixed location in flash memory with user-defined sBuildInfo section within linker script.
| _name | Application name. Max SBI_APP_NAME_LEN chars. |
| _ver | Application version. Max SBI_APP_VER_LEN chars. |
| _rev | Hardware revision. Max SBI_APP_HW_LEN chars. |
| _flags | Build flags. Max SBI_APP_FLAGS_LEN chars. |
Definition at line 84 of file sBuildInfo.h.
| #define __SBI_EXT | ( | _tag, | |
| _variant, | |||
| _ver, | |||
| _rev, | |||
| _flags | |||
| ) |
Code snippet for creating extended application build info in flash memory.
Application build info will be placed on fixed location in flash memory with user-defined sBuildInfo section within linker script. With this snippet, application name is replaced with application tag and variant, both SBI_APP_NAME_LEN/2 characters long.
| _tag | Application tag. Max SBI_APP_NAME_LEN/2 chars. |
| _variant | Application variant. Max SBI_APP_NAME_LEN/2 chars. |
| _ver | Application version. Max SBI_APP_VER_LEN chars. |
| _rev | Hardware revision. Max SBI_APP_HW_LEN chars. |
| _flags | Build flags. Max SBI_APP_FLAGS_LEN chars. |
Definition at line 108 of file sBuildInfo.h.
| #define SBI_APP_FLAGS_LEN 12 |
Maximum length of build flags.
Definition at line 67 of file sBuildInfo.h.
| #define SBI_APP_HW_LEN 16 |
Maximum length of hardware version.
Definition at line 63 of file sBuildInfo.h.
| #define SBI_APP_NAME_LEN 16 |
Maximum length of application name.
Definition at line 55 of file sBuildInfo.h.
| #define SBI_APP_VER_LEN 16 |
Maximum length of application version.
Definition at line 59 of file sBuildInfo.h.
| #define SBI_DATE __buildInfo.buildDate |
Macro for application build date. Example date: Aug 8 2019 (day is padded).
Definition at line 172 of file sBuildInfo.h.
| #define SBI_FLAGS __buildInfo.buildFlags |
Macro for application build flags. Example: D flag for debug build.
Definition at line 173 of file sBuildInfo.h.
| #define SBI_HW __buildInfo.hwRev |
Macro for application hardware revision.
Definition at line 171 of file sBuildInfo.h.
| #define SBI_NAME __buildInfo.app.name |
Macro for application name.
Definition at line 167 of file sBuildInfo.h.
| #define SBI_TAG __buildInfo.app.tag |
Macro for application tag.
Definition at line 168 of file sBuildInfo.h.
| #define SBI_USED (void)(SBI_NAME) |
Code snippet for preventing compiler from removing build info from flash memory.
Definition at line 174 of file sBuildInfo.h.
| #define SBI_VARIANT __buildInfo.app.variant |
Macro for application variant.
Definition at line 169 of file sBuildInfo.h.
| #define SBI_VER __buildInfo.appVer |
Macro for application version.
Definition at line 170 of file sBuildInfo.h.
| #define SBI_VERSION "v2.0r1" |
Library version string.
Definition at line 52 of file sBuildInfo.h.