Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Link Error: Cannot access symbol (_Yaxis) at an odd address.

Status
Not open for further replies.

Raady Here

Full Member level 5
Joined
Jun 8, 2013
Messages
242
Helped
26
Reputation
52
Reaction score
26
Trophy points
28
Location
India
Activity points
1,571
Hi ,

I am trying to update variables based on scanned letters from a function which scans the keypad.

Code:
// code for Keypad.c
extern Xaxis,Yaxis,Zaxis;
const unsigned char character[] = {'M' ,'1' ,'2' ,'3' ,'U' ,'4' ,'5' ,'6' ,'D' ,'7' ,'8' ,'9' ,'E' ,'S' ,'0' ,'C'};
 
Keypadscan()
{
       {
        // ...
        cKeyPad = character[ii];
       // ...
       }
       if(cKeyPad == 'M')        Xaxis = 1;
       if(cKeyPad == 'C')        Xaxis = 0;
       if(cKeyPad == 'U') {
            if(Yaxis > 0 )
                 Yaxis++;
       }
       cKeyPad = 0;
}

If I press M & C xaxis is getting updated. And If I press U I get a link error
Link Error: Cannot access symbol (_Yaxis) at an odd address.

I tried interchanging values of M to U but still the error persists.

Where could I be wrong ?

dspic30f5011/MPLAB 8.8v
Regards,
Raady.
 

hii.

You aren't declaring a type for the extern variables, the compiler probably assumes they are 16 bit However, if they are actually bytes then they can be at an odd address which then fails in your function.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top