You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.7 KiB
33 lines
1.7 KiB
#ifndef MEMORY_H_
|
|
#define MEMORY_H_
|
|
volatile typedef struct{
|
|
volatile uint8_t Padding;
|
|
volatile uint8_t GS1_country[IDISN_FIXP_GS1_COUNTRY_Length];
|
|
volatile uint8_t GS1_company[IDISN_FIXP_GS1_COMPANY_Length];
|
|
volatile uint8_t ModuleType[IDISN_FIXP_MODULE_TYPE_Length];
|
|
volatile uint8_t HW_revision[IDISN_FIXP_HW_REV_Length];
|
|
volatile uint8_t SN[IDISN_FIXP_SERIAL_Length];
|
|
volatile uint8_t MAC[IDISN_FIXP_MAC_Length];
|
|
volatile uint8_t SW[IDISN_FIXP_SW_REV_Length]; //SW Version (Bootloader/App)
|
|
volatile uint32_t AppCRC; //Only in APP
|
|
} FLASH_DATABLOCK;
|
|
//Universal data block
|
|
|
|
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
#ifdef _BOOTLOADER_
|
|
#include "BootVersion.h"
|
|
const volatile FLASH_DATABLOCK STATIC_DATA_BL __attribute__((section (".locationInBoot"))) = {
|
|
//STATIC PART
|
|
#include "device.cfg"
|
|
.SW = {BOOT_VERSION_MAJOR, BOOT_VERSION_MINOR} //Botloader version
|
|
};
|
|
#endif
|
|
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
#define APP_VERSION
|
|
const volatile FLASH_DATABLOCK STATIC_DATA_APP __attribute__((section (".locationInApp"))) = {
|
|
//.AppCRC = 0x8d173a8c //CRC32 for empty flash
|
|
#include "device.cfg"
|
|
};
|
|
#undef APP_VERSION
|
|
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
#endif /* MEMORY_H_ */ |