Skip to main content
gflasza
Associate II
November 21, 2007
Question

vector.s for Anglia IDEaliST

  • November 21, 2007
  • 14 replies
  • 2668 views
Posted on November 21, 2007 at 13:57

vector.s for Anglia IDEaliST

This topic has been closed for replies.

14 replies

gflasza
gflaszaAuthor
Associate II
May 17, 2011
Posted on May 17, 2011 at 09:41

Hi

I looking for working vector.s file for Anglia Compiler

I've got the standard vectors.s, but it doesn't work with two interrupts (from VIC0 and VIC1)

[ This message was edited by: GrzesiekFl on 10-04-2007 10:33 ]

mehdi239955
Visitor II
May 17, 2011
Posted on May 17, 2011 at 09:41

Hi

Can you provide me with more details.

Did vectors.s works with only one interrupt?

regards

MBS,

[ This message was edited by: MBS on 10-04-2007 11:26 ]

kmshim
Associate II
May 17, 2011
Posted on May 17, 2011 at 09:41

Hi,

Maybe your problem will be the cause of nested interrupt.

also, I had same problem. would you modify the IRQ handler as following in the vect.s

IRQHandler

SUB lr,lr,#4 ;// Update the link register

SaveContext r0,r12 ;// Save the workspace plus the current

;// return address lr_irq and spsr_irq

LDR r0, = VectorAddress

LDR r0, [r0] ;// Read the routine address

;//LDR r1, = VectorAddressDaisy

;//LDR r1, [r1]

;// Padding between the acknowledge and re-enable of interrupts

;// For more details, please refer to the following URL

;//

http://www.arm.com/support/faqip/3682.html

;//NOP

;//NOP

;//MSR cpsr_c,#0x1F | I_Bit ;// Switch to SYS mode and disable IRQ modified by KMSHIM, 2007/03/15

;//MSR cpsr_c,#0x1F ;// Switch to SYS mode and enable IRQ

STMFD sp!,{lr} ;// Save the link register.

LDR lr, = IRQ_ReturnAddress ;// Read the return address.

BX r0 ;// Branch to the IRQ handler.

IRQ_ReturnAddress

LDMFD sp!,{lr} ;// Restore the link register.

;//MSR cpsr_c,#0xD2 | I_Bit ;// Switch to IRQ mode and disable IRQ

LDR r0, = VectorAddress ;// Write to the VectorAddress to clear the

STR r0,[r0] ;// respective interrupt in the internal interrupt

LDR r1, = VectorAddressDaisy ;// Write to the VectorAddressDaisy to clear the

STR r1,[r1] ;// respective interrupt in the internal interrupt

RestoreContext r0,r12 ;// Restore the context and return to the...

;// ...program execution.

good luck!!

best regards,

KMSHIM

mehdi239955
Visitor II
May 17, 2011
Posted on May 17, 2011 at 09:41

Hi ,

Please find attached a project (RIDE/IAR/RVDK) with two interrupts and note that RIDE is using GNU compiler (GCC-ARM) so, you'll find the necessary modification needed to vector.s in 91x_init.s .

Regards,

MBS

[ This message was edited by: MBS on 13-04-2007 15:51 ]

gflasza
gflaszaAuthor
Associate II
May 17, 2011
Posted on May 17, 2011 at 09:41

I have two interrupts : one from TIM0 and one from UART0. When I use two interrupts I lose chars from UART0, but when I use ONLY TIM0 interrupts it works correctly

mehdi239955
Visitor II
May 17, 2011
Posted on May 17, 2011 at 09:41

hi,

I didn't understand your question :( .

The example which i sent,is a solution to generate correct nested interrupt with VIC0 and VIC1 without any conflict .

did you try it?

Regards,

MBS

[ This message was edited by: MBS on 12-04-2007 16:24 ]

kmshim
Associate II
May 17, 2011
Posted on May 17, 2011 at 09:41

Hi, MBS

Mode switch that you have done have been implemented in the IRQ handler.

I think that there are jsut differences as like nested interrut and writing to VICx->VAR.

Are there any difference in the your code?

best regards,

KM SHIM

mehdi239955
Visitor II
May 17, 2011
Posted on May 17, 2011 at 09:41

Hi KM SHIM,

i think the problem of spurious interrupt are now solved with the different modifications that we have done on Vector.s and it.c .

have a look to IRQ project which i send previously.(waiting for your feedback 8-) )

Regards,

MBS

:-]

[ This message was edited by: MBS on 12-04-2007 11:52 ]

mehdi239955
Visitor II
May 17, 2011
Posted on May 17, 2011 at 09:41

Hi GrzesiekFl,

Quote:

When I try to complie the project in Anglia IDE I receive the following warrings:

./../../library/inc/91x_it.h:44: warning: empty declaration

./../../library/inc/91x_it.h:45: warning: empty declaration

./../../library/inc/91x_it.h:66: warning: empty declaration

it was due to this:

Quote:

#ifdef __GNUC__ /* GCC Compiler */

#define interrupt __attribute__ ((interrupt));

#define irq interrupt

#endif

in fact,with an interrupt function the declaration should be as follow :

Quote:

void FOOxxxx (void) __attribute__ ((interrupt));

:o

the problem now is : why it works fine with RIDE compiler (which uses GCC-ARM) and doesn't with ANGLIA ? 8-)

I'm investigating ...

in meanwhile, please find attached the corrected project.

Best regards,

MBS

[ This message was edited by: MBS on 16-04-2007 11:44 ]

gflasza
gflaszaAuthor
Associate II
May 17, 2011
Posted on May 17, 2011 at 09:41

Hi MBS

When I try to complie the project in Anglia IDE I receive the following warrings:

In file included from ./../../library/inc/91x_vic.h:27,

from ../../library/src/91x_vic.c:21:

./../../library/inc/91x_it.h:44: warning: empty declaration

./../../library/inc/91x_it.h:45: warning: empty declaration

./../../library/inc/91x_it.h:66: warning: empty declaration

What's going wrong?

Regards. Greg

And when I try to compile project in Release Mode I receive errors:

E:\Technika\Szkolenie_ARM\ARM_forum\IRQ_anglia_IDE\str91xstdlib\Stdlib\project\91x_it.c -march=armv5te -mapcs -g -Wall -O0 -Iuip -Ienet

../91x_it.c:51: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'

../91x_it.c:153: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'

../91x_it.c:372: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'

** Errors Detected in Build **

Greg

[ This message was edited by: GrzesiekFl on 13-04-2007 18:32 ]