I finally decided to dual boot my laptop with Ubuntu 14.04.1 (along side Win 7).
I had been using WinAVR so far.
Inside Ubuntu, I installed:
- Code Blocks 13.12
- AVR-gcc 4.8 (with binutils-AVR & AVR-libc packages)
I googled for tips on configuring CBlocks for AVR-gcc, but there are very few tutorials on this, and the latest article on how to do this is dated 2009.
I went through the motions of creating an AVR project, selecting MCU etc.
CB also 'auto detected' the AVR-gcc package.
I tried a simple program:
And this is the error I get:
-------------- Build: Release in Test Project (compiler: GNU GCC Compiler for AVR)---------------
avr-gcc -Wall -mmcu=atmega8 -DF_CPU=1000000UL -Os -Os -I/usr/include -c main.c -o obj/Release/main.o
In file included from /usr/include/inttypes.h:25:0,
/usr/include/features.h:374:25: fatal error: sys/cdefs.h: No such file or directory
# include <sys/cdefs.h>
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))
Could anyone help in setting up the IDE ?
-- Royce Pereira