mirror of https://github.com/wolfSSL/wolfBoot.git
feat: store wolfboot version in named section
parent
80a186f5c5
commit
e608555ff9
4
arch.mk
4
arch.mk
|
|
@ -3361,5 +3361,9 @@ ifeq ($(BIG_ENDIAN),1)
|
|||
CFLAGS+=-D"BIG_ENDIAN_ORDER"
|
||||
endif
|
||||
|
||||
ifneq ($(WOLFBOOT_VERSION_SECTION),)
|
||||
CFLAGS+=-DVERSION_SECTION=$(WOLFBOOT_VERSION_SECTION)
|
||||
endif
|
||||
|
||||
CFLAGS+=-DWOLFBOOT_ARCH_$(ARCH)
|
||||
CFLAGS+=-DTARGET_$(TARGET)
|
||||
|
|
|
|||
|
|
@ -113,6 +113,16 @@ extern "C" {
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef WB_STRINGIFY
|
||||
#define _WB_STRINGIFY_L2(str) #str
|
||||
#define WB_STRINGIFY(str) _WB_STRINGIFY_L2(str)
|
||||
#endif
|
||||
|
||||
#if defined(VERSION_SECTION)
|
||||
#define WOLFBOOT_VERSION_SECTION __attribute__((section(WB_STRINGIFY(VERSION_SECTION))))
|
||||
#else
|
||||
#define WOLFBOOT_VERSION_SECTION
|
||||
#endif
|
||||
|
||||
/* Helpers for memory alignment */
|
||||
#ifndef XALIGNED
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ extern unsigned int _start_text;
|
|||
/**
|
||||
* @brief wolfBoot version number (used in RAM code).
|
||||
*/
|
||||
static volatile const uint32_t __attribute__((used)) wolfboot_version = WOLFBOOT_VERSION;
|
||||
static volatile const uint32_t __attribute__((used)) WOLFBOOT_VERSION_SECTION wolfboot_version = WOLFBOOT_VERSION;
|
||||
/**
|
||||
* @brief RAM Interrupt Vector table.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -126,7 +126,8 @@ extern unsigned int _start_text;
|
|||
extern unsigned int __logical_binary_start;
|
||||
unsigned int _start_text = (unsigned int)&__logical_binary_start;
|
||||
#endif
|
||||
static volatile const uint32_t __attribute__((used)) wolfboot_version = WOLFBOOT_VERSION;
|
||||
|
||||
static volatile const uint32_t __attribute__((used)) WOLFBOOT_VERSION_SECTION wolfboot_version = WOLFBOOT_VERSION;
|
||||
|
||||
#ifdef EXT_FLASH
|
||||
# ifndef BUFFER_DECLARED
|
||||
|
|
|
|||
Loading…
Reference in New Issue