Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Strange ERROR.MCP file coming up Robot not programming! (http://www.chiefdelphi.com/forums/showthread.php?t=46896)

Salik Syed 26-04-2006 13:21

Strange ERROR.MCP file coming up Robot not programming!
 
Okay so all of a sudden whenever we try to program we get this strange error.mcp file that opens after the program is done downloading, the robot does NOT program, the status bar just goes to full and then this pops up:

Code:

008000 BF 00 00 00 00 00 01 00 00 00 01 00 00 00 00 00
008010 00 01 00 00 00 00 01 00 00 00 00 00 00 01 00 00
008020 00 01 00 00 00 03 00 00 00 00 00 00 00 00 00 00
008050 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00
008080 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0080A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03
0080D0 00 00 00 00 00 00 00 00 00 00 00 00 00 03 00 00
008120 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 01
008130 01 01 FF FF FF FF FF FF FF FF FF FF FF FF FF FF

we are using firmware 1.1 IFI loader v. 1.0.12
i don't know why this happens because up until recently it was working perfectly ! ???

Salik Syed 26-04-2006 13:26

Re: Strange ERROR.MCP file coming up Robot not programming!
 
okay I think it may be because our program is too big? because a small program works fine ...!!?! although i did go into compile options and change it to use the 64k Large code model

i still don't understand why that should cause a problem

Salik Syed 26-04-2006 13:37

Re: Strange ERROR.MCP file coming up Robot not programming!
 
Okay figured it out,
I don't know the reasoning behind this... but for anyone with similar problems:
DO NOT switch to large code model
switch to the Multi-Bank Stack model...
this worked for me... I had a lot of ROM data tables etc.. i'm not aware of low level stuff like memory but this worked

Alan Anderson 29-04-2006 23:07

Re: Strange ERROR.MCP file coming up Robot not programming!
 
Quote:

Originally Posted by Salik Syed
we are using firmware 1.1 IFI loader v. 1.0.12
i don't know why this happens because up until recently it was working perfectly ! ???

Isn't the latest IFI loader version 1.1.0? The error.mcp dump starting at address 8000 usually means that your program size has exceeded the limit of the older IFI loader.

Doug G 29-04-2006 23:15

Re: Strange ERROR.MCP file coming up Robot not programming!
 
Our mistake, we installed Version 1.1 of IFI Loader and all is well. For some reason we thought firmware 1.1 meant version 1.1 - oops.

jerry w 08-05-2006 21:46

Re: Strange ERROR.MCP file coming up Robot not programming!
 
Quote:

Originally Posted by Salik Syed
Okay figured it out,
I don't know the reasoning behind this... but for anyone with similar problems:
DO NOT switch to large code model
switch to the Multi-Bank Stack model...
this worked for me... I had a lot of ROM data tables etc.. i'm not aware of low level stuff like memory but this worked

we had the same problem. thanks for the solution. here is the reason.

the stack in a pic is designed to use a single block of data memory.
using dynamic variables inside a function tells the compiler to use stack space for data storage. but, with many variables, you quickly run out of stack space. with the robot controller, there is usually more than enough data space to allow for static variables. the limit, as we discovered, is on the size of the stack. we fixed the error by making the local variables static.

in addition, the compiler must add code to setup and then cleanup the stack inside of a function. the extra code slows down processing. thus I recommend that all local variables be declared static, as a way to reduce program size and prevent stack problems.

for example...
Code:

void Camera_State_Machine(unsigned char byte)
{
        static unsigned char state = UNSYNCHRONIZED;
        static unsigned char packet_buffer[34];
        static unsigned char packet_buffer_index;
        static unsigned char packet_char_count;

jerry w


All times are GMT -5. The time now is 07:32.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi