• AVR Freaks

Helpful ReplyLockedCan't find perpiheral/adc10.h

Author
GEPhil
Starting Member
  • Total Posts : 47
  • Reward points : 0
  • Joined: 2013/08/13 04:07:35
  • Location: UK
  • Status: offline
2016/02/04 08:56:35 (permalink)
0

Can't find perpiheral/adc10.h

I've had similar to the chap who couldn't find plib.h, when I searched the filestore for it and put that path into the complier's search paths I got
 
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/plib.h:41:30: fatal error: peripheral/adc10.h: No such file or directory
 
I was trying to build a FreeRTOS demo program. I've a suspicion the .h files being requested are those relevant to the C32 compiler.
 
As a matter of interest, when you add a .c file to the Project, MPLABX knows it has to compile that file. When you add a .h file to the project, MPLABX apparently doesn't bother to tell the compiler where to go looking for it, you have to edit the compiler's search paths explicitly. Seems a bit of a drop-off to me!

"Working" software has only unobserved bugs
#1
davekw7x
Entropy++
  • Total Posts : 1746
  • Reward points : 0
  • Joined: 2012/01/16 12:01:07
  • Location: Left Coast, USA
  • Status: offline
Re: Can't find perpiheral/adc10.h 2016/02/04 10:59:42 (permalink) ☄ Helpfulby GEPhil 2016/02/05 05:10:05
+2 (4)
1.  Revisit the Microchip web page from where you downloaded XC32 version 1.40
 
2.  Click the "Downloads" tab and scroll down the page until you see "Legacy Peripheral Libraries"
 
3.  Download and install the appropriate one for your platform.
 
 
Regards,

Dave

Sometimes I just can't help myself...
#2
GEPhil
Starting Member
  • Total Posts : 47
  • Reward points : 0
  • Joined: 2013/08/13 04:07:35
  • Location: UK
  • Status: offline
Re: Can't find perpiheral/adc10.h 2016/02/05 05:19:17 (permalink)
0
I did as davekw7x suggested, several of the errors went away and new ones occurred. Ideally I'd like to be building for a PIC32MZ1024EFF100 (ultimately that's my target cpu, I don't have one yet so for now will be happy with simulation) but I get quite a lot of errors when the MZ1024 is the target. I tried building for a MX target and got fewer errors:
CLEAN SUCCESSFUL (total time: 343ms)
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Users/phil/FreeRTOS/DownloadedSamples/source-code-for-PIC32-examples/Examples/Example001/RTOSDemo.X'
make -f nbproject/Makefile-default.mk dist/default/production/RTOSDemo.X.production.hex
make[2]: Entering directory 'C:/Users/phil/FreeRTOS/DownloadedSamples/source-code-for-PIC32-examples/Examples/Example001/RTOSDemo.X'
In file included from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/sys/types.h:68:0,
from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/stdio.h:80,
from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/sys/appio.h:38,
from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/xc.h:747,
from ../../../FreeRTOS_Source/portable/portmacro.h:70,
from ../../../FreeRTOS_Source/include/portable.h:319,
from ../../../FreeRTOS_Source/include/FreeRTOS.h:88,
from ../../../FreeRTOS_Source/list.c:68:
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/machine/endian.h:66:5: warning: assertions are a deprecated extension [-Wdeprecated]
#if #endian(big) || defined(__MIPSEB__) || defined(MIPSEB)
^
<more like the above snipped>
../../../FreeRTOS_Source/portable/port.c:118:1: warning: Interrupt priority IPL1 is deprecated. Specify as 'IPL1{AUTO|SOFT|SRS}' instead. [enabled by default]
extern void __attribute__( (interrupt(ipl1), vector( configTICK_INTERRUPT_VECTOR ))) vPortTickInterruptHandler( void );
^
<more like the above snipped>
In file included from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/adc10.h:45:0,
from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/plib.h:49,
from ../main.c:68:
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/int.h:49:4: warning: #warning The PLIB functions and macros in this file will be removed from the MPLAB XC32 C/C++ Compiler in future releases [-Wcpp]
#warning The PLIB functions and macros in this file will be removed from the MPLAB XC32 C/C++ Compiler in future releases
^
<more like the above snipped>
"C:\Program Files (x86)\Microchip\xc32\v1.40\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MX795F512H "-IC:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c" -DPIC32_STARTER_KIT -I../../../FreeRTOS_Source/demo_code -I../../../FreeRTOS_Source/portable -I../../../FreeRTOS_Source/include -I.. -Wall -MMD -MF build/default/production/_ext/1472/main.o.d -o build/default/production/_ext/1472/main.o ../main.c
"C:\Program Files (x86)\Microchip\xc32\v1.40\bin\xc32-gcc.exe" -mprocessor=32MX795F512H -o dist/default/production/RTOSDemo.X.production.elf build/default/production/_ext/159026119/tasks.o build/default/production/_ext/159026119/heap_3.o build/default/production/_ext/159026119/list.o build/default/production/_ext/159026119/queue.o build/default/production/_ext/1632132495/port_asm.o build/default/production/_ext/1632132495/port.o build/default/production/_ext/1472/main.o build/default/production/_ext/622371955/basic_io.o -Wl,--defsym=__MPLAB_BUILD=1,--defsym=_min_heap_size=10240,-L"C:/devtools/Microchip/MPLAB C32/lib",-L"C:/devtools/Microchip/MPLAB C32/pic32mx/lib",-L"..",-Map="dist/default/production/RTOSDemo.X.production.map",--memorysummary,dist/default/production/memoryfile.xml
nbproject/Makefile-default.mk:213: recipe for target 'dist/default/production/RTOSDemo.X.production.hex' failed
make[2]: Leaving directory 'C:/Users/phil/FreeRTOS/DownloadedSamples/source-code-for-PIC32-examples/Examples/Example001/RTOSDemo.X'
build/default/production/_ext/622371955/basic_io.o: In function `vSetIOBuffering':
nbproject/Makefile-default.mk:78: recipe for target '.build-conf' failed
c:/users/phil/freertos/downloadedsamples/source-code-for-pic32-examples/freertos_source/demo_code/basic_io.c:79: undefined reference to `_libc_data'
<more unsatisfied references to _libc_data>
collect2.exe: error: ld returned 255 exit status
make[2]: *** [dist/default/production/RTOSDemo.X.production.hex] Error 255
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2



BUILD FAILED (exit value 2, total time: 5s)
 
and for the MZ1024 build:
CLEAN SUCCESSFUL (total time: 328ms)
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Users/phil/FreeRTOS/DownloadedSamples/source-code-for-PIC32-examples/Examples/Example001/RTOSDemo.X'
make -f nbproject/Makefile-default.mk dist/default/production/RTOSDemo.X.production.hex
make[2]: Entering directory 'C:/Users/phil/FreeRTOS/DownloadedSamples/source-code-for-PIC32-examples/Examples/Example001/RTOSDemo.X'
In file included from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/sys/types.h:68:0,
from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/stdio.h:80,
from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/sys/appio.h:38,
from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/xc.h:747,
from ../../../FreeRTOS_Source/portable/portmacro.h:70,
from ../../../FreeRTOS_Source/include/portable.h:319,
from ../../../FreeRTOS_Source/include/FreeRTOS.h:88,
from ../../../FreeRTOS_Source/heap_3.c:85:
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/machine/endian.h:66:5: warning: assertions are a deprecated extension [-Wdeprecated]
#if #endian(big) || defined(__MIPSEB__) || defined(MIPSEB)
^
<several more like this snipped>
../../../FreeRTOS_Source/portable/port.c:118:1: warning: Interrupt priority IPL1 is deprecated. Specify as 'IPL1{AUTO|SOFT|SRS}' instead. [enabled by default]
extern void __attribute__( (interrupt(ipl1), vector( configTICK_INTERRUPT_VECTOR ))) vPortTickInterruptHandler( void );
^
../../../FreeRTOS_Source/portable/port.c:126:1: warning: Interrupt priority IPL1 is deprecated. Specify as 'IPL1{AUTO|SOFT|SRS}' instead. [enabled by default]
void __attribute__( (interrupt(ipl1), vector(_CORE_SOFTWARE_0_VECTOR))) vPortYieldISR( void );
^
"C:\Program Files (x86)\Microchip\xc32\v1.40\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MZ1024EFF100 "-IC:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c" -DPIC32_STARTER_KIT -I../../../FreeRTOS_Source/demo_code -I../../../FreeRTOS_Source/portable -I../../../FreeRTOS_Source/include -I.. -Wall -MMD -MF build/default/production/_ext/1632132495/port.o.d -o build/default/production/_ext/1632132495/port.o ../../../FreeRTOS_Source/portable/port.c
<more endian warnings snipped>
In file included from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/adc10.h:45:0,
from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/plib.h:49,
from ../main.c:68:
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/int.h:49:4: warning: #warning The PLIB functions and macros in this file will be removed from the MPLAB XC32 C/C++ Compiler in future releases [-Wcpp]
#warning The PLIB functions and macros in this file will be removed from the MPLAB XC32 C/C++ Compiler in future releases
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/int.h:81:10: error: token ""EF"" is not valid in preprocessor expressions
#elif (((__PIC32_FEATURE_SET__ >= 100) && (__PIC32_FEATURE_SET__ <= 299)) || defined(__32MXGENERIC__))
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/int.h:83:10: error: token ""EF"" is not valid in preprocessor expressions
#elif ((__PIC32_FEATURE_SET__ >= 300) && (__PIC32_FEATURE_SET__ <= 499))
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/int.h:85:10: error: token ""EF"" is not valid in preprocessor expressions
#elif (((__PIC32_FEATURE_SET__ >= 500) && (__PIC32_FEATURE_SET__ <= 799)) || defined (__32MXPOCONO__))
^
In file included from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/adc10.h:45:0,
from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/plib.h:49,
from ../main.c:68:
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/int.h:88:4: error: #error "Device not supported by the interrupt peripheral library"
#error "Device not supported by the interrupt peripheral library"
^
In file included from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/int.h:96:0,
from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/adc10.h:45,
from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/plib.h:49,
from ../main.c:68:
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/legacy/int_legacy.h:47:4: warning: #warning The PLIB functions and macros in this file will be removed from the MPLAB XC32 C/C++ Compiler in future releases [-Wcpp]
#warning The PLIB functions and macros in this file will be removed from the MPLAB XC32 C/C++ Compiler in future releases
^
In file included from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/adc10.h:45:0,
from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/plib.h:49,
from ../main.c:68:
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/int.h:119:58: error: '_INTCON_SS0_MASK' undeclared here (not in a function)
INT_REGISTOR_SET_SELECT_SS0 /*DOM-IGNORE-BEGIN*/ = (_INTCON_SS0_MASK) /*DOM-IGNORE-END*/
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/int.h: In function 'INTGetInterruptVectorNumber':
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/int.h:547:38: error: '__INTSTATbits_t' has no member named 'VEC'
return (unsigned int)(INTSTATbits.VEC);
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/int.h: At top level:
In file included from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/adc10.h:45:0,
from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/plib.h:49,
from ../main.c:68:
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/int.h:654:19: error: unknown type name 'INT_SOURCE'
void INTClearFlag(INT_SOURCE source);
^
< more of these snipped >
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/int.h:810:27: error: unknown type name 'INT_VECTOR'
void INTSetVectorPriority(INT_VECTOR vector, INT_PRIORITY priority);
^
< more of these snipped >
In file included from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/plib.h:49:0,
from ../main.c:68:
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/adc10.h:54:4: warning: #warning The PLIB functions and macros in this file will be removed from the MPLAB XC32 C/C++ Compiler in future releases [-Wcpp]
#warning The PLIB functions and macros in this file will be removed from the MPLAB XC32 C/C++ Compiler in future releases
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/adc10.h:314:10: error: token ""EF"" is not valid in preprocessor expressions
#elif (((__PIC32_FEATURE_SET__ >= 100) && (__PIC32_FEATURE_SET__ <= 299)) || defined(__32MXGENERIC__))
< more of these snipped >



C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/dma.h:83:4: error: #error "Device not supported by the DMA peripheral library"
#error "Device not supported by the DMA peripheral library"
^
< more of these snipped >
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/ports.h:323:11: error: token ""EF"" is not valid in preprocessor expressions
#elif (((__PIC32_FEATURE_SET__ >= 100) && (__PIC32_FEATURE_SET__ <= 299)) || defined(__32MXGENERIC__))
^
< more of these snipped >
In file included from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/plib.h:63:0,
from ../main.c:68:
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/power.h:52:4: warning: #warning The PLIB functions and macros in this file will be removed from the MPLAB XC32 C/C++ Compiler in future releases [-Wcpp]
#warning The PLIB functions and macros in this file will be removed from the MPLAB XC32 C/C++ Compiler in future releases
^
< more of these snipped >



C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/rtcc.h: In function 'RtccGetClkStat':
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/rtcc.h:941:45: error: '__OSCCONbits_t' has no member named 'SOSCRDY'
if( (!(OSCCONbits.SOSCEN)) || (!(OSCCONbits.SOSCRDY)) )
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/rtcc.h: In function 'RtccWrEnable':
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/rtcc.h:1036:3: warning: implicit declaration of function 'DmaSuspend' [-Wimplicit-function-declaration]
mSysUnlockOpLock(RTCCONSET=_RTCCON_RTCWREN_MASK);
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/rtcc.h:1036:3: warning: implicit declaration of function 'DmaResume' [-Wimplicit-function-declaration]
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/rtcc.h: In function 'RtccSelectPulseOutput':
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/rtcc.h:1156:13: error: '_RTCCON_RTSECSEL_MASK' undeclared (first use in this function)
RTCCONSET=_RTCCON_RTSECSEL_MASK;
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/rtcc.h:1156:13: note: each undeclared identifier is reported only once for each function it appears in
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/legacy/rtcc_legacy.h: At top level:
In file included from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/rtcc.h:1320:0,
from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/plib.h:65,
from ../main.c:68:
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/legacy/rtcc_legacy.h:55:4: warning: #warning The PLIB functions and macros in this file will be removed from the MPLAB XC32 C/C++ Compiler in future releases [-Wcpp]
#warning The PLIB functions and macros in this file will be removed from the MPLAB XC32 C/C++ Compiler in future releases
^
In file included from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/plib.h:66:0,
from ../main.c:68:
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/spi.h:50:4: warning: #warning The PLIB functions and macros in this file will be removed from the MPLAB XC32 C/C++ Compiler in future releases [-Wcpp]
#warning The PLIB functions and macros in this file will be removed from the MPLAB XC32 C/C++ Compiler in future releases
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/spi.h:73:10: error: token ""EF"" is not valid in preprocessor expressions
#elif (((__PIC32_FEATURE_SET__ >= 100) && (__PIC32_FEATURE_SET__ <= 299)) || defined(__32MXGENERIC__))
^
< more of these snipped >
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/spi.h:80:5: error: #error "Device not supported by the SPI peripheral library"
# error "Device not supported by the SPI peripheral library"
^
In file included from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/system.h:58:0,
from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/plib.h:67,
from ../main.c:68:
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/osc.h:53:4: warning: #warning The PLIB functions and macros in this file will be removed from the MPLAB XC32 C/C++ Compiler in future releases [-Wcpp]
#warning The PLIB functions and macros in this file will be removed from the MPLAB XC32 C/C++ Compiler in future releases
^
<snipped similar to previous errors>
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/osc.h: In function 'OSCSetPBDIV':
In file included from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/system.h:58:0,
from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/plib.h:67,
from ../main.c:68:
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/osc.h:218:12: error: '__OSCCONbits_t' has no member named 'w'
oscBits.w=OSCCON; // read to be in sync. flush any pending write
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/osc.h:219:12: error: '__OSCCONbits_t' has no member named 'PBDIV'
oscBits.PBDIV=0;
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/osc.h:220:12: error: '__OSCCONbits_t' has no member named 'w'
oscBits.w|=oscPbDiv;
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/osc.h:221:19: error: '__OSCCONbits_t' has no member named 'w'
OSCCON=oscBits.w; // write back
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/osc.h:222:12: error: '__OSCCONbits_t' has no member named 'w'
oscBits.w=OSCCON; // make sure the write occurred before returning from this function
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/osc.h:214:20: warning: variable 'oscBits' set but not used [-Wunused-but-set-variable]
__OSCCONbits_t oscBits;
^
<snip>
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/system.h: In function 'SYSTEMConfigPB':
In file included from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/system.h:58:0,
from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/plib.h:67,
from ../main.c:68:
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/osc.h:237:39: error: '_OSCCON_PBDIV_POSITION' undeclared (first use in this function)
#define OSC_PB_DIV_2 (1 << _OSCCON_PBDIV_POSITION)
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/system.h:130:16: note: in expansion of macro 'OSC_PB_DIV_2'
pb_div=OSC_PB_DIV_2;
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/system.h: In function 'SYSTEMConfigWaitStates':
In file included from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/plib.h:59:0,
from ../main.c:68:
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/pcache.h:73:29: error: 'CHECON' undeclared (first use in this function)
#define mCheConfigure(val) (CHECON = (val))
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/system.h:189:5: note: in expansion of macro 'mCheConfigure'
mCheConfigure(wait_states);
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/system.h: In function 'SYSTEMConfigWaitStatesAndPB':
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/pcache.h:73:29: error: 'CHECON' undeclared (first use in this function)
#define mCheConfigure(val) (CHECON = (val))
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/system.h:246:5: note: in expansion of macro 'mCheConfigure'
mCheConfigure(wait_states);
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/system.h: In function 'SYSTEMConfigPerformance':
In file included from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/plib.h:50:0,
from ../main.c:68:
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/bmx.h:85:37: error: 'BMXCONCLR' undeclared (first use in this function)
#define mBMXDisableDRMWaitState() (BMXCONCLR = _BMXCON_BMXWSDRM_MASK)
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/system.h:295:5: note: in expansion of macro 'mBMXDisableDRMWaitState'
mBMXDisableDRMWaitState();
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/bmx.h:85:49: error: '_BMXCON_BMXWSDRM_MASK' undeclared (first use in this function)
#define mBMXDisableDRMWaitState() (BMXCONCLR = _BMXCON_BMXWSDRM_MASK)
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/system.h:295:5: note: in expansion of macro 'mBMXDisableDRMWaitState'
mBMXDisableDRMWaitState();
^
In file included from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/plib.h:59:0,
from ../main.c:68:
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/pcache.h:137:22: error: 'CHECON' undeclared (first use in this function)
#define mCheGetCon() CHECON
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/system.h:298:20: note: in expansion of macro 'mCheGetCon'
cache_status = mCheGetCon();
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/pcache.h:101:38: error: '_CHECON_PREFEN_POSITION' undeclared (first use in this function)
#define CHE_CONF_PF_ALL (3 << _CHECON_PREFEN_POSITION)
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/system.h:299:21: note: in expansion of macro 'CHE_CONF_PF_ALL'
cache_status |= CHE_CONF_PF_ALL;
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/system.h: In function 'SYSTEMConfig':
In file included from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/plib.h:50:0,
from ../main.c:68:
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/bmx.h:85:37: error: 'BMXCONCLR' undeclared (first use in this function)
#define mBMXDisableDRMWaitState() (BMXCONCLR = _BMXCON_BMXWSDRM_MASK)
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/system.h:356:5: note: in expansion of macro 'mBMXDisableDRMWaitState'
mBMXDisableDRMWaitState();
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/bmx.h:85:49: error: '_BMXCON_BMXWSDRM_MASK' undeclared (first use in this function)
#define mBMXDisableDRMWaitState() (BMXCONCLR = _BMXCON_BMXWSDRM_MASK)
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/system.h:356:5: note: in expansion of macro 'mBMXDisableDRMWaitState'
mBMXDisableDRMWaitState();
^
In file included from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/plib.h:59:0,
from ../main.c:68:
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/pcache.h:137:22: error: 'CHECON' undeclared (first use in this function)
#define mCheGetCon() CHECON
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/system.h:372:24: note: in expansion of macro 'mCheGetCon'
cache_status = mCheGetCon();
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/pcache.h:101:38: error: '_CHECON_PREFEN_POSITION' undeclared (first use in this function)
#define CHE_CONF_PF_ALL (3 << _CHECON_PREFEN_POSITION)
^
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/system.h:373:25: note: in expansion of macro 'CHE_CONF_PF_ALL'
cache_status |= CHE_CONF_PF_ALL;
^
In file included from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/plib.h:67:0,
from ../main.c:68:
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/system.h:380:26: error: '__OSCCONbits_t' has no member named 'PBDIV'
pb_clk >>= OSCCONbits.PBDIV;
^
<snip>
../main.c:75:9: error: unknown value for configuration setting 'FPLLODIV': 'DIV_1'
#pragma config FPLLODIV = DIV_1, FPLLMUL = MUL_20, FPLLIDIV = DIV_2
^
../main.c:75:9: error: unknown configuration setting: 'FPLLMUL'
../main.c:76:9: error: unknown configuration setting: 'FPBDIV'
#pragma config FWDTEN = OFF, FPBDIV = DIV_2, POSCMOD = XT, FNOSC = PRIPLL, CP = OFF
^
../main.c:76:9: error: unknown value for configuration setting 'POSCMOD': 'XT'
../main.c:76:9: error: unknown value for configuration setting 'FNOSC': 'PRIPLL'
../main.c:77:9: error: unknown configuration setting: 'FSRSSEL'
#pragma config FSRSSEL = PRIORITY_7
^
../main.c: In function 'vSetupEnvironment':
"C:\Program Files (x86)\Microchip\xc32\v1.40\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MZ1024EFF100 "-IC:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c" -DPIC32_STARTER_KIT -I../../../FreeRTOS_Source/demo_code -I../../../FreeRTOS_Source/portable -I../../../FreeRTOS_Source/include -I.. -Wall -MMD -MF build/default/production/_ext/1472/main.o.d -o build/default/production/_ext/1472/main.o ../main.c
In file included from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/system.h:58:0,
from C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/plib.h:67,
from ../main.c:68:
nbproject/Makefile-default.mk:185: recipe for target 'build/default/production/_ext/1472/main.o' failed
make[2]: Leaving directory 'C:/Users/phil/FreeRTOS/DownloadedSamples/source-code-for-PIC32-examples/Examples/Example001/RTOSDemo.X'
nbproject/Makefile-default.mk:78: recipe for target '.build-conf' failed
make[1]: Leaving directory 'C:/Users/phil/FreeRTOS/DownloadedSamples/source-code-for-PIC32-examples/Examples/Example001/RTOSDemo.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
C:/Program Files (x86)/Microchip/xc32/v1.40/pic32-libs/include/lega-c/peripheral/osc.h:237:39: error: '_OSCCON_PBDIV_POSITION' undeclared (first use in this function)
#define OSC_PB_DIV_2 (1 << _OSCCON_PBDIV_POSITION)
^
../main.c:170:16: note: in expansion of macro 'OSC_PB_DIV_2'
mOSCSetPBDIV( OSC_PB_DIV_2 );
^
make[2]: *** [build/default/production/_ext/1472/main.o] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2



BUILD FAILED (exit value 2, total time: 4s)

"Working" software has only unobserved bugs
#3
andersm
Super Member
  • Total Posts : 2590
  • Reward points : 0
  • Joined: 2012/10/07 14:57:44
  • Location: 0
  • Status: offline
Re: Can't find perpiheral/adc10.h 2016/02/05 05:35:52 (permalink)
+1 (1)
The MZ is not supported in PLIB. For the other warnings, whoever supplied the sample program should modernize it to work with current compiler versions.
#4
GEPhil
Starting Member
  • Total Posts : 47
  • Reward points : 0
  • Joined: 2013/08/13 04:07:35
  • Location: UK
  • Status: offline
Re: Can't find perpiheral/adc10.h 2016/02/05 05:36:28 (permalink)
0
So I've looked further at other related threads, and found that I can build for the MX795 processor, if I tick "use legacy libc" in the xc32 global options. That's a little better, but what I want to do now is whatever is needed to get it to build fir the MZ1024.
 

"Working" software has only unobserved bugs
#5
GEPhil
Starting Member
  • Total Posts : 47
  • Reward points : 0
  • Joined: 2013/08/13 04:07:35
  • Location: UK
  • Status: offline
Re: Can't find perpiheral/adc10.h 2016/02/05 05:37:39 (permalink)
0
andersm
The MZ is not supported in PLIB. For the other warnings, whoever supplied the sample program should modernize it to work with current compiler versions.


Thanks. I'll do it myself if I can find out how to go about it :)

"Working" software has only unobserved bugs
#6
NKurzman
A Guy on the Net
  • Total Posts : 17379
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: online
Re: Can't find perpiheral/adc10.h 2016/02/05 06:53:38 (permalink) ☄ Helpfulby GEPhil 2016/02/05 07:13:57
0
You should be able to use the Harmony PLib with out using Harmony if that is where you are going.
#7
GEPhil
Starting Member
  • Total Posts : 47
  • Reward points : 0
  • Joined: 2013/08/13 04:07:35
  • Location: UK
  • Status: offline
Re: Can't find perpiheral/adc10.h 2016/02/05 07:14:53 (permalink)
0
Eventually I do expect to be using harmony so that's a good thought :)

"Working" software has only unobserved bugs
#8
Mysil
Super Member
  • Total Posts : 3324
  • Reward points : 0
  • Joined: 2012/07/01 04:19:50
  • Location: Norway
  • Status: offline
Re: Can't find perpiheral/adc10.h 2016/02/05 09:20:08 (permalink) ☄ Helpfulby GEPhil 2016/02/08 02:26:53
+1 (1)
Hi,
There is no 10 bit ADC in PIC32MZ.
The 12 bit pipelined ADC hardware in PIC32MZ is very different from the 10 bit ADC in PIC32MX and have all different control register names and fields.
 
Oscillator hardware is different, so #pragma config  specifications will need to be coded for MZ, and oscillator control registers have differences. In PIC32MZ_EF, the secondary oscillator status bit have been moved to CLKSTAT register, so testing: CLKSTATbits.SOSCRDY should work instead of OSCCONbits.SOSCRDY
 
Another difference is that for all interrupt sources, Interrupt ReQuest number (IRQ) and Interrupt Vector number (VECTOR) are identical in MZ. While this is tidy and practical, someone got an idea to simplify, and didn't define IRQ numbers in the Device Support files for PIC32MZ. So _CORE_SOFTWARE_0_VECTOR will work, but _CORE_SOFTWARE_0_IRQ will not work on MZ unless you do something to define it.
 
As you have observed and andersm mentioned, Microchip didn't bother to port PLIB to support PIC32MZ.
This have been a source of frustration and angry messages in this forum.
 
To make it worse, someone have defined the macro __PIC32_FEATURE_SET__ to some ugly combination of characters that cannot be tested in C preprocessor directives.
So if you have code testing __PIC32_FEATURE_SET__ values, you must first test if it is a MZ device defined, and enclose those tests in a #elif or #else block, something like:
        #ifdef __PIC32MZ
                pDcpt->pConR->regSet = pDcpt->analogMask & inputs;
        #elif ((__PIC32_FEATURE_SET__ == 330) || (__PIC32_FEATURE_SET__ == 350) || (__PIC32_FEATURE_SET__ == 370) || (__PIC32_FEATURE_SET__ == 430) || (__PIC32_FEATURE_SET__ == 450) || (__PIC32_FEATURE_SET__ == 470) \
                || ((__PIC32_FEATURE_SET__ >= 100) && (__PIC32_FEATURE_SET__ <= 299)))
                pDcpt->pConR->regSet = pDcpt->analogMask & inputs;
        #else
                pDcpt->pConR->regClr = pDcpt->analogMask & inputs;
        #endif 

 
So to get your program to work on PIC32MZ, you may either rewrite those parts using PLIB macro's or functions, or port those parts you need from PIC32MX to function on MZ.
Attached are some pieces of code that I have modified, to see what can be done, but it have not been tested on MZ hardware.
 
Regards,
   Mysil

Attachment(s)

Attachments are not available: Download requirements not met
#9
GEPhil
Starting Member
  • Total Posts : 47
  • Reward points : 0
  • Joined: 2013/08/13 04:07:35
  • Location: UK
  • Status: offline
Re: Can't find perpiheral/adc10.h 2016/02/08 02:38:36 (permalink)
0
@Mysil thank you for a helpful reply :)

"Working" software has only unobserved bugs
#10
GEPhil
Starting Member
  • Total Posts : 47
  • Reward points : 0
  • Joined: 2013/08/13 04:07:35
  • Location: UK
  • Status: offline
Re: Can't find perpiheral/adc10.h 2016/02/09 08:21:20 (permalink)
+1 (1)
andersm
The MZ is not supported in PLIB. For the other warnings, whoever supplied the sample program should modernize it to work with current compiler versions.


There IS a later version of FreeRTOS incl the demo programs. Downloaded.
There IS a later version of Harmony. Downloaded.
 
error: 'LATHSET' undeclared ... so far I've not found any references to it in any of the downloaded code or .h files
 
I assume it's a reference to a register that doesn't exist on an EFF100 processor (you find LATG on 64 pin cpus, and LATH on 144 pin jobs), so to get the code to build I just told MPLABX I'm building for a 144 pin cpu ... I'm not worried too much about the hardware as all I want to do for now is simulate with MPLABX. So, that has worked, and left me with undefined references to various functions, within the demo code. This I shall have to resolve myself.
 
 

"Working" software has only unobserved bugs
#11
Mysil
Super Member
  • Total Posts : 3324
  • Reward points : 0
  • Joined: 2012/07/01 04:19:50
  • Location: Norway
  • Status: offline
Re: Can't find perpiheral/adc10.h 2016/02/09 09:59:17 (permalink)
+1 (1)
Sorry,
Port H  exists on devices in packages with 124 and 144 pins only.
Port J   exists on 144 pin devices only.
 
   Mysil
post edited by Mysil - 2016/02/09 10:17:07
#12
CRuff
New Member
  • Total Posts : 4
  • Reward points : 0
  • Joined: 2008/10/27 14:48:14
  • Location: 0
  • Status: offline
Re: Can't find perpiheral/adc10.h 2016/02/10 15:57:05 (permalink)
0
davekw7x
 
thanks!  it cost me a few hours to finally find your post about the peripheral lib not being in the latest xc32 compiler release.
 
What sukks is that the file "plib.h" is in the directories in a couple places. I was screwing around with environment variables!!
Thanks again
 
Chris
 
#13
chipmonk
Starting Member
  • Total Posts : 43
  • Reward points : 0
  • Joined: 2012/01/23 07:20:30
  • Location: 0
  • Status: offline
Re: Can't find perpiheral/adc10.h 2016/08/25 07:54:14 (permalink)
0
So how is this problem solved ????? Microchip can stink at times!
#14
NKurzman
A Guy on the Net
  • Total Posts : 17379
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: online
Re: Can't find perpiheral/adc10.h 2016/08/25 09:27:08 (permalink)
0
The MZ does not have 10 bits?
The Plib does not come with the compiler?
The Plib does not support the MZ?
which problem?
#15
DECORME Sébastien
New Member
  • Total Posts : 18
  • Reward points : 0
  • Joined: 2014/04/01 06:40:33
  • Location: 0
  • Status: offline
Re: Can't find perpiheral/adc10.h 2016/08/26 01:15:49 (permalink)
+1 (1)
you can remove some errors with this
#define _SUPPRESS_PLIB_WARNING
#define _DISABLE_OPENADC10_CONFIGPORT_WARNING //ADC Warming is disenable
#16
Jump to:
© 2019 APG vNext Commercial Version 4.5