I would like to create a constant structure in flash. This structure would consist of various sized elements including string arrays, shorts, bytes, etc. Strings should be null terminated, but may not entirely fill the array storage area allocated for it. The code shown below is what I have, but the compiler gives the following error.
../Source/flash_constants.h:1025:33: error: expected ':', ',', ';', '}' or '__attribute__' before '=' token
const unsigned char Reg00[32] = "My String 1";
The const unsigned char Reg00[32] = "My String 1";
is a valid statement outside of the struct definition, but fails inside the struct definition.
Thanks.
struct
{
const unsigned char Reg00[32] = "My String 1";
const unsigned char Reg01[32] = "My String 2";
const unsigned char Reg02[32] = "My String 3";
const unsigned short Reg03 = 0;
const unsigned short Reg04 = 0;
} ModBusIDReg;