Jeff.
This is quite easy. First of all, you can segment your program by functions,
and ist a matter of choosing functions, I had a program that barely get over
the code section limit without using multi segment code, but I'm using 4
code sections, and I segmented it by the functions of each module of my
program. You can do something like this, or send funtions to another section
until you can run it withoun any problem. Now this is what you need to do...
1) in Sections.def, the next line defines each of the aditional segment
codes, this ones are diferent from the main/base code of the palm app
multiple code ( "code1" "code2" )
So you have the main code section and tow more called code1 and code2, those
names are just for reference, you can named as you want.
2) in src/Sections.h, you define the next lines according to the multiple
code section defined before.
#define EXTRA_SECTION_ONE __attribute__ ((section ("code1")))
#define EXTRA_SECTION_TWO __attribute__ ((section ("code2")))
Also de EXTRA_SECTION_ONE or TWO names are for reference, you can change
them.
3) Declare qich funtions will be in wich code segment, that's done as
follow.
Suppose that you have AppMain.c with some of you code, and have AppCode.c
with two big functions that need to be in diferent code section, in
AppCode1.h you have defined the functions like this.
extern void myFirstVeryBigFuntion ( Int16 number);
extern void mySecondVeryBigFunction ( Int32 number);
you just have to add the definition for the segment code that each function
will reside like this
extern void myFirstVeryBigFuntion ( Int16 number) EXTRA_SECTION_ONE;
extern void mySecondVeryBigFunction ( Int32 number) EXTRA_SECTION_TWO;
This suppose to be the way that multisections works, and it works for me,
now your app will have the code from AppMain.c in the main code section, and
had myFirstVeryBigFuntion in the code1 section and mySecondVeryBigFunction
in code2 section.
Eduardo Orea
"Jeff Gibson" <[EMAIL PROTECTED]> escribi� en el mensaje
news:[EMAIL PROTECTED]
>I am facign the need to segment my code to get away from the Coderes full
>error. Can you point me in the right direction to learn how to segment my
>code? I don't understand the process of determining what needs to be
>segmented and how to put the right information into the sections.def and .h
>files. Any help would be MUCH apprecaited.
>
> Jeff
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/support/forums/