I think there is some confusion here. Let me try to clear it up.
> I don't think You have to resegment the codes around.
> Codewarrior does it
> for you if you need certain files in first segment.
CodeWarrior does not change the segments of any files for you. You must
determine which source files go in which segments yourself. Another person
recently claimed that turning off "Link Single Segment" segmented his
application automatically, but he never sent me proof of that.
> > From: Lee, Eric [mailto:[EMAIL PROTECTED]]
> > Any file that shows up in the link map on a line beginning
> with "Code:"
> > must be in the first segment.
> > Above statement is from the knowledge base but I have two different
> section
> > of "Code:".
> > [Referring to http://oasis.palm.com/dev/kb/papers/1469.cfm]
The actual requirement for the code that must be in the first segment is
from that paper:
"The first segment MUST contain the "MSL Runtime Palm OS (xx).lib", your
application's PilotMain() function, and any code that is executed when
PilotMain() receives a launch command other than
sysAppLaunchCmdNormalLaunch. "
So, the MSL Runtime library must be there, PilotMain() must be there, and
anything your app does outside of a normal launch must be there. The quote
you provide above is made out of context. The stuff before that line is
important. It suggests that you comment out the part of your PilotMain()
that is called when you get a normal launch command. Then if you rebuild
and look at the link map, all the commands called anytime you have something
other than a sysAppCmdNormalLaunch will be in the Link Map as code segments,
and they all have to be in the first segment. Now comment your normal
launch code back into the program to get your regular program back. All
other code in your project can be in other segments or segment 1 -- it
doesn't matter as long as you keep the segments under 64K.
> > I have a bunch of "Code:" lines in a section "Segment 1"
> and I have the
> > other bunch of "Code:" in a section "Segment 2" in a
> generated MAP file.
>
> The map file is showing you which functions are in which
> segments.
Scott is exactly correct -- the link map is showing you what functions are
in what segment. The Code: lines will all be in one of your segments.
Hope that helps clarify this.
-hkmlt
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/