Thanks, that helped. However, there seems to be more. Initializing an ADC_base component results in a following plethora of errors. Below I've added an example that illustrates the issue.
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c: In function 'FC_CAL_ADC_Enable':
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:147:18: error: 'AD1CAL1' undeclared (first use in this function)
_SFR_WRITE(&AD1CAL1,0xB3341210);
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:147:18: note: each undeclared identifier is reported only once for each function it appears in
_SFR_WRITE(&AD1CAL1,0xB3341210);
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:148:18: error: 'AD1CAL2' undeclared (first use in this function)
_SFR_WRITE(&AD1CAL2,0x01FFA769);
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:149:18: error: 'AD1CAL3' undeclared (first use in this function)
_SFR_WRITE(&AD1CAL3,0x0BBBBBB8);
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:150:18: error: 'AD1CAL4' undeclared (first use in this function)
_SFR_WRITE(&AD1CAL4,0x000004AC);
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:151:18: error: 'AD1CAL5' undeclared (first use in this function)
_SFR_WRITE(&AD1CAL5,0x02028002);
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:153:18: error: 'AD1CON1' undeclared (first use in this function)
_SFR_WRITE(&AD1CON1,0); // No AD1CON1 features are enabled including: Stop-in-Idle, early
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:157:18: error: 'AD1CON2' undeclared (first use in this function)
_SFR_WRITE(&AD1CON2,0); // Boost, Low-power mode off, SAMC set to min, set up the ADC Clock
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:168:18: error: 'AD1CON3' undeclared (first use in this function)
_SFR_WRITE(&AD1CON3,0); // ADINSEL is not configured for this example. VREFSEL of ?0?
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:177:18: error: 'AD1IMOD' undeclared (first use in this function)
_SFR_WRITE(&AD1IMOD,0); // All channels configured for default input and single-ended
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:180:18: error: 'AD1GIRQEN1' undeclared (first use in this function)
_SFR_WRITE(&AD1GIRQEN1,0); // No global interrupts are used.
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:181:18: error: 'AD1GIRQEN2' undeclared (first use in this function)
_SFR_WRITE(&AD1GIRQEN2,0);
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:184:18: error: 'AD1CSS1' undeclared (first use in this function)
_SFR_WRITE(&AD1CSS1,0); // No channel scanning is used.
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:185:18: error: 'AD1CSS2' undeclared (first use in this function)
_SFR_WRITE(&AD1CSS2,0);
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:187:18: error: 'AD1CMPCON1' undeclared (first use in this function)
_SFR_WRITE(&AD1CMPCON1,0); // No digital comparators are used. Setting the AD1CMPCONx
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:188:18: error: 'AD1CMPCON2' undeclared (first use in this function)
_SFR_WRITE(&AD1CMPCON2,0); // register to ?0? ensures that the comparator is disabled. Other
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:189:18: error: 'AD1CMPCON3' undeclared (first use in this function)
_SFR_WRITE(&AD1CMPCON3,0); // registers are ?don?t care?.
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:190:18: error: 'AD1CMPCON4' undeclared (first use in this function)
_SFR_WRITE(&AD1CMPCON4,0);
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:191:18: error: 'AD1CMPCON5' undeclared (first use in this function)
_SFR_WRITE(&AD1CMPCON5,0);
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:192:18: error: 'AD1CMPCON6' undeclared (first use in this function)
_SFR_WRITE(&AD1CMPCON6,0);
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:194:18: error: 'AD1FLTR1' undeclared (first use in this function)
_SFR_WRITE(&AD1FLTR1,0); // No oversampling filters are used.
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:195:18: error: 'AD1FLTR2' undeclared (first use in this function)
_SFR_WRITE(&AD1FLTR2,0);
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:196:18: error: 'AD1FLTR3' undeclared (first use in this function)
_SFR_WRITE(&AD1FLTR3,0);
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:197:18: error: 'AD1FLTR4' undeclared (first use in this function)
_SFR_WRITE(&AD1FLTR4,0);
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:198:18: error: 'AD1FLTR5' undeclared (first use in this function)
_SFR_WRITE(&AD1FLTR5,0);
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:199:18: error: 'AD1FLTR6' undeclared (first use in this function)
_SFR_WRITE(&AD1FLTR6,0);
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:202:18: error: 'AD1TRG1' undeclared (first use in this function)
_SFR_WRITE(&AD1TRG1+(Channel/4),((_SFR_READ(&AD1TRG1)&((0x1F<<((Channel%4)*8))^0xFFFFFFFF))|(1<<((Channel%4)*8)))); // Set AN0 to trigger from software
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c: In function 'FC_CAL_ADC_Sample':
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:216:15: error: 'AD1CON3' undeclared (first use in this function)
_SFR_WRITE(&AD1CON3,((_SFR_READ(&AD1CON3)&0xBFFFFFFF)|0x40000000));
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:219:31: error: 'AD1DSTAT1' undeclared (first use in this function)
while (_SFR_BIT_READ(&AD1DSTAT1,MX_Current_Channel) == 0);
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:227:61: note: in definition of macro '_SFR_BIT_READ'
#define _SFR_BIT_READ(reg,pos) ( ( ( *((SFR_TYPE *)(reg)) )&(1<<(pos)) ) ? 1 : 0 )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:224:25: error: 'AD1DATA0' undeclared (first use in this function)
iRetVal = _SFR_READ(&AD1DATA0 + MX_Current_Channel);
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:226:51: note: in definition of macro '_SFR_READ'
#define _SFR_READ(reg) ( *((SFR_TYPE *)(reg)) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c: In function 'FC_CAL_ADC_Disable':
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:237:15: error: 'AD1TRG1' undeclared (first use in this function)
_SFR_WRITE(&AD1TRG1,0); // Initialize all sources to no trigger.
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:238:18: error: 'AD1TRG2' undeclared (first use in this function)
_SFR_WRITE(&AD1TRG2,0);
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:239:18: error: 'AD1TRG3' undeclared (first use in this function)
_SFR_WRITE(&AD1TRG3,0);
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:240:15: error: 'AD1CSS1' undeclared (first use in this function)
_SFR_WRITE(&AD1CSS1,0);
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:241:15: error: 'AD1CSS2' undeclared (first use in this function)
_SFR_WRITE(&AD1CSS2,0);
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:225:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:242:19: error: 'AD1CON1' undeclared (first use in this function)
_SFR_BIT_CLEAR(&AD1CON1,15);
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:229:57: note: in definition of macro '_SFR_BIT_CLEAR'
#define _SFR_BIT_CLEAR(reg,pos) ( *((SFR_TYPE *)((reg)+(1))) = 1<<(pos) )
^
C:\Program Files (x86)\Flowcode 7\compilers\pic32\bin\xc32-gcc.exe reported error code 255