View previous topic :: View next topic |
Author |
Message |
Andreas
Joined: 25 Oct 2004 Posts: 136
|
|
Posted: Wed Oct 02, 2013 12:40 am |
|
|
Hello FvM
Thanks, you are right its looping from x52 to x56.
Thats the problem I have, I can't see how its coming there !
Also I reduced the code now to a "working" level, but can't find "the" line which is starting the troubles. I keep going on testing and let you know any result.
BTW I am using a PIC18F8722!
Many Thanks
Best regards
Andreas |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19401
|
|
Posted: Wed Oct 02, 2013 1:19 am |
|
|
What does the top of your listing file say?. RAM used, ROM used, stack used?.
I'd be terribly suspicious, that you are running out of space somewhere with debugging enabled. Hence the problem is just making the code any larger, and using debugging, rather than any single function....
Best Wishes |
|
|
Andreas
Joined: 25 Oct 2004 Posts: 136
|
|
Posted: Wed Oct 02, 2013 1:27 am |
|
|
Hello Ttelmah
Memory usage: ROM=25% RAM=67% - 67% After compiling with debug
Memory usage: ROM=25% RAM=67% - 67% after compiling with release
BUT, Your question lead me to another test, compiled with release and OOps program is working............
Any idea for that ???????????
best regards and Thanks
Andreas |
|
|
Andreas
Joined: 25 Oct 2004 Posts: 136
|
|
Posted: Wed Oct 02, 2013 1:28 am |
|
|
Hello Ttelmah
Forgot to tell you I am using ICD3 for Debugging
best regards
Andreas |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Wed Oct 02, 2013 2:04 am |
|
|
According to MPLAB help, 0x1FD2F-0x1FFFE is used for SW BP in ICD3 debugging, which pretty explains why the problem only occurs in debug build. It might be an MPLAB/ICD3 debug monitor fault, or a problem in your code respectively CCS C causing the program to run wild. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19401
|
|
Posted: Wed Oct 02, 2013 2:15 am |
|
|
I'd guess that the resource list for the ICD3, differs fractionally from the one for CCS's own debugging. So CCS is not reserving this area on this particular chip. However the listed resources look basically the same.
Reserve this area from being used by the code, though normally CCS would only write to the very top of memory like this, if the ROM was much fuller, or it was told to do so, if you make sure it doesn't use this area, it should allow things to work.
Double check you haven't got an ORG making the compiler use this area.
How are you switching between builds?. Using CCS itself, or MPLAB?.
Best Wishes |
|
|
Andreas
Joined: 25 Oct 2004 Posts: 136
|
|
Posted: Wed Oct 02, 2013 2:26 am |
|
|
Hello Ttelmah, FvM
Its going stranger, I had a call with a Microchip engineer, and he also told me that this area is used for SW breakpoints !
Now I have to find out how i can get rid of this.
I will try to install now CCS IDE and see if this will be the same result.
BTW, its not a Version 4 ver 5 conflict, result is the same in both !
Will keep you informed if i find a solution.
Many thanks for your help.
best regards
Andreas |
|
|
Andreas
Joined: 25 Oct 2004 Posts: 136
|
|
Posted: Wed Oct 02, 2013 2:40 am |
|
|
Hello to all that helped !
EUREKA
At least i got a work around - I using now CCS IDE with ICD-U64 and...
It works !!!!!
Thanks a lot for your valuable time I needed to discuss with you.
Will keep you informed if there is a solution with MPLAB - ICD3 - CCS compiler coming.
Now I have to get used to the CCS IDE which is in some places not so comfortable.
BTW is there a way to show in the Watch Window the content of a buffer in chars AND in Hex representation ?
Best regards and have a nice day
Andreas |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19401
|
|
Posted: Wed Oct 02, 2013 3:51 am |
|
|
Try reserving the area, it may make everything work.
Code: |
//After your chip defines, and before the code
#ORG 0x1FD30, 0x1FFFF { }
#ORG DEFAULT
#RESERVE 0xEEF:0xEFF
#RESERVE 0xF9C,0xFD4,0xFFC
#RESERVE 0xFDB:0xFDF
#RESERVE 0xFE3:0xFE7
#RESERVE 0xFEB:0xFEF
#RESERVE 0xFFD:0xFFF
|
That should ensure the compiler does not use any of the ROM/RAM, required by the debugger.
I have just checked, and the compiler defaults to reserving from 1FCC0 to 1FFFF for ICD with this chip on V5, so it should not be putting anything here....
If that works, you don't have to learn a different environment.
The behaviour is actually what you would get, if CCS, was not being switched to compile for ICD, and you then tried to debug.
Best Wishes |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Wed Oct 02, 2013 5:21 am |
|
|
Conflicts of reserved areas are usually reported by MPLAB. It can be also easily determined in CCS symbol
files and MPLAB setting dialogs, if the application image occupies the area. |
|
|
Andreas
Joined: 25 Oct 2004 Posts: 136
|
|
Posted: Sun Oct 06, 2013 3:08 am |
|
|
Hello Friends and to all who tried to help !
I am sorry for the Long delay with answering, but I was very busy to get my Project on the way.
I have found a solution and also I found a a reason for this behaviour, unfortunatly I cant solve it........................
The solution is: Using the CCS IDE and a ICD-U64 instead of unsing MPLAB 8.92 and an ICD3 !!!
In the many tries I did, I found out that the same program which Fails in the debug mode is quite running in program mode !!!
So the reason for my Problem is, that the IDE produces a conflict in the Memory area which is reserved for the debug code !
BTW,Reserving this area brings up an error that says this area is reserved for the Debugger !!!!
Using the CCS IDE an running the program compilde with same Compiler !!!!!
is runnig perfect in debug mode and in Programming mode !!!!!!!
So, therefore I will try to send an Report to Microchip, maybe they will find the reason for this.
unfortunatly I didnt find a program snippnet which is ver short and produdes the same error, so I think it will take a while to convince MC to work on this really Major Problem !!
Just imagine, Your Programm has about 2000 Lines, You add just one single line like "strcopy(Buffer1, Buffer2,100);" And from nowon the Program hangs in a 20 Step case Statement. You remove this line - it works again !
After 2 Days You include this line on anther place - it still works ....
best regards and Thanks for Your outstanding Responses.
Andreas ( Vienna, Austria) |
|
|
|