Skip to main content
Visitor II
November 21, 2007
Question

vector.s for Anglia IDEaliST

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

vector.s for Anglia IDEaliST

    This topic has been closed for replies.

    14 replies

    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 ]

    gflaszaAuthor
    Visitor II
    May 17, 2011
    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

    Visitor II
    May 17, 2011
    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

    Visitor II
    May 17, 2011
    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.