This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Error L138 Problems

I'm using the latest version of DKARM kit and I'm still getting the L138 Error message. I've tried to get the attached files but it doesn't accept my serial number

Parents
  • Sorry...The link is
    http://www.keil.com/support/docs/2867.htm

    I get exactly the line where it happens.

    I use a macro defined like this:
    #define Chunk(type,variable,offset) (*((type*)(&(variable))+(offset)))

    I've used it to get a short var in the middle of a int,

    Chunk(char,longvar,1)=Chunk(uint8,shortvar,0);
    Chunk(char,longvar,2)=Chunk(uint8,shortvar,1);

    The problem is that shortvar is a function argument. I've copied it in a static local variable and the program now runs correctly

    Why??? I really don't know...

Reply
  • Sorry...The link is
    http://www.keil.com/support/docs/2867.htm

    I get exactly the line where it happens.

    I use a macro defined like this:
    #define Chunk(type,variable,offset) (*((type*)(&(variable))+(offset)))

    I've used it to get a short var in the middle of a int,

    Chunk(char,longvar,1)=Chunk(uint8,shortvar,0);
    Chunk(char,longvar,2)=Chunk(uint8,shortvar,1);

    The problem is that shortvar is a function argument. I've copied it in a static local variable and the program now runs correctly

    Why??? I really don't know...

Children