This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to define external a const array ?

Hi All,

I have an array struct's with const data in flash memory defined as follows

   const SOD_ObjectDictionaryEntry* pSDOEntryTable = SDOEntryTable;

This works fine ...

I want to use this array in an external file as follows

   extern const SOD_ObjectDictionaryEntry SDOEntryTable[];

Compiling give me following error : error: #513: a value of type "const SOD_ObjectDictionaryEntry *" cannot be assigned to an entity of type "SOD_ObjectDictionaryEntry *".

when I replace it by

   extern const SOD_ObjectDictionaryEntry* SDOEntryTable;


I have the same error.

extern SOD_ObjectDictionaryEntry SDOEntryTable[]


the linker gives an error SDOEntryTable not found , witch is normal.

How can I define a pointer to const data external ?

Thanks

0