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

XC800, IDATA not used

I'm running into the dreaded L107 (DATA space), so I checked all the .lst files and took a look at the largest one:

MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =   3806    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----      89
   IDATA SIZE       =   ----    ----
   BIT SIZE         =      1       8
   EDATA SIZE       =   ----    ----
   HDATA SIZE       =   ----    ----
   XDATA CONST SIZE =   ----    ----
   FAR CONST SIZE   =   ----    ----
END OF MODULE INFORMATION.

What's extraordinary about this, is that all DATA variables summed up only come together to 30 bytes. There is however plenty of IDATA usage, which is apparently all accounted for as DATA usage.

I've tried moving some more variables from DATA to IDATA, leading the L107 to complain about just that much more DATA usage.

How do I make C51/LX51 acknowledge the existence of IDATA? As far as I can tell it should just work out of the box.

BTW, message preview claims I'm from the US, even though I selected Germany.

Parents
  • This matter has been resolved with the Keil support.

    The issue is that C51 ignores explicit memory types in function parameters and always uses the primary type of memory depending on the memory model (i.e. data for small, pdata for compact and xdata for large).

    Whereas I have used the convention that parameters be passed in idata. Both compilers I use (SDCC and C51) pass parameters in registers when possible, but SDCC passes the remainder in the specified memory. I wrongly assumed that C51 behaves in a similar manner.

    To my defence, if this information is anywhere in the documentation, it must be really hard to find.

Reply
  • This matter has been resolved with the Keil support.

    The issue is that C51 ignores explicit memory types in function parameters and always uses the primary type of memory depending on the memory model (i.e. data for small, pdata for compact and xdata for large).

    Whereas I have used the convention that parameters be passed in idata. Both compilers I use (SDCC and C51) pass parameters in registers when possible, but SDCC passes the remainder in the specified memory. I wrongly assumed that C51 behaves in a similar manner.

    To my defence, if this information is anywhere in the documentation, it must be really hard to find.

Children
No data