This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Including a raw binary file in firmware using IAR "--image_input" linker option - determining size of data?

I've included a raw binary data file in my MSP430 firmware image, using the linker option "--image_input=C:\fileinrootdirectory.bin,NAME_OF_SYMBOL,DATA20_C,1". (IAR Embedded Workbench XLINK - detailed at http://supp.iar.com/Support/?note=71111).

This works nicely, avoiding the ugly method eg. const unsigned char SOME_FILE[124211]={0xAB,0xCD, .... }; and having to update it whenever the file is changed.

I am able to reference this using extern const char* NAME_OF_SYMBOL; but I am unable to find a clean method of determining the size of the file.

Does anyone know how to get the file size, other than manually updating a constant?

**Attention** This is a public forum