I get this linker error Error[e72]: Segment CODE must be defined in a segment definition option (-Z, -b or -P) when assembling and linking this code I've found: ;--- -- RSEG CODE ;--- -- Sine_Tab DW 255 ; Sine Table. These are the count DW 254 ; values in decimal that will DW 246 ; go into TBCCR1 to change the DW 234 ; PWM duty cycle. etc. I've added: -Z(CODE)Sine_Tab=0 to the .xcl file (from the Programming Guide), but it is doesn't help. I've tried various similar incantations, without success. Can anyone please tell me where I'm going wrong. I could change the code so that it works, but I'd like to get segment control working, as it's a neater technique for this type of table. Leon -- Leon Heller, G1HSM leon_heller@leon... http://webspace.webring.com/people/jl/leon_heller/
Xlink Error[e72]
Started by ●June 21, 2003
Reply by ●June 23, 20032003-06-23
"Leon Heller" <leon_heller@leon...> writes:
> I get this linker error
>
> Error[e72]: Segment CODE must be defined in a segment definition option
> (-Z, -b or -P)
>
> when assembling and linking this code I've found:
>
> ;---
> --
> RSEG CODE
> ;---
> --
> Sine_Tab DW 255 ; Sine Table. These are the
> count
> DW 254 ; values in decimal that will
> DW 246 ; go into TBCCR1 to change the
> DW 234 ; PWM duty cycle.
>
> etc.
>
> I've added:
>
> -Z(CODE)Sine_Tab=0
>
> to the .xcl file (from the Programming Guide), but it is doesn't help.
I've
> tried various similar incantations, without success.
>
> Can anyone please tell me where I'm going wrong. I could change the
code so
> that it works, but I'd like to get segment control working, as
it's a neater
> technique for this type of table.
Try:
-Z(CODE)CODE00-1FFF
The word "CODE" is here actually used for two different things. One
the the linker type of the memory (the linker has got twenty-or-so
memory types, only a handful are useful on a clean chip like MSP430).
The other meaning is the name of the segment, which should be the same
as the word after "RSEG". This could be anything, but CODE is what
the C compiler uses when it generates code.
The range after the equal-sign is the memory where this segment can be
places, make sure it matches the ROM area for your system.
-- Anders
Disclaimer: Opinions expressed in this posting are strictly my own and
not necessarily those of my employer.
Reply by ●June 23, 20032003-06-23
----- Original Message ----- From: "Anders Lindgren" <andersl@ande...> To: <msp430@msp4...> Sent: Monday, June 23, 2003 8:12 AM Subject: Re: [msp430] Xlink Error[e72] > "Leon Heller" <leon_heller@leon...> writes: > > > I get this linker error [deleted] > > Try: > > -Z(CODE)CODE00-1FFF > > > The word "CODE" is here actually used for two different things. One > the the linker type of the memory (the linker has got twenty-or-so > memory types, only a handful are useful on a clean chip like MSP430). > The other meaning is the name of the segment, which should be the same > as the word after "RSEG". This could be anything, but CODE is what > the C compiler uses when it generates code. > > The range after the equal-sign is the memory where this segment can be > places, make sure it matches the ROM area for your system. > > -- Anders Thanks very much, Anders. That did the trick. Leon -- Leon Heller, G1HSM leon_heller@leon... http://webspace.webring.com/people/jl/leon_heller/
Reply by ●June 26, 20032003-06-26
Reply by ●June 26, 20032003-06-26
----- Original Message ----- From: <nobodyo@nobo...> To: <msp430@msp4...> Sent: Thursday, June 26, 2003 7:33 AM Subject: Re: [msp430] Xlink Error[e72] > Hi, > > > Try: > > > > -Z(CODE)CODE00-1FFF > > Where do i have to place this option? It goes in the XCL file you are using. Leon -- Leon Heller, G1HSM leon_heller@leon... http://webspace.webring.com/people/jl/leon_heller/