I followed this guide: http://arduinodev.com/guide-to-arduino-development-environment-codeblocks/

Everything seemed to work until I compiled the example code:

#include <Arduino.h>

  Turns on an LED on for one second, then off for one second, repeatedly.

  This example code is in the public domain.

void setup()
    // initialize the digital pin as an output.
    // Pin 13 has an LED connected on most Arduino boards:
    pinMode(13, OUTPUT);     

void loop()
    digitalWrite(13, HIGH);   // set the LED on
    delay(1000);              // wait for a second
    digitalWrite(13, LOW);    // set the LED off
    delay(1000);              // wait for a second

and it gave me this errors:

||=== Build: Simulator - Debug in test (compiler: GNU GCC Compiler) ===|
/home/meneses/.codeblocks/ardusim/include/util/delay.h|90|warning: #warning "Compiler optimizations disabled; functions from <util/delay.h> won't work as designed" [-Wcpp]|
/usr/include/x86_64-linux-gnu/sys/types.h|197|error: conflicting declaration ‘typedef long int int64_t’|
/home/meneses/.codeblocks/ardusim/arduino/cores/stdint.h|33|error: ‘int64_t’ has a previous declaration as ‘typedef long long int int64_t’|
/usr/include/unistd.h|267|error: conflicting declaration ‘typedef __intptr_t intptr_t’|
/home/meneses/.codeblocks/ardusim/arduino/cores/stdint.h|66|error: ‘intptr_t’ has a previous declaration as ‘typedef int intptr_t’|

If I click on those errors I go to this following libraries:

first error - type.h, on line 197:

__intN_t (64, __DI__);

second error: stdint.h, on line 33:

typedef long long  int64_t;

third error: unistd.h, on line 267:

typedef __intptr_t intptr_t;

forth error: stdint.h, on line 66:

typedef int intptr_t;

And there's also the warning, on the delay.h library, line 90:

# warning "Compiler optimizations disabled; functions from <util/delay.h> won't work as designed"

How can I fix this?

Thank you!

edit: I've also found this error if instead of running the simulation debugger I run arduino UNO for example:

library features.h, line 374, error:

fatal error: sys/cdef.h: No such file or directory

But none of the other errors above..

The line is: # include <sys/cdefs.h>

Edit2: solved the previous error by running this command: sudo apt-get install libc6-dev-i386

but now I'm running into 'uint_farptr_t' was not declared in this scope, I'll try to solve them.

edit3: fixed the previous item by going into code::block's settings -> compiler -> selected compiler -> GNU GCC compiler for AVR -> Search directories -> Compiler -> remove /usr/include

I don't know the consequences of this, but it fixed that error.

Now I'm getting 5 errors of this type:

/home/meneses/.codeblocks/arduino/hardware/arduino/cores/arduino/HardwareSerial.cpp|91|error: attempt to use poisoned "SIG_USART0_RECV"|

edit4: I feel like cryinggg

edit5: I'm now willing to install other IDE, all I want is to be able to run simulations.

I'm using Linux Mint 17.3.

  • Why are you compiling 64bit stuff for an 8 bit Arduino? That seems really weird to me, is it possible you are picking up a header file or define from you Linux machine? Can you run the IDE on a virtual machine running Windows? – Code Gorilla Aug 4 '16 at 12:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.