AVR libc _delay_ms() does not works after upgrading to Ubuntu Raring Ringtail 

After upgrading my system to kUbuntu 13.04 Raring Ringtail the delays in my avr-gcc compiled binaries had been gone.
After reading the #include <util/delay.h> documentation my eyes cached the __DELAY_BACKWARD_COMPATIBLE__ macro. After defining it the delays are working.

Workaround:

#define F_CPU 16000000UL
#define __DELAY_BACKWARD_COMPATIBLE__
#include <util/delay.h>
#include <avr/io.h>

int main(void
{
DDRB = 0xFF;
while (1) {
PORTB = ~PORTB;
_delay_ms(1000);
}
}



[ hozzászólás ] ( 3 megtekintés ) [ 0 trackbackek ] permalink ( 3 / 443 )
Setting up Qt build enviroment for AVR32 development 

Currently I have a project which is based on the Atmel's NGW100 board.
It contains an 7' LCD display with touchscreen, an AC97 soundcard, a GPRS modem, and a PIC based board for controlling relay's, and so on.
The development time to make it working should be as sort as is possible. Read more...
[ hozzászólás ] ( 88 megtekintés ) [ 0 trackbackek ] permalink ( 2.6 / 595 )

<< <Előző | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |

 
számláló