Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

pdata in small model

Help
2010-11-27
2013-03-12
  • Hi

    I'm trying to port a project from Keil to SDCC.
    Specifying small model in both.
    Keil places all variables in internal RAM.
    SDCC places  a good deal of variables as pdata.
    The program uses pointers to pdata to maintain a circular buffer, and that will conflict with the variables that SDCC places as pdata.
    How can I force SDCC to use internal RAM?
    By definition it should just use internal RAM in the small model.

    Any help would be much appreciated.

    Regards
    FlemmingK

     
  • Sorry, the correct description is as follows:
    I'm trying to port a project from Keil to SDCC.
    Specifying small model in both.
    Keil places all variables in internal RAM (data, idata).
    SDCC places  a good deal of variables as xdata.
    The program uses pointers to pdata to maintain a circular buffer, and that will conflict with the variables that SDCC places as xdata.
    How can I force SDCC to use internal RAM?
    By definition it should just use internal RAM in the small model.

     
  • Maarten Brock
    Maarten Brock
    2010-12-01

    By default SDCC uses the small model which places all variables in data memory. It does not use idata, pdata or xdata unless explicitly specified. Furthermore pdata should not conflict with xdata.