How do I get rid of the "copydown" warnings?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do I get rid of the "copydown" warnings?

Jump to solution
913 Views
MikeM
Contributor III

I've search everywhere for an answer to this and nothing solves my problem. I am using CodeWarrior Development Studio 10.4 to develop code for the MC9S08DZ16CLC 32 pin device. The code is all in "C". I am getting 5 warning message that read similar to this:

 

"No copydown created for initialized object [some variable]. Initialization data lost."

 

One of the variables flagged was "progVersion" defined globally as:

const char *progVersion = "V1.3";

It went away when I changed it to:

const char progVersion[] = { 'V', '1', '.', '3', 0 };

which I don't quite understand.

 

All the other variables flagged are all defined "static" within a function. However, not all of them get flagged with a warning. Here is a code snippet showing an example:

 

static void stepperPositionDriver(void)

{

    enum {

        eNORMAL = 0,

        eABRUPT_CHANGE,

        eRAMP_DOWN

    };

    static int stepperDriveState = eNORMAL;

    static int previousTarget = -1;

    static bool accelerating = TRUE;

    int distCur, distNew;

 

Both "previousTarget" and "accelerating" are being flagged but not "stepperDriveState". Why would some be flagged but not others throughout the program? I am having the prm file automatically generated. I tried turning that off and putting in a "COPY" command in the prm file but that did nothing.

Can someone please help?

Labels (1)
0 Kudos
1 Solution
470 Views
MikeM
Contributor III

Thank you very very much! I would have never found that otherwise. Problem solved!

View solution in original post

0 Kudos
3 Replies
470 Views
MikeM
Contributor III

Am I the only one who's ever had this problem?

0 Kudos
471 Views
JimDon
Senior Contributor III

Search on "copydown".

Read this, not sure if it solves your problem, but it is more information:

https://community.freescale.com/message/66863#66863

0 Kudos
471 Views
MikeM
Contributor III

Thank you very very much! I would have never found that otherwise. Problem solved!

0 Kudos