![](templates/subSilver/images/CCSLogo.jpg) |
![CCS C Software and Maintenance Offers](templates/subSilver/images/forumAd6.jpg) |
View previous topic :: View next topic |
Author |
Message |
eacc3525
Joined: 21 Nov 2012 Posts: 2 Location: Austin, TX
|
MPLAB X(Debug Mode): Access violation in mod PCH.dll |
Posted: Wed Nov 21, 2012 11:11 am |
|
|
First time using MPLAB X. Tried to build PIC18F6627 program in debug mode but build failed with the error below:
***********************************************************
Code: | CLEAN SUCCESSFUL (total time: 62ms)
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory `C:/Users/ecastro/MPLABXProjects/OpticsXTest.X'
make -f nbproject/Makefile-default.mk dist/default/debug/OpticsXTest.X.debug.cof
make[2]: Entering directory `C:/Users/ecastro/MPLABXProjects/OpticsXTest.X'
gnumkdir -p build/default/debug/_ext/1472
gnumkdir -p dist/default/debug
"C:\PROGRA~2\PICC\CCSCON.exe" out="dist/default/debug" ../OpticsPdLed.c +FH +DF #__DEBUG=1 +ICD +Y=9 +EA I+="C:\Program Files (x86)\PICC\Devices" I+="C:\Program Files (x86)\PICC\Drivers" +DF +LN +T +A +M +J +EA +Z -P #__18F6627=TRUE
C:\Users\ecastro\MPLABXProjects\pd-led.h:44:7: Info#300 More info: ** Access violation at address 02C65C5C in module 'PCH.dll'. Read of address 534F4E24
C:\Users\ecastro\MPLABXProjects\pd-led.h:44:7: Error#44 Internal Error - Contact CCS
1 Errors, 0 Warnings.
Build Failed.
mv: cannot stat `dist/default/debug/OpticsPdLed.cof': No such file or directory
make[2]: Leaving directory `C:/Users/ecastro/MPLABXProjects/OpticsXTest.X'
make[2]: *** [build/default/debug/_ext/1472/OpticsPdLed.o] Error 1
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory `C:/Users/ecastro/MPLABXProjects/OpticsXTest.X'
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 765ms) |
************************************************************
The MPLAB X build for same PIC18F6627 using production mode finished sucesfully. Build output below:
**********************************************************
Code: | CLEAN SUCCESSFUL (total time: 124ms)
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory `C:/Users/ecastro/MPLABXProjects/OpticsXTest.X'
make -f nbproject/Makefile-default.mk dist/default/production/OpticsXTest.X.production.hex
make[2]: Entering directory `C:/Users/ecastro/MPLABXProjects/OpticsXTest.X'
gnumkdir -p build/default/production/_ext/1472
gnumkdir -p dist/default/production
"C:\PROGRA~2\PICC\CCSCON.exe" out="dist/default/production" ../OpticsPdLed.c +FH +DF +Y=9 +EA I+="C:\Program Files (x86)\PICC\Devices" I+="C:\Program Files (x86)\PICC\Drivers" +DF +LN +T +A +M +J +EA +Z -P #__18F6627=TRUE
Memory usage: ROM=15% RAM=8% - 9%
0 Errors, 0 Warnings.
Build Successful.
gnumkdir -p dist/default/production
make[2]: Leaving directory `C:/Users/ecastro/MPLABXProjects/OpticsXTest.X'
make[1]: Leaving directory `C:/Users/ecastro/MPLABXProjects/OpticsXTest.X'
BUILD SUCCESSFUL (total time: 1s)
Loading code from C:/Users/ecastro/MPLABXProjects/OpticsXTest.X/dist/default/production/OpticsXTest.X.production.hex...
Loading symbols from C:/Users/ecastro/MPLABXProjects/OpticsXTest.X/dist/default/production/OpticsXTest.X.production.cof...
Loading completed |
**********************************************************
Any ideas? |
|
![](templates/subSilver/images/spacer.gif) |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Nov 21, 2012 1:58 pm |
|
|
Quote: | C:\Users\ecastro\MPLABXProjects\pd-led.h:44:7: Info#300 More info: ** Access violation at address 02C65C5C in module 'PCH.dll'. Read of address 534F4E24
C:\Users\ecastro\MPLABXProjects\pd-led.h:44:7: Error#44 Internal Error - Contact CCS
|
It doesn't like what it sees on that line in pd-led.h.
Post that line. Or post that line, and several lines before and after it. |
|
![](templates/subSilver/images/spacer.gif) |
eacc3525
Joined: 21 Nov 2012 Posts: 2 Location: Austin, TX
|
|
Posted: Wed Nov 21, 2012 4:55 pm |
|
|
Thank you for the reply.
Line 44 of pd-led.h is the last line in the code block below. Please Notice that all the individual #FUSES lines before the last one are commented out.
Code: | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fuses ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/*
#FUSES HS //High speed Osc (> 4mhz for PCM/PCH) (>10mhz for PCD)
#FUSES NOFCMEN //Fail-safe clock monitor disabled
#FUSES NOIESO //Internal External Switch Over mode disabled
#FUSES NOPUT //No Power Up Timer
#FUSES BROWNOUT //Brownout reset
#FUSES BORV27 //Brownout reset at 2.7V
#FUSES NOWDT //No Watch Dog Timer
#FUSES NOLPT1OSC //Timer1 configured for higher power operation
#FUSES MCLR //Master Clear pin enabled
#FUSES NOSTVREN //Stack full/underflow will not cause reset
#FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#FUSES NOXINST //Extended set extension and Indexed Addressing mode disabled (Legacy mode)
#FUSES NOPROTECT //Code not protected from reading
#FUSES NOCPD //No EE protection
#FUSES NOWRT //Program memory not write protected
#FUSES NOWRTC //configuration not registers write protected
#FUSES NOWRTD //Data EEPROM not write protected
#FUSES NOEBTR //Memory not protected from table reads
*/
#FUSES HS,NOFCMEN,NOIESO,NOPUT,BROWNOUT,BORV27,NOWDT,NOLPT1OSC,MCLR,NOSTVREN,NOLVP,NOXINST,NOPROTECT,NOCPD,NOWRT,NOWRTC,NOWRTD,NOEBTR |
After adding these fuses one by one to the #FUSES line, I found out that the issue is with the fuse NOEBTR at the end.
Coding a second #FUSES Line solved the problem.
Code: | #FUSES HS,NOFCMEN,NOIESO,NOPUT,BROWNOUT,BORV27,NOWDT,NOLPT1OSC,MCLR,NOSTVREN,NOLVP,NOXINST,NOPROTECT,NOCPD,NOWRT,NOWRTC,NOWRTD
#FUSES NOEBTR |
Looks like I hit a max character per line limitation some where.
Would the two #FUSES lines work as expected? I mean, Can I split my #FUSES list between two lines? |
|
![](templates/subSilver/images/spacer.gif) |
temtronic
Joined: 01 Jul 2010 Posts: 9173 Location: Greensville,Ontario
|
|
Posted: Wed Nov 21, 2012 6:10 pm |
|
|
It 'should' work and obviously would only take you a couple minutes to prove or disprove.There 'might' be differences in compiler versions ?
With the newer PICs that have a LOT of fuses, I now have an #include projectname-fuses.fuz line. Once I have the correct settings for 'fuses' I create the file that gets loaded into the program. It saves me a lot of typing as fuses tend to be 'constant' for a PIC type,makes the 'main' program easier to read(fuses are 'hidden'.but are correct).
I do the same thing for I/O pin usage.A similar file(projectname-pins.pin) that is included which details ALL the I/O pins of the PIC used in the project.Again, makes it easier for me.
hth
jay |
|
![](templates/subSilver/images/spacer.gif) |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Nov 21, 2012 6:10 pm |
|
|
Yes, you can have more than one #fuses line. It's OK. |
|
![](templates/subSilver/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|