Hi,
to do multisegment, folow this steps....
1 - Create a "Managed Make 68 C/C++ Project" (only managed project works
with me)
2 - Create a file named "Sections.def" in the root of your project
3 - In the top of "AppMain.c" or equivalent, include the file "Section.h"
4 - Now, edit the file "Sections.def" and "Sections.h" to define what
sections your project will have.
Sample: "Sections.def"
=======================
application { "_temp_" TEMP }
multiple code { "code1" "code2" }
=======================
Sample: "Sections.h"
=======================
#ifndef _SECTIONS_H
#define _SECTIONS_H
#define EXTRA_SECTION_ONE __attribute__ ((section
("code1")))
#define EXTRA_SECTION_TWO __attribute__ ((section
("code2")))
#endif
=======================
5 - On the function definition specify what section will be used, the non
specified functions will be redirect to default section code.
Sample:
=======================
static void myfunc() EXTRA_SECTION_ONE;
static void myfunc() {
`the code`
}
=======================
If your project have a section defined and don't use it anywhere, you got a
error. So, you need use the sections defined one time at least, or don't
define it.
hope help u,
Best regards,
Ricardo
----- Original Message -----
From: "Kamal" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Wednesday, December 01, 2004 12:19 PM
Subject: RE: Compile Errors
> Please suggest how to write multiple segment code an how to compile it.
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Robert Moynihan
> Sent: Wednesday, December 01, 2004 7:39 PM
> To: Palm Developer Forum
> Subject: Re: Compile Errors
>
> From a practical standpoint, your code sections are really limited to
> 32k, because the addressing within each section is done with an Int16
> reference, which allows +/- 32k. There are techniques to allow you to
> use the full 64k, but it seems to be generally easier to break the
> project up into multiple segments, each less than 32k. Bob.
>
> Kamal Sharma wrote:
>
> >I am using Palm OS Developer Suite for making Palm Application.
> >The compiler is giving the following error:-
> >"/usr/m68k-palmos/bin/ld region coderes is full (Debug/GameP section
> >.text)"
> >
> >Here GameP is name of the project.
> >Probably this is the linker error. It might be possible that code size
> >has increased too much. Though my .PRC is 46KB and compiler supports
> >68K.
> >Please help me out if there is any modification that is to be made in
> >compiler or makefile
> >Settings.
> >
> >Or how to optimize the code.
> >
> >Please suggest its urgent.
> >
> >Kamal
> >
> >
> >
> >
> >
> >
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/support/forums/
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.289 / Virus Database: 265.4.4 - Release Date: 30/11/2004
>
>
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.289 / Virus Database: 265.4.4 - Release Date: 30/11/2004
--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/support/forums/