Hi I had the same problem when i was initialising one array using IAR. I wnated is as global so I decalred it and then I wanted to initialise it. It can be initialised only with constant values.
/***************************************/
#include
...
volatile unsigned char a_send [3] = {0x11, 0x07, 0x1B};somefunction()
{}
main()
{}
/***************************************/
but I wanted to put variables inside and I got the error.
It can be initilised with variables in the function like:
/***************************************/
#include
...
volatile unsigned char a_send [3];
volatile unsigned char variable1;somefunction()
{ volatile unsigned char a_send [0] = 0x11;
volatile unsigned char a_send [1] = variable1;
volatile unsigned char a_send [2] = 0x1B;
}
main()
{}
/***************************************/
I hope this will help you or at least give you some idea.
Greetings from Bulgaria ;)