EmbeddedRelated.com
Forums

Re: What happens with unused interrupts?

Started by rakam0 June 15, 2006
Hi, I recently started in this group.

I have a problem with compiler IAR Embedded.

I need to use the RESET INTERRUPT, that set in the wathdog control
register, and in my code wrote(for use the interrupt):

#pragma vector= VECTOR_RESET
__interrupt void interrupcion_reset(void)
{
//any code
}

if I do this it will to work, but the compiler mark the next error:

Error[e16]: Segment RESET (size: 0x2 align: 0x1) is too long for
segment definition. At least 0x2 more bytes needed. The problem
occurred while processing the segment placement
command "-Z(CONST)RESETFE-FFFF", where at the moment of
placement
the available memory ranges were "-none-"
Reserved ranges relevant to this placement:
CODE:ffe0-ffff INTVEC

And in this section someone wrote that this error will go out if I don
't write the past code. But I need it.

--- In m..., Anders Lindgren
wrote:
>
> Edwin Cini wrote:
>
> >After reading this thread and trying to do things my way, I am a
bit
> >confused how unused interrupts should be handled.
> >
> >My plan was to create define all interrupts and then work from
> >there. Problem is, when using IAR, I get this error message:
> >
> >Error[e16]: Segment RESET (size: 0x2 align: 0x1) is too long for
> >segment definition. At least 0x2 more bytes needed. The problem
> >occurred while processing the segment placement
> >command "-Z(CONST)RESETFE-FFFF", where at the moment of
placement
> >the available memory ranges were "-none-"
> > Reserved ranges relevant to this placement:
> > CODE:ffe0-ffff INTVEC
> >
> >Removing commenting out the implementation of the reset_isr seems
to
> >solve the problem. From what I could understand, this interrupt
is
> >also triggered when there is an flash access violation, therefore
I
> >would like to get it right!
> >
> >Can anyone give me a clue as to what I'm doing wrong? Code at the
> >bottom of message.
> >
> > Hi!
>
> In the IAR compiler the reset vector is already occupied by code
> provided by the runtime library. The module "cstartup" (the module
> responsible for bootstrapping the application) contains the vector
> itself as well as the code that is called at startup.
>
> If all you are interested in is to ensure that all vectors are
filled in
> then all you need to do is simply not to define the one for reset.
>
> If you really would like to provide your own reset vector -- and
you
> really know what you are doing -- then you can either can modify (a
copy
> of) the cstartup file and add it to your project, or ensure that
the
> standard cstarup file isn't used by overriding the "entry label" in
the
> Linker tab.
> As a side note, in the IAR compiler the interrupt vector table is
> diveded into two different segment, INTVEC and RESET. Normally, an
> interrupt vector is encoded as a offset from the start of the
segment
> INTVEC. We would like to have a derivate-neutral runtime library,
since
> the size of the interrupt vector table differes between derivates
we
> can't use INTVEC for the reset vector . Instead we use the RESET
> segment, this segment is placed in address 0xFFFE by all
> derivate-specific xcl files.
>
> -- Anders Lindgren, IAR Systems
>
> --
> Disclaimer: Opinions expressed in this posting are strictly my own
and
> not necessarily those of my employer.
>

Beginning Microcontrollers with the MSP430

rakam0 wrote:
> Hi, I recently started in this group.
>
> I have a problem with compiler IAR Embedded.
>
> I need to use the RESET INTERRUPT, that set in the wathdog control
> register, and in my code wrote(for use the interrupt):
>
> #pragma vector= VECTOR_RESET
> __interrupt void interrupcion_reset(void)
> {
> //any code
> }
>
> if I do this it will to work, but the compiler mark the next error:
>
> Error[e16]: Segment RESET (size: 0x2 align: 0x1) is too long for
> segment definition. At least 0x2 more bytes needed. The problem
> occurred while processing the segment placement
> command "-Z(CONST)RESETFE-FFFF", where at the moment of
> placement
> the available memory ranges were "-none-"
> Reserved ranges relevant to this placement:
> CODE:ffe0-ffff INTVEC
>
> And in this section someone wrote that this error will go out if I don
> 't write the past code. But I need it.

if you re-read the posting that you commented you will find the answer
right there.

-- Anders Lindgren, IAR Systems
--
Disclaimer: Opinions expressed in this posting are strictly my own and
not necessarily those of my employer.