CodeBlocks, Linux woes.

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK, after a previous attempt to get my avr-gcc and CodeBlock to install/operational , . I must be making some progress, I installed Arduino, ordered a UNO and that
is working on the Ubuntu PC with no problems. That also includes AVRDUDE.

I notice that python based programs compile and work for Linux (pygtk) as well as CodeBlocks
compiling a standard and simple GCC C program for the PC..

I seleced the AVR CodeBlocks Compiler option and attempted to compile the basic C default main.c file that is
generated , but it fails, see the error message below.

------------ Build: Debug in NewProjectAVR --------------

Compiling: main.c
In file included from /usr/include/inttypes.h:26:0,
                 from /usr/lib/gcc/avr/4.5.3/../../../avr/include/avr/sfr_defs.h:126,
                 from /usr/lib/gcc/avr/4.5.3/../../../avr/include/avr/io.h:99,
                 from main.c:4:
/usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or directory
compilation terminated.
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings

I have no idea why the bits/predefs.h is included(?).
I would appreciate any help, it was very satisfying to see that the Arduino would work with the
Linux (Ubuntu 12.04) USB port.
Once again, I am here for assistance and thank you for any advice.

Question: Would it make any difference by installing build-essential package, I am thinking it
might not be required (?).

I'll believe corporations
are people when Texas executes one.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

On my box sfr_defs.h is in another directory and I had to install avr-libc as a separate package.

Quote:
paul@dualcore /usr $ find . -name sfr_defs*
./lib/avr/include/avr/sfr_defs.h
paul@dualcore /usr $ avr-gcc --version
avr-gcc (GCC) 4.5.3
Copyright (C) 2010 Free Software Foundation, Inc.

Doing magic with a USD 7 Logic Analyser: https://www.avrfreaks.net/comment/2421756#comment-2421756

Bunch of old projects with AVR's: http://www.hoevendesign.com