CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Crashing ONLY on debug

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Langton



Joined: 29 Nov 2009
Posts: 25

View user's profile Send private message

Crashing ONLY on debug
PostPosted: Thu Nov 08, 2012 11:04 pm     Reply with quote

Hi Guys (and Gals),

PCH 4.137
Windows 7
MPLABX
18F45K22

Everything was sweet (except a EEPROM write bug which I suspected may have been to do with the compiler 4.132) so I did an update to 4.137 and now it can clean and build but as soon as I go to debug it crashes. I can program after a build so my Real Ice has no dramas. The ONLY thing that has changed is the 4.137. I re-did the project from scratch in case there was a make file drama or something like that, but no joy there either. Searched Google, came up with a couple of things but no success. Any suggestions please?

here is what MPLABX says...

Code:
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory `Z:/Analogue firmware/SWCauto2/SWCauto2.X'
make  -f nbproject/Makefile-default.mk dist/default/debug/SWCauto2.X.debug.cof
make[2]: Entering directory `Z:/Analogue firmware/SWCauto2/SWCauto2.X'
gnumkdir -p build/default/debug
gnumkdir -p dist/default/debug
"C:\PROGRA~1\PICCH\CCSC.exe"  out="dist/default/debug"  "SWCauto2.c" +FH +DF  #__DEBUG=1 +ICD +Y=9 +EA +DF +LN +T +A +M +J +ES +Z +PE #__18F45K22=TRUE
make[2]: *** [build/default/debug/SWCauto2.o] Error -1073741819
make[1]: *** [.build-conf] Error 2
make[2]: Leaving directory `Z:/Analogue firmware/SWCauto2/SWCauto2.X'
make[1]: Leaving directory `Z:/Analogue firmware/SWCauto2/SWCauto2.X'
make: *** [.build-impl] Error 2

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



Joined: 11 Mar 2010
Posts: 19499

View user's profile Send private message

PostPosted: Mon Nov 12, 2012 3:24 am     Reply with quote

How much ROM is your code using (when you build it without DEBUG)?. Is it using more with the new compiler than the old?.
Have you got the debug patch for PIC18F46K22 loaded?. This applies to your chip as well (it ought to be called PIC18xxK22), and causes a problem programming an area of memory just below the debug executive.

Best Wishes
gpsmikey



Joined: 16 Nov 2010
Posts: 588
Location: Kirkland, WA

View user's profile Send private message

PostPosted: Mon Nov 12, 2012 9:54 am     Reply with quote

Does that debug patch apply to Mplabx? From reading the post at Microchip, it seemed to indicate that it only affected MPLAB 8.63 and was going to be fixed in the February release. http://www.microchip.com/forums/m552373.aspx (I'm busy working on my little project with the 18f25k22, so this is very interesting - normally I trip over these things).

mikey
_________________
mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3
Ttelmah



Joined: 11 Mar 2010
Posts: 19499

View user's profile Send private message

PostPosted: Mon Nov 12, 2012 10:05 am     Reply with quote

It is one of those 'some people get it' problems.
It is _only_ an issue if your code is putting data at the top of memory, right adjacent to the debug executive. Hence my question about 'size'. Have had loads of people working on code using these chips, without ever hitting this issue, but a few people have hit it, and then the fix seems to work.
My 'thought', was that the new compiler, might be making the code a fraction larger (possibly the EEPROM fix taking more space...), and hence hitting this problem. The problem vanishes when debug is not running, which would also 'fit' with the behaviour.
The fix, simply reprograms the address that MPLAB thinks is the size of the chip. It is meant not to apply to latter releases of MPLAB (they claimed it was fixed six months or more ago), but I've still seem people getting intermittent problems here.

Best Wishes
Langton



Joined: 29 Nov 2009
Posts: 25

View user's profile Send private message

PostPosted: Mon Nov 12, 2012 1:46 pm     Reply with quote

I agree that is seem exactly like a similar patch is required. I checked and it is 8.63 only, that problem must have made a few people lose some hair. Yesterday I sent all the data to support and I've just (30min ago) went back to 4.132 which is now working perfectly, better the devil I know for now. Thanks guys for your replies, hopefully this will help someone else down the track
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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