while it is possible to specify the name of code
and const segments (#pragma constseg <name>
and #pragma codeseg <name>)
there is no way to set the segment names for xdata,
data, idata, pdata, or the data overlay segment.
This would allow to address at least three rationales:
a) easy use of noncontiguous xdata memory
(as found f.e. in some USB devices)
b) allowing to overlay data/xdata memory 'by hand'
(addressing SDCC's shortcomings in handling
the sparse data memory)
"#pragma dataseg MY_SEGMENT (OVR,DATA)"
with the optional bracketed argument passed to
(or "#pragma dataseg OSEG" which would map
the data segment to the segment OSEG)
c) allowing for a low overhead solution for
"How to point to end of used memory?" as proposed
by Russ in:
Ideally these pragmas would be compatible with #pragma save and #pragma restore, so existing source files
wouldn't have to be ripped apart to be able to
overlay specific functions (or to have their xdata
located at specific segments).
Log in to post a comment.