cancel
Showing results for 
Search instead for 
Did you mean: 

vector.s for Anglia IDEaliST

gflasza
Associate II
Posted on November 21, 2007 at 13:57

vector.s for Anglia IDEaliST

14 REPLIES 14
gflasza
Associate II
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 ]

mehdi239955
Associate II
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
Associate II
Posted on May 17, 2011 at 09:41

Hi MBS

Sorry, but this program doesn't work.

It compiles correct, but the interrupts stop program

If I switch off interrupts

//VIC_ITCmd(TIM0_ITLine, ENABLE);

//VIC_ITCmd(RTC_ITLine, ENABLE);

program works correctly

I think the problem is in section

#define IENABLE asm('' MRS LR, SPSR''); /* Copy SPSR_irq to LR */

asm(''STMFD SP!, {LR} ''); /* Save SPSR_irq */

asm(''MSR CPSR_c, #0x1F ''); /* Enable IRQ (Sys Mode) */

asm(''STMFD SP!, {LR} '') ; /* Save LR */

#define IDISABLE asm(''LDMFD SP!, {LR}'') ; /* Restore LR */

asm(''MSR CPSR_c, #0x92'') ; /* Disable IRQ (IRQ Mode) */

asm(''LDMFD SP!, {LR}'') ; /* Restore SPSR_irq to LR */

asm(''MSR SPSR_cxsf, LR'') ; /* Copy LR to SPSR_irq */

I just added delay() function and port GPIO7 (diodes), I use MCB-STR9 starter kit

Regards, Greg

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

hi GrzesiekFl,

Sorry, i've tried this example with IAR and RIDE and it works fine but i've just compile with ANGLIA .(no flash link)

Quote:

I think the problem is in section

#define IENABLE asm('' MRS LR, SPSR''); /* Copy SPSR_irq to LR */

asm(''STMFD SP!, {LR} ''); /* Save SPSR_irq */

asm(''MSR CPSR_c, #0x1F ''); /* Enable IRQ (Sys Mode) */

asm(''STMFD SP!, {LR} '') ; /* Save LR */

#define IDISABLE asm(''LDMFD SP!, {LR}'') ; /* Restore LR */

asm(''MSR CPSR_c, #0x92'') ; /* Disable IRQ (IRQ Mode) */

asm(''LDMFD SP!, {LR}'') ; /* Restore SPSR_irq to LR */

asm(''MSR SPSR_cxsf, LR'') ; /* Copy LR to SPSR_irq */

try the attached project, i've just deleted these functions and replace them by their code in the different interrupt functions. 8-)

Best regards

MBS

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

Can somebody explain IDISABLE and IENABLE macros. In my project when I leave interrupt with IDISABLE macro at the end my program stops.

I still have problem with this VIC0 and VIC1 problem, can somebody overcome this problem finally.

I need a sample code for Anglia Compiler with two interrupts with form different VIC's,

Please help because my boss will kill me :)

best regards,

J.O.