avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] avr-libc: interrupt.h, ISR and ISR_NOBLOCK


From: Georg-Johann Lay
Subject: [avr-gcc-list] avr-libc: interrupt.h, ISR and ISR_NOBLOCK
Date: Mon, 30 Apr 2012 17:02:53 +0200
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)

AVR-LIbC's ISR-macros lead to confusing results for code like, e.g.

#include <avr/io.h>
#include <avr/interrupt.h>

void *p;

ISR (ADC_vect, ISR_NOBLOCK)
{
    char c[10];
    p = c;
}

which resolves a.a. to

void __vector_21 (void)
__attribute__ ((signal,used,externally_visible)) __attribute__((interrupt));


Which states that IRQs are turned off (signal) and IRQs are turned on (interrupt) at the same time.

This leads to unexpected code generated by the compiler.

Thus, I'd like to introduce an error in avr-gcc saying

"function can only be one of 'interrupt', 'signal', 'OS_task', 'OS_main'
at the same time"

Ideas?

Johann



reply via email to

[Prev in Thread] Current Thread [Next in Thread]