FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
PCD option to assign variables to near/far data space? |
Posted: Sun Nov 02, 2008 1:52 pm |
|
|
Hello,
dsPIC30/PIC24 processors have its data space divided to a near (up to 0x1FFF) and a far (above 0x2000) data space. Cause the near data space has additional addressing modes, it's particularly effective for direct variable addressing, while buffers and structures, that are mainly accessed through pointers can reside in far data space as well.
PCD apparently assigns the variables sequentially during compilation without considering access requirements.
It's possible now, to use a #locate to absolute addresses to force e. g. the placement of large buffers or structures in far data space, but it would be more convenient, to have a special pre-processor directive (like #near #far) for this purpose. Or did I miss another already existing option?
Best regards,
Frank
P.S.: I learned, that the questioned option is available through addressmode () statement and user defined storage qualifier or #type default= preprocessor directive. |
|