Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Thread

ARM-VIC-Crossworks

ARM-VIC-Crossworks

2006-04-18 by mgiaco82

I found this on the Page from Rowley.

>>I'm trying to use vectored interrupts on the LPC2000. I've 
programmed >>up the VIC but when the interrupt occurs the program 
jumps to >>the "irq_handler" label/function, not the ISR I have 
configured using >>the VIC.

>>How do I make the LPC2000 jump to my vectored ISR when the 
interrupt >>occurs? 

Answer:     
 
You need to have the instruction "ldr pc, [pc, #-0xFF0]" located at 
the IRQ exception vector for vectored interrupts to work.

To do this make sure you have the preprocessor definition 
VECTORED_IRQ_INTERRUPTS defined when you compile the 
Philips_LPC210X_Startup.s file.

This mean i have to define anything before i can use the vic?
Can anybody explain pleas.

thanks mathias

Re: ARM-VIC-Crossworks

2006-04-18 by rtstofer

--- In lpc2000@yahoogroups.com, "mgiaco82" <mgiaco82@...> wrote:
>
> I found this on the Page from Rowley.
> 
> >>I'm trying to use vectored interrupts on the LPC2000. I've 
> programmed >>up the VIC but when the interrupt occurs the program 
> jumps to >>the "irq_handler" label/function, not the ISR I have 
> configured using >>the VIC.
> 
> >>How do I make the LPC2000 jump to my vectored ISR when the 
> interrupt >>occurs? 
> 
> Answer:     
>  
> You need to have the instruction "ldr pc, [pc, #-0xFF0]" located at 
> the IRQ exception vector for vectored interrupts to work.
> 
> To do this make sure you have the preprocessor definition 
> VECTORED_IRQ_INTERRUPTS defined when you compile the 
> Philips_LPC210X_Startup.s file.
> 
> This mean i have to define anything before i can use the vic?
> Can anybody explain pleas.
> 
> thanks mathias
>

Yes, you have to do 'something' to alter the way in which the startup
file is assembled.  Look at the Philips_LPC????_Startup.s file. 
Somewhere (maybe around line 86) you will find:

#ifdef VECTORED_IRQ_INTERRUPTS
  .word 0xB9205F84                    /* boot loader checksum */
  ldr pc, [pc, #-0xFF0]               /* irq handler */
#else
  .word 0xB8A06F60                    /* boot loader checksum */
  ldr pc, [pc, #irq_handler_address - . - 8]    /* irq handler */
#endif

One way to get VECTORED_IRQ_INTERRUPTS defined is to put, at the top
of the .S file:

#define VECTORED_IRQ_INTERRUPTS

Maybe put that just before:
  .section .vectors, "ax"

If you do it that way, you will want to import the .s file to the
specific project rather than linking to a modified master copy.  Right
click on the file name in the Project Explorer dialog and select
Import.  Put the copy with the other source files for the project.

There is probably a much better way to do this.  At the moment, I
can't find it.

Richard

RE: [lpc2000] Re: ARM-VIC-Crossworks

2006-04-18 by Paul Curtis

Richard, 


> One way to get VECTORED_IRQ_INTERRUPTS defined is to put, at 
> the top of the .S file:
> 
> #define VECTORED_IRQ_INTERRUPTS
> 
> Maybe put that just before:
>   .section .vectors, "ax"
> 
> If you do it that way, you will want to import the .s file to 
> the specific project rather than linking to a modified master 
> copy.  Right click on the file name in the Project Explorer 
> dialog and select Import.  Put the copy with the other source 
> files for the project.
> 
> There is probably a much better way to do this.  At the 
> moment, I can't find it.

Set it in the preprocessor definitions of the project.

--
Paul Curtis, Rowley Associates Ltd   http://www.rowley.co.uk 
CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors

Re: ARM-VIC-Crossworks

2006-04-18 by mgiaco82

--- In lpc2000@yahoogroups.com, "rtstofer" <rstofer@...> wrote:
>
> --- In lpc2000@yahoogroups.com, "mgiaco82" <mgiaco82@> wrote:
> >
> > I found this on the Page from Rowley.
> > 
> > >>I'm trying to use vectored interrupts on the LPC2000. I've 
> > programmed >>up the VIC but when the interrupt occurs the 
program 
> > jumps to >>the "irq_handler" label/function, not the ISR I have 
> > configured using >>the VIC.
> > 
> > >>How do I make the LPC2000 jump to my vectored ISR when the 
> > interrupt >>occurs? 
> > 
> > Answer:     
> >  
> > You need to have the instruction "ldr pc, [pc, #-0xFF0]" located 
at 
> > the IRQ exception vector for vectored interrupts to work.
> > 
> > To do this make sure you have the preprocessor definition 
> > VECTORED_IRQ_INTERRUPTS defined when you compile the 
> > Philips_LPC210X_Startup.s file.
> > 
> > This mean i have to define anything before i can use the vic?
> > Can anybody explain pleas.
> > 
> > thanks mathias
> >
> 
> Yes, you have to do 'something' to alter the way in which the 
startup
> file is assembled.  Look at the Philips_LPC????_Startup.s file. 
> Somewhere (maybe around line 86) you will find:
> 
> #ifdef VECTORED_IRQ_INTERRUPTS
>   .word 0xB9205F84                    /* boot loader checksum */
>   ldr pc, [pc, #-0xFF0]               /* irq handler */
> #else
>   .word 0xB8A06F60                    /* boot loader checksum */
>   ldr pc, [pc, #irq_handler_address - . - 8]    /* irq handler */
> #endif
> 
> One way to get VECTORED_IRQ_INTERRUPTS defined is to put, at the 
top
> of the .S file:
> 
> #define VECTORED_IRQ_INTERRUPTS
> 
> Maybe put that just before:
>   .section .vectors, "ax"
> 
> If you do it that way, you will want to import the .s file to the
> specific project rather than linking to a modified master copy.  
Right
> click on the file name in the Project Explorer dialog and select
> Import.  Put the copy with the other source files for the project.
> 
> There is probably a much better way to do this.  At the moment, I
> can't find it.
> 
> Richard
>

Hallo Richard, thanks for the message. Pleas can you give me a 
detailed description of that. I don't see the point.

When I use the sample code from rowley for the timer irq it works. 
But with der uart code, i have ported, it doesn´t work.

thanks,

mathias

Re: ARM-VIC-Crossworks

2006-04-18 by mgiaco82

--- In lpc2000@yahoogroups.com, "Paul Curtis" <plc@...> wrote:
>
> Richard, 
> 
> 
> > One way to get VECTORED_IRQ_INTERRUPTS defined is to put, at 
> > the top of the .S file:
> > 
> > #define VECTORED_IRQ_INTERRUPTS
> > 
> > Maybe put that just before:
> >   .section .vectors, "ax"
> > 
> > If you do it that way, you will want to import the .s file to 
> > the specific project rather than linking to a modified master 
> > copy.  Right click on the file name in the Project Explorer 
> > dialog and select Import.  Put the copy with the other source 
> > files for the project.
> > 
> > There is probably a much better way to do this.  At the 
> > moment, I can't find it.
> 
> Set it in the preprocessor definitions of the project.
> 
> --
> Paul Curtis, Rowley Associates Ltd   http://www.rowley.co.uk 
> CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors
>
Hello Paul,

where ??? and what must I set? and pleas can you have a look to my 
other question concerning rowley.

thanks,

mathias

RE: [lpc2000] Re: ARM-VIC-Crossworks

2006-04-18 by Paul Curtis

Hi, 

> > > One way to get VECTORED_IRQ_INTERRUPTS defined is to put, 
> at the top 
> > > of the .S file:
> > > 
> > > #define VECTORED_IRQ_INTERRUPTS
> > > 
> > > Maybe put that just before:
> > >   .section .vectors, "ax"
> > > 
> > > If you do it that way, you will want to import the .s file to the 
> > > specific project rather than linking to a modified master copy.  
> > > Right click on the file name in the Project Explorer dialog and 
> > > select Import.  Put the copy with the other source files for the 
> > > project.
> > > 
> > > There is probably a much better way to do this.  At the moment, I 
> > > can't find it.
> > 
> > Set it in the preprocessor definitions of the project.
> > 
> > --
> > Paul Curtis, Rowley Associates Ltd   http://www.rowley.co.uk 
> > CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors
> >
> Hello Paul,
> 
> where ??? and what must I set? and pleas can you have a look 
> to my other question concerning rowley.

1. Right click the project node in the project explorer.

2. Click Properties.

3. Click the Preprocessor tab (at the end).

4. Preprocessor Definitions is now right in front of you.

What other question?

--
Paul Curtis, Rowley Associates Ltd   http://www.rowley.co.uk 
CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors

Re: ARM-VIC-Crossworks

2006-04-18 by rtstofer

--- In lpc2000@yahoogroups.com, "Paul Curtis" <plc@...> wrote:
>
> Richard, 
> 
> 
> > One way to get VECTORED_IRQ_INTERRUPTS defined is to put, at 
> > the top of the .S file:
> > 
> > #define VECTORED_IRQ_INTERRUPTS
> > 
> > Maybe put that just before:
> >   .section .vectors, "ax"
> > 
> > If you do it that way, you will want to import the .s file to 
> > the specific project rather than linking to a modified master 
> > copy.  Right click on the file name in the Project Explorer 
> > dialog and select Import.  Put the copy with the other source 
> > files for the project.
> > 
> > There is probably a much better way to do this.  At the 
> > moment, I can't find it.
> 
> Set it in the preprocessor definitions of the project.
> 
> --
> Paul Curtis, Rowley Associates Ltd   http://www.rowley.co.uk 
> CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors
>

Paul,

Outstanding!  I had tried that earlier without success.  But then, I
didn't know if it was supposed to work.

I certainly have no desire to change the startup file.

Richard

Re: ARM-VIC-Crossworks

2006-04-18 by mgiaco82

--- In lpc2000@yahoogroups.com, "Paul Curtis" <plc@...> wrote:
>
> Hi, 
> 
> > > > One way to get VECTORED_IRQ_INTERRUPTS defined is to put, 
> > at the top 
> > > > of the .S file:
> > > > 
> > > > #define VECTORED_IRQ_INTERRUPTS
> > > > 
> > > > Maybe put that just before:
> > > >   .section .vectors, "ax"
> > > > 
> > > > If you do it that way, you will want to import the .s file 
to the 
> > > > specific project rather than linking to a modified master 
copy.  
> > > > Right click on the file name in the Project Explorer dialog 
and 
> > > > select Import.  Put the copy with the other source files for 
the 
> > > > project.
> > > > 
> > > > There is probably a much better way to do this.  At the 
moment, I 
> > > > can't find it.
> > > 
> > > Set it in the preprocessor definitions of the project.
> > > 
> > > --
> > > Paul Curtis, Rowley Associates Ltd   http://www.rowley.co.uk 
> > > CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 
processors
> > >
> > Hello Paul,
> > 
> > where ??? and what must I set? and pleas can you have a look 
> > to my other question concerning rowley.
> 
> 1. Right click the project node in the project explorer.
> 
> 2. Click Properties.
> 
> 3. Click the Preprocessor tab (at the end).
> 
> 4. Preprocessor Definitions is now right in front of you.
> 
> What other question?

Hello this:

http://groups.yahoo.com/group/lpc2000/message/15362

Re: ARM-VIC-Crossworks

2006-04-18 by mgiaco82

--- In lpc2000@yahoogroups.com, "Paul Curtis" <plc@...> wrote:
>
> Hi, 
> 
> > > > One way to get VECTORED_IRQ_INTERRUPTS defined is to put, 
> > at the top 
> > > > of the .S file:
> > > > 
> > > > #define VECTORED_IRQ_INTERRUPTS
> > > > 
> > > > Maybe put that just before:
> > > >   .section .vectors, "ax"
> > > > 
> > > > If you do it that way, you will want to import the .s file 
to the 
> > > > specific project rather than linking to a modified master 
copy.  
> > > > Right click on the file name in the Project Explorer dialog 
and 
> > > > select Import.  Put the copy with the other source files for 
the 
> > > > project.
> > > > 
> > > > There is probably a much better way to do this.  At the 
moment, I 
> > > > can't find it.
> > > 
> > > Set it in the preprocessor definitions of the project.
> > > 
> > > --
> > > Paul Curtis, Rowley Associates Ltd   http://www.rowley.co.uk 
> > > CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 
processors
> > >
> > Hello Paul,
> > 
> > where ??? and what must I set? and pleas can you have a look 
> > to my other question concerning rowley.
> 
> 1. Right click the project node in the project explorer.
> 
> 2. Click Properties.
> 
> 3. Click the Preprocessor tab (at the end).
> 
> 4. Preprocessor Definitions is now right in front of you.

And there i must write 

#define VECTORED_IRQ_INTERRUPTS 1 

or what else?

thanks,

mathias

RE: [lpc2000] Re: ARM-VIC-Crossworks

2006-04-18 by Paul Curtis

Hi, 

> > What other question?
> 
> Hello this:
> 
> http://groups.yahoo.com/group/lpc2000/message/15362

The latest v1.6 release has this capability.

-- Paul.

RE: [lpc2000] Re: ARM-VIC-Crossworks

2006-04-18 by Paul Curtis

Hi, 

> > 4. Preprocessor Definitions is now right in front of you.
> 
> And there i must write 
> 
> #define VECTORED_IRQ_INTERRUPTS 1 
> 
> or what else?

Just:

VECTORED_IRQ_INTERRUPTS

This defines it.  If you want to give it a value:

VECTORED_IRQ_INTERRUPTS=1

-- Paul.

Re: ARM-VIC-Crossworks

2006-04-19 by mgiaco82

--- In lpc2000@yahoogroups.com, "Paul Curtis" <plc@...> wrote:
>
> Hi, 
> 
> > > What other question?
> > 
> > Hello this:
> > 
> > http://groups.yahoo.com/group/lpc2000/message/15362
> 
> The latest v1.6 release has this capability.
> 
> -- Paul.
>

Okay, thanks

And where can I get v1.6? On the page I can't find this version.

mathias

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.