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

IData Declaration

Hello everyone,

I am using an 8051W device with uVision V4.02, working with an external C Tester and it's not recognizing the terms "idata" or "xdata". While I can create workarounds to this (ie make a specific compilation without these included), I'm trying to find a way to do this correctly.

When I searched through all the include files, the closest I can find to any references to IData is a line in my ISD51.H file that says:

#define RAMSIZE 0x100 // default is 0x100 => 256 bytes IDATA RAM

Unfortunately, this doesn't really declare it in a way that would be understandable to a universal C checker. I'm guessing the declaration of IData is something specific to the framework of Keil (though I could be wrong).

Does anyone know how to get the declaration of idata in universal terms that I might be able to place into the C tester that might declare what IData is in terms an external tester might recognize? (example: if I had a special variable, say, slong32 that one compiler recognized but the tester did not, I could add "typedef signed long slong32" and it would resolve the issue).

It's possible I just need to create a workaround but I thought you guys are the experts and might be able to point me the right direction.

I apologize if I left out any important information in order to answer this question. If I missed anything, please let me know and I'll try and find that information. Thanks!

Parents
  • Sorry but that idata is a language extension needed to support a special functionality of the 8051 architecture - the architecture have multiple overlapping address spaces.

    So the closest you can get is to "kill" the keyword by having an empty #define

    #define idata
    #define xdata
    

    This obviously will not make that C tester able to verify correct data types in the source code, since the keywords idata and xdata really are important parts of the data types - just as "volatile" is important.

    The question here is if your C tester have some support for addition of extra data type attributes - Keil C51 isn't the only compiler that needs some extras. Some compilers might have __near and __far to specify small and large pointers, or maybe variables stored in a memory region that requires the address-of operator to result in a far pointer.

Reply
  • Sorry but that idata is a language extension needed to support a special functionality of the 8051 architecture - the architecture have multiple overlapping address spaces.

    So the closest you can get is to "kill" the keyword by having an empty #define

    #define idata
    #define xdata
    

    This obviously will not make that C tester able to verify correct data types in the source code, since the keywords idata and xdata really are important parts of the data types - just as "volatile" is important.

    The question here is if your C tester have some support for addition of extra data type attributes - Keil C51 isn't the only compiler that needs some extras. Some compilers might have __near and __far to specify small and large pointers, or maybe variables stored in a memory region that requires the address-of operator to result in a far pointer.

Children