AnsweredAssumed Answered

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

Question asked by Mike Maddi on Aug 2, 2013
Latest reply on Aug 5, 2013 by Mike Maddi

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?

Outcomes