Compiling error when ADC used
Posted: Tue Sep 26, 2017 8:09 pm
Hello,
I tried to use ADC in my project but this gives an error when compiling.
De compiler wordt gestart...
C:\Program Files (x86)\Flowcode 7\compilers\pic32\bin\xc32-gcc.exe -mprocessor=32MX550F256H -O1 -o "D:\PROJEC~1\METALT~1\240C\24C789~1\Flowcode\201709~1\ModBus_Slave_PIC32MX550_0926.elf" "D:\PROJEC~1\METALT~1\240C\24C789~1\Flowcode\201709~1\ModBus_Slave_PIC32MX550_0926.c"
In file included from D:\PROJEC~1\METALT~1\240C\24C789~1\Flowcode\201709~1\ModBus_Slave_PIC32MX550_0926.c:69:0:
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:71:19: error: 'AD1PCFG' undeclared (first use in this function)
_SFR_BIT_CLEAR(&AD1PCFG,Channel);
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:231: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\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:71:19: note: each undeclared identifier is reported only once for each function it appears in
_SFR_BIT_CLEAR(&AD1PCFG,Channel);
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:231: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\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c: In function 'FC_CAL_ADC_Disable':
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:116:15: error: 'AD1PCFG' undeclared (first use in this function)
_SFR_WRITE(&AD1PCFG,0xFFFF);
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:227:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\compilers\pic32\bin\xc32-gcc.exe gerapporteerde foutcode 255
KLAAR
Seems undeclared variables in CAL_ADC function is not responding
Any help?
I tried to use ADC in my project but this gives an error when compiling.
De compiler wordt gestart...
C:\Program Files (x86)\Flowcode 7\compilers\pic32\bin\xc32-gcc.exe -mprocessor=32MX550F256H -O1 -o "D:\PROJEC~1\METALT~1\240C\24C789~1\Flowcode\201709~1\ModBus_Slave_PIC32MX550_0926.elf" "D:\PROJEC~1\METALT~1\240C\24C789~1\Flowcode\201709~1\ModBus_Slave_PIC32MX550_0926.c"
In file included from D:\PROJEC~1\METALT~1\240C\24C789~1\Flowcode\201709~1\ModBus_Slave_PIC32MX550_0926.c:69:0:
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:71:19: error: 'AD1PCFG' undeclared (first use in this function)
_SFR_BIT_CLEAR(&AD1PCFG,Channel);
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:231: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\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:71:19: note: each undeclared identifier is reported only once for each function it appears in
_SFR_BIT_CLEAR(&AD1PCFG,Channel);
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:231: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\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c: In function 'FC_CAL_ADC_Disable':
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_ADC.c:116:15: error: 'AD1PCFG' undeclared (first use in this function)
_SFR_WRITE(&AD1PCFG,0xFFFF);
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:227:51: note: in definition of macro '_SFR_WRITE'
#define _SFR_WRITE(reg,val) ( *((SFR_TYPE *)(reg)) = (val) )
^
C:\Program Files (x86)\Flowcode 7\compilers\pic32\bin\xc32-gcc.exe gerapporteerde foutcode 255
KLAAR
Seems undeclared variables in CAL_ADC function is not responding
Any help?