Helpful Replyerror : undeclared (first use in this function)

Author
electronicelement
New Member
  • Total Posts : 11
  • Reward points : 0
  • Joined: 2013/12/03 13:46:43
  • Location: Italia
  • Status: offline
2013/12/05 10:57:43 (permalink)
0

error : undeclared (first use in this function)

Hi , i bought pic24 dev board and truly 3,2 lcd board , i'm new with pic24 i always used pic16-18 etc , i got a problem i'm not able to solve , i get this error message :
 
make -f nbproject/Makefile-PIC24F_GB106_SK.mk SUBPROJECTS= .build-confmake[1]: Entering directory `C:/Users/Claudio/Desktop/PIC24F Starter Kit 1/MPLAB.X'make  -f nbproject/Makefile-PIC24F_GB106_SK.mk dist/PIC24F_GB106_SK/production/MPLAB.X.production.hexmake[2]: Entering directory `C:/Users/Claudio/Desktop/PIC24F Starter Kit 1/MPLAB.X'"C:\Program Files (x86)\Microchip\xc16\v1.20\bin\xc16-gcc.exe"   ../../Microchip/Graphics/Drivers/SH1101A_SSD1303.c  -o build/PIC24F_GB106_SK/production/_ext/62016858/SH1101A_SSD1303.o  -c -mcpu=24FJ256DA210  -MMD -MF "build/PIC24F_GB106_SK/production/_ext/62016858/SH1101A_SSD1303.o.d"      -g -omf=elf -mlarge-code -O0 -I".." -I"../../Microchip/Include" -I"../../Microchip/Include/Graphics" -I"../../Microchip/Include/USB" -I"../../Microchip/USB" -I"../../Microchip/Include/MDD File System" -msmart-io=1 -Wall -msfr-warn=off -fno-ivopts../../Microchip/Include/Graphics/gfxpmp.h: In function 'DeviceWrite':In file included from ../../Microchip/Include/Graphics/SH1101A_SSD1303.h:51:0,                 from ../../Microchip/Graphics/Drivers/SH1101A_SSD1303.c:54:../../Microchip/Include/Graphics/gfxpmp.h:181:2: error: 'PMMODEbits' undeclared (first use in this function)../../Microchip/Include/Graphics/gfxpmp.h:181:2: note: each undeclared identifier is reported only once for each function it appears in../../Microchip/Include/Graphics/gfxpmp.h: In function 'DeviceRead':../../Microchip/Include/Graphics/gfxpmp.h:222:2: error: 'PMMODEbits' undeclared (first use in this function)../../Microchip/Include/Graphics/gfxpmp.h:223:2: error: 'PMCONbits' undeclared (first use in this function)../../Microchip/Include/Graphics/gfxpmp.h: In function 'SingleDeviceRead':../../Microchip/Include/Graphics/gfxpmp.h:263:2: error: 'PMMODEbits' undeclared (first use in this function)../../Microchip/Include/Graphics/gfxpmp.h: In function 'DeviceReadWord':../../Microchip/Include/Graphics/gfxpmp.h:302:2: error: 'PMMODEbits' undeclared (first use in this function)../../Microchip/Include/Graphics/gfxpmp.h: In function 'DriverInterfaceInit':../../Microchip/Include/Graphics/gfxpmp.h:344:5: error: 'PMMODE' undeclared (first use in this function)../../Microchip/Include/Graphics/gfxpmp.h:345:5: error: 'PMAEN' undeclared (first use in this function)../../Microchip/Include/Graphics/gfxpmp.h:346:5: error: 'PMCON' undeclared (first use in this function)../../Microchip/Include/Graphics/gfxpmp.h:347:5: error: 'PMMODEbits' undeclared (first use in this function)../../Microchip/Include/Graphics/gfxpmp.h:382:5: error: 'PMCONbits' undeclared (first use in this function)make[2]: Leaving directory `C:/Users/Claudio/Desktop/PIC24F Starter Kit 1/MPLAB.X'make[1]: Leaving directory `C:/Users/Claudio/Desktop/PIC24F Starter Kit 1/MPLAB.X'make[2]: *** [build/PIC24F_GB106_SK/production/_ext/62016858/SH1101A_SSD1303.o] Error 255make[1]: *** [.build-conf] Error 2make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 3s)
 
 
Any idea :) ? thank's in advance who can save me .
 
 
#1
maxruben
Super Member
  • Total Posts : 3074
  • Reward points : 0
  • Joined: 2011/02/22 03:35:11
  • Location: Sweden
  • Status: offline
Re:error : undeclared (first use in this function) 2013/12/05 12:09:05 (permalink) ☄ Helpful
+1 (1)
You are trying to build a project for PIC24F_GB106 (according to the makefile name) but you are using a PIC24FJ256DA210. PMMODE and PMCON registers doesn't seem to exist for this processor.
 
Use a project for the PIC24FJ256DA210 instead.
 
/Ruben
 
#2
electronicelement
New Member
  • Total Posts : 11
  • Reward points : 0
  • Joined: 2013/12/03 13:46:43
  • Location: Italia
  • Status: offline
Re:error : undeclared (first use in this function) 2013/12/05 12:23:02 (permalink)
0
Thank you ruben , i found only this project in microchip example following instructions , called pic24Fdemo and i miss to verify the basic configurations. Now i will search the right demo. mr green
#3
maxruben
Super Member
  • Total Posts : 3074
  • Reward points : 0
  • Joined: 2011/02/22 03:35:11
  • Location: Sweden
  • Status: offline
Re:error : undeclared (first use in this function) 2013/12/05 23:58:47 (permalink)
0
Have you downloaded the MLA?
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2680&dDocName=en547784
You should find what you are looking for in the graphics library.
 
/Ruben
 
#4
electronicelement
New Member
  • Total Posts : 11
  • Reward points : 0
  • Joined: 2013/12/03 13:46:43
  • Location: Italia
  • Status: offline
Re:error : undeclared (first use in this function) 2013/12/06 00:48:20 (permalink)
0
hello 
yes i got MAL V2013-06-15 where i found the wrong project for a different pic24, as you detected , just i dont find the project for my demo , The folder contents are shown in attached file , pnly one is for pic24F (the wrong) pink
 
 
 
 

Attached Image(s)

#5
maxruben
Super Member
  • Total Posts : 3074
  • Reward points : 0
  • Joined: 2011/02/22 03:35:11
  • Location: Sweden
  • Status: offline
Re:error : undeclared (first use in this function) 2013/12/06 01:46:19 (permalink)
+1 (1)
Which dev board is it? The PIC24FJ256DA210 board?
 
If you are using MPLABX you should be able to load a demo application, the Multi-App for example and select the build configuration for your board, display and controller.
 
/Ruben
 
 
#6
maxruben
Super Member
  • Total Posts : 3074
  • Reward points : 0
  • Joined: 2011/02/22 03:35:11
  • Location: Sweden
  • Status: offline
Re:error : undeclared (first use in this function) 2013/12/06 01:54:15 (permalink) ☄ Helpful
0
Just had a quick look and there is a PIC24F DA folder under the Graphics folder in the MLA.
 
/Ruben
 
 
#7
electronicelement
New Member
  • Total Posts : 11
  • Reward points : 0
  • Joined: 2013/12/03 13:46:43
  • Location: Italia
  • Status: offline
Re:error : undeclared (first use in this function) 2013/12/06 02:16:01 (permalink)
0
ok i found multi-app and now :
 
make -f nbproject/Makefile-PIC24_GA110_GFXv3_EX16_8PMP_WQVGAv1_SDMSD.mk SUBPROJECTS= .build-confmake[1]: Entering directory `C:/Users/Claudio/Desktop/MAL/Graphics/Multi-App/MPLAB.X'make  -f nbproject/Makefile-PIC24_GA110_GFXv3_EX16_8PMP_WQVGAv1_SDMSD.mk dist/PIC24_GA110_GFXv3_EX16_8PMP_WQVGAv1_SDMSD/production/MPLAB.X.production.hexmake[2]: Entering directory `C:/Users/Claudio/Desktop/MAL/Graphics/Multi-App/MPLAB.X'"C:\Program Files (x86)\Microchip\xc16\v1.20\bin\xc16-gcc.exe"   "../../../Board Support Package/SST25VF016.c"  -o build/PIC24_GA110_GFXv3_EX16_8PMP_WQVGAv1_SDMSD/production/_ext/1687970324/SST25VF016.o  -c -mcpu=24FJ256DA210  -MMD -MF "build/PIC24_GA110_GFXv3_EX16_8PMP_WQVGAv1_SDMSD/production/_ext/1687970324/SST25VF016.o.d"      -g -omf=elf -mlarge-code -mlarge-data -mlarge-scalar -mconst-in-code -Os -I"../../../Board Support Package" -I".." -I"../../../Microchip/Include" -I"../../Common" -I"../../../Microchip/Include/Image Decoders" -I"../../../Microchip/Include/MDD File System" -I"../../../Microchip/Include/Graphics" -DCFG_INCLUDE_MPLAB_X -DCFG_INCLUDE_GFXv3_EX16_8PMP_SDMSD_WQVGAv1 -msmart-io=1 -msfr-warn=off -fno-ivoptsOptions have been disabled due to restricted licenseVisit http://www.microchip.com/ to purchase a new key."C:\Program Files (x86)\Microchip\xc16\v1.20\bin\xc16-gcc.exe"   "../../../Board Support Package/SST39VF040.c"  -o build/PIC24_GA110_GFXv3_EX16_8PMP_WQVGAv1_SDMSD/production/_ext/1687970324/SST39VF040.o  -c -mcpu=24FJ256DA210  -MMD -MF "build/PIC24_GA110_GFXv3_EX16_8PMP_WQVGAv1_SDMSD/production/_ext/1687970324/SST39VF040.o.d"      -g -omf=elf -mlarge-code -mlarge-data -mlarge-scalar -mconst-in-code -Os -I"../../../Board Support Package" -I".." -I"../../../Microchip/Include" -I"../../Common" -I"../../../Microchip/Include/Image Decoders" -I"../../../Microchip/Include/MDD File System" -I"../../../Microchip/Include/Graphics" -DCFG_INCLUDE_MPLAB_X -DCFG_INCLUDE_GFXv3_EX16_8PMP_SDMSD_WQVGAv1 -msmart-io=1 -msfr-warn=off -fno-ivoptsOptions have been disabled due to restricted licenseVisit http://www.microchip.com/ to purchase a new key."C:\Program Files (x86)\Microchip\xc16\v1.20\bin\xc16-gcc.exe"   "../../../Board Support Package/TouchScreen.c"  -o build/PIC24_GA110_GFXv3_EX16_8PMP_WQVGAv1_SDMSD/production/_ext/1687970324/TouchScreen.o  -c -mcpu=24FJ256DA210  -MMD -MF "build/PIC24_GA110_GFXv3_EX16_8PMP_WQVGAv1_SDMSD/production/_ext/1687970324/TouchScreen.o.d"      -g -omf=elf -mlarge-code -mlarge-data -mlarge-scalar -mconst-in-code -Os -I"../../../Board Support Package" -I".." -I"../../../Microchip/Include" -I"../../Common" -I"../../../Microchip/Include/Image Decoders" -I"../../../Microchip/Include/MDD File System" -I"../../../Microchip/Include/Graphics" -DCFG_INCLUDE_MPLAB_X -DCFG_INCLUDE_GFXv3_EX16_8PMP_SDMSD_WQVGAv1 -msmart-io=1 -msfr-warn=off -fno-ivoptsOptions have been disabled due to restricted licenseVisit http://www.microchip.com/ to purchase a new key."C:\Program Files (x86)\Microchip\xc16\v1.20\bin\xc16-gcc.exe"   "../../../Board Support Package/TouchScreenResistive.c"  -o build/PIC24_GA110_GFXv3_EX16_8PMP_WQVGAv1_SDMSD/production/_ext/1687970324/TouchScreenResistive.o  -c -mcpu=24FJ256DA210  -MMD -MF "build/PIC24_GA110_GFXv3_EX16_8PMP_WQVGAv1_SDMSD/production/_ext/1687970324/TouchScreenResistive.o.d"      -g -omf=elf -mlarge-code -mlarge-data -mlarge-scalar -mconst-in-code -Os -I"../../../Board Support Package" -I".." -I"../../../Microchip/Include" -I"../../Common" -I"../../../Microchip/Include/Image Decoders" -I"../../../Microchip/Include/MDD File System" -I"../../../Microchip/Include/Graphics" -DCFG_INCLUDE_MPLAB_X -DCFG_INCLUDE_GFXv3_EX16_8PMP_SDMSD_WQVGAv1 -msmart-io=1 -msfr-warn=off -fno-ivoptsOptions have been disabled due to restricted licenseVisit http://www.microchip.com/ to purchase a new key.../../../Board Support Package/TouchScreenResistive.c: In function 'TouchDetectPosition':../../../Board Support Package/TouchScreenResistive.c:333:13: error: 'AD1PCFGbits' undeclared (first use in this function)../../../Board Support Package/TouchScreenResistive.c:333:13: note: each undeclared identifier is reported only once for each function it appears in../../../Board Support Package/TouchScreenResistive.c: In function 'TouchHardwareInit':../../../Board Support Package/TouchScreenResistive.c:532:6: error: 'AD1PCFGbits' undeclared (first use in this function)make[2]: *** [build/PIC24_GA110_GFXv3_EX16_8PMP_WQVGAv1_SDMSD/production/_ext/1687970324/TouchScreenResistive.o] Error 255make[1]: *** [.build-conf] Error 2make[2]: Leaving directory `C:/Users/Claudio/Desktop/MAL/Graphics/Multi-App/MPLAB.X'make[1]: Leaving directory `C:/Users/Claudio/Desktop/MAL/Graphics/Multi-App/MPLAB.X'make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 10s)
 
I need a key ?  pink i'm using lite , if i need key i buy now . ( pink )
 
#8
electronicelement
New Member
  • Total Posts : 11
  • Reward points : 0
  • Joined: 2013/12/03 13:46:43
  • Location: Italia
  • Status: offline
Re:error : undeclared (first use in this function) 2013/12/06 03:03:54 (permalink)
0
hi
this is what i get now :
i can buy key , but i'm not sure this is the problem pink  actually i'm running xc16 lite .
 
 

Attached Image(s)

#9
maxruben
Super Member
  • Total Posts : 3074
  • Reward points : 0
  • Joined: 2011/02/22 03:35:11
  • Location: Sweden
  • Status: offline
Re:error : undeclared (first use in this function) 2013/12/06 04:30:52 (permalink) ☄ Helpful
+1 (1)
No, you don't need a key. You can disable optimizations from project properties to get rid of those messages. But it is still the wrong project, the Multi App wasn't a good example, as I noticed later. Test a project in the PIC24F DA folder instead.
 
/Ruben
 
 
#10
Jump to:
© 2017 APG vNext Commercial Version 4.5