Reply by i will tell u if u ask July 25, 20072007-07-25
--- In l..., "i will tell u if u ask"
wrote:
>
> --- In l..., "charlesgrenz" wrote:
> >
> > --- In l..., "i will tell u if u ask"
> > wrote:
> > >
> > > Hi all,
> > > I have used the LPC2104 previously and am familiar with the ARM. I
> > > used the IAR embedded workbench to finish that project and have
> done so.
> > > Now i am starting a new project with Rev. 4.41 of the IAr embedded
> > > work bench, and an LPC2103, but i keep getting an error saying :
> > >
> > > Fatal Error[e72]: Segment ABT_STACK must be defined in a segment
> > > definition option (-Z, -b or -P)
> > >
> > > What exactly does that mean and how can i fix it. I remember in the
> > > beginning they had a major probelm with a linker file and they
had to
> > > redo it and send me one, and everything worked fine after that.
> > >
> > > I am also using the Jlink to flash and debug the ARM, writing in C
> > > code and my tiny code compiles fine.
> > >
> > > Can someone help me with this?
> > > Is the Kiel IDE better in terms of setting up projects and linking
> > > them, is that process more transparent to the user, in Kiel??
> > >
> >
> > You have to go into your xcl file that is listed under options for
> > your project link section and add the following lines.
> >
> //*************************************************************************
> > // Stack and heap segments.
> //*************************************************************************
> >
> > -D_ABT_STACK_SIZE0
> >
> > -Z(DATA)ABT_STACK+_ABT_STACK_SIZE=RAMSTART-RAMEND
> >
> > regards,
> > Charles
> > Thanks Charles for your response, i blindly followed your suggestion.
> Now it is saying
>
> Fatal Error[e72]: Segment UND_STACK must be defined in a segment
> definition option (-Z, -b or -P)
>
> is there something missing that i need there? where can i find this
> information and understand what i am doing?
> thanks
>
okay, did the same for the FIR_STACK, the SVC_STACK and the UND_STACK,
now it compiles fine but i have other issues, i will try and fix them
and if i cant i will post them in another post.
thanks

An Engineer's Guide to the LPC2100 Series

Reply by Joel Winarske July 25, 20072007-07-25
> Thanks Charles for your response, i blindly followed your suggestion.
> Now it is saying
>
> Fatal Error[e72]: Segment UND_STACK must be defined in a segment
> definition option (-Z, -b or -P)
>
> is there something missing that i need there? where can i find this
> information and understand what i am doing?
> thanks

When you specify a section, there must be a corresponding entry in your
linker file. The errors you were seeing were due to a section defined
somewhere in your code, without being referenced in your linker file.

In your startup code you most likely have the following:

;---------------------------
; ?CSTARTUP
;---------------------------
MODULE ?CSTARTUP

RSEG IRQ_STACK:DATA(2)

RSEG ABT_STACK:DATA:NOROOT(2)
RSEG UND_STACK:DATA:NOROOT(2)
RSEG FIR_STACK:DATA:NOROOT(2)
RSEG SVC_STACK:DATA:NOROOT(2)
RSEG CSTACK:DATA(2)
RSEG ICODE:CODE:NOROOT(2)
RSEG section :type [flag] [(align)]

*section* The name of the section.

*type* The memory type, which can be either CODE, CONST, or DATA.

*NOROOT* means that the section fragment is discarded by the linker if
no symbols in this section fragment are referred to. Normally, all
section fragments except startup code and interrupt vectors should set
this flag. The default mode is ROOT which indicates that the section
fragment must not be discarded.

*align* The power of two to which the address should be aligned, in most
cases in the range 0 to 30.
The default align value is 0, except for code sections where the
default is 1.

This was pulled out of Help/ARM Assembler Reference Guide ->
EWARM_AssemblerReference.pdf:
Reply by charlesgrenz July 25, 20072007-07-25
--- In l..., "i will tell u if u ask"
wrote:
>
> --- In l..., "charlesgrenz" wrote:
> >
> > --- In l..., "i will tell u if u ask"
> > wrote:
> > >
> > > Hi all,
> > > I have used the LPC2104 previously and am familiar with the ARM. I
> > > used the IAR embedded workbench to finish that project and have
> done so.
> > > Now i am starting a new project with Rev. 4.41 of the IAr embedded
> > > work bench, and an LPC2103, but i keep getting an error saying :
> > >
> > > Fatal Error[e72]: Segment ABT_STACK must be defined in a segment
> > > definition option (-Z, -b or -P)
> > >
> > > What exactly does that mean and how can i fix it. I remember in the
> > > beginning they had a major probelm with a linker file and they
had to
> > > redo it and send me one, and everything worked fine after that.
> > >
> > > I am also using the Jlink to flash and debug the ARM, writing in C
> > > code and my tiny code compiles fine.
> > >
> > > Can someone help me with this?
> > > Is the Kiel IDE better in terms of setting up projects and linking
> > > them, is that process more transparent to the user, in Kiel??
> > >
> >
> > You have to go into your xcl file that is listed under options for
> > your project link section and add the following lines.
> >
> //*************************************************************************
> > // Stack and heap segments.
> //*************************************************************************
> >
> > -D_ABT_STACK_SIZE0
> >
> > -Z(DATA)ABT_STACK+_ABT_STACK_SIZE=RAMSTART-RAMEND
> >
> > regards,
> > Charles
> > Thanks Charles for your response, i blindly followed your suggestion.
> Now it is saying
>
> Fatal Error[e72]: Segment UND_STACK must be defined in a segment
> definition option (-Z, -b or -P)
>
> is there something missing that i need there? where can i find this
> information and understand what i am doing?
> thanks
>

Here is the section for the stack that I use for my LPC2103 project.

//*************************************************************************
// Stack and heap segments.
//*************************************************************************

-D_CSTACK_SIZE0
-D_IRQ_STACK_SIZE 0
-D_FIQ_STACK_SIZE 0
-D_SVC_STACK_SIZE 0
-D_ABT_STACK_SIZE0
-D_UND_STACK_SIZE0
-D_HEAP_SIZE 0

-Z(DATA)CSTACK+_CSTACK_SIZE=RAMSTART-RAMEND
-Z(DATA)IRQ_STACK+_IRQ_STACK_SIZE=RAMSTART-RAMEND
-Z(DATA)FIQ_STACK+_FIQ_STACK_SIZE=RAMSTART-RAMEND
-Z(DATA)SVC_STACK+_SVC_STACK_SIZE=RAMSTART-RAMEND
-Z(DATA)ABT_STACK+_ABT_STACK_SIZE=RAMSTART-RAMEND
-Z(DATA)UND_STACK+_UND_STACK_SIZE=RAMSTART-RAMEND
-Z(DATA)HEAP+_HEAP_SIZE=RAMSTART-RAMEND
regards,
Charles
Reply by i will tell u if u ask July 25, 20072007-07-25
--- In l..., "charlesgrenz" wrote:
>
> --- In l..., "i will tell u if u ask"
> wrote:
> >
> > Hi all,
> > I have used the LPC2104 previously and am familiar with the ARM. I
> > used the IAR embedded workbench to finish that project and have
done so.
> > Now i am starting a new project with Rev. 4.41 of the IAr embedded
> > work bench, and an LPC2103, but i keep getting an error saying :
> >
> > Fatal Error[e72]: Segment ABT_STACK must be defined in a segment
> > definition option (-Z, -b or -P)
> >
> > What exactly does that mean and how can i fix it. I remember in the
> > beginning they had a major probelm with a linker file and they had to
> > redo it and send me one, and everything worked fine after that.
> >
> > I am also using the Jlink to flash and debug the ARM, writing in C
> > code and my tiny code compiles fine.
> >
> > Can someone help me with this?
> > Is the Kiel IDE better in terms of setting up projects and linking
> > them, is that process more transparent to the user, in Kiel??
> > You have to go into your xcl file that is listed under options for
> your project link section and add the following lines.
//*************************************************************************
> // Stack and heap segments.
>
//*************************************************************************
>
> -D_ABT_STACK_SIZE0
>
> -Z(DATA)ABT_STACK+_ABT_STACK_SIZE=RAMSTART-RAMEND
>
> regards,
> Charles
>

Thanks Charles for your response, i blindly followed your suggestion.
Now it is saying

Fatal Error[e72]: Segment UND_STACK must be defined in a segment
definition option (-Z, -b or -P)

is there something missing that i need there? where can i find this
information and understand what i am doing?
thanks
Reply by charlesgrenz July 25, 20072007-07-25
--- In l..., "i will tell u if u ask"
wrote:
>
> Hi all,
> I have used the LPC2104 previously and am familiar with the ARM. I
> used the IAR embedded workbench to finish that project and have done so.
> Now i am starting a new project with Rev. 4.41 of the IAr embedded
> work bench, and an LPC2103, but i keep getting an error saying :
>
> Fatal Error[e72]: Segment ABT_STACK must be defined in a segment
> definition option (-Z, -b or -P)
>
> What exactly does that mean and how can i fix it. I remember in the
> beginning they had a major probelm with a linker file and they had to
> redo it and send me one, and everything worked fine after that.
>
> I am also using the Jlink to flash and debug the ARM, writing in C
> code and my tiny code compiles fine.
>
> Can someone help me with this?
> Is the Kiel IDE better in terms of setting up projects and linking
> them, is that process more transparent to the user, in Kiel??
>

You have to go into your xcl file that is listed under options for
your project link section and add the following lines.

//*************************************************************************
// Stack and heap segments.
//*************************************************************************

-D_ABT_STACK_SIZE0

-Z(DATA)ABT_STACK+_ABT_STACK_SIZE=RAMSTART-RAMEND

regards,
Charles
Reply by i will tell u if u ask July 25, 20072007-07-25
Hi all,
I have used the LPC2104 previously and am familiar with the ARM. I
used the IAR embedded workbench to finish that project and have done so.
Now i am starting a new project with Rev. 4.41 of the IAr embedded
work bench, and an LPC2103, but i keep getting an error saying :

Fatal Error[e72]: Segment ABT_STACK must be defined in a segment
definition option (-Z, -b or -P)

What exactly does that mean and how can i fix it. I remember in the
beginning they had a major probelm with a linker file and they had to
redo it and send me one, and everything worked fine after that.

I am also using the Jlink to flash and debug the ARM, writing in C
code and my tiny code compiles fine.

Can someone help me with this?
Is the Kiel IDE better in terms of setting up projects and linking
them, is that process more transparent to the user, in Kiel??