In this systemGlobals.c file I declare: struct SMBusADCEntry_entry { unsigned short int SMBusADCBankNumber; unsigned short int SMBusADCBankChannel; }; xdata struct SMBusADCEntry_entry SMBusADC[] = { { (unsigned short int)0, (unsigned short int)0 }, { (unsigned short int)0, (unsigned short int)1 } }; Then in the systemGlobals.h file: #ifndef __SYSTEM_GLOBALS_H__ #define __SYSTEM_GLOBALS_H__ extern struct SMBusADCEntry_entry SMBusADC[]; #endif Then I include this systemGlobals.h file in my main.c file and access the data as SMBusADC[0].channelLowerLimit_UI = 0x20; The compiler complains on the xdata struct line with duplicate definition. Additionally then with the above setting of data 0x20 the error SMBusADC undeclared identifier.
Works. Thanks. There are many parameters in the real struct so channelLowerLimit_UI is in the real version, just wanted to save space. C.