#182 #pragma xdataseg <name>, #pragma (x|i|o|p|)dataseg <name> ()

open
nobody
None
5
2006-11-21
2006-11-21
No

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
the linker
(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:
http://www.8052.com/forum/read.phtml?id=128332

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).

Greetings,
Frieder

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks