I removed the double quotes from around {0x79, 0x56, 0x34, 0x12} and the
error is no more.
I still don't know why it works with the quotes with IAR's compiler....
but I'm moving on.
On 5/20/2010 3:59 PM, Paul F. Sehorne wrote:
I'm portiing the TI Chronos Sports Watch firmware from IAR. Why would
mspgcc complain "error: invalid initializer"
[code]
// In smpl_config.h (changed smpl_config.dat to a header file)
#define THIS_DEVICE_ADDRESS "{0x79, 0x56, 0x34, 0x12}"
// In nwk_types.h
typedef struct
{
uint8_t addr[NET_ADDR_SIZE];
} addr_t;
// In nwk_globals.c
static const addr_t sMyROMAddress = THIS_DEVICE_ADDRESS; // compiler
complains "nwk_globals.c:60: error: invalid initializer"
[/code]