Questions tagged [compile]

To compile is to convert the code for a sketch into machine readable files that are uploaded to the Arduino. This tag is mostly used for the space and footprint of the files uploaded to the Arduino.

Filter by
Sorted by
Tagged with
2 votes
2 answers
7k views

multiple definition of local variable in linking

I am trying to make my own library and it uses some local variables with the same name as some variables in ino. Compiler complains about it. I stripped it to (nonsence but simple) example mylib.h: #...
gilhad's user avatar
  • 1,410
41 votes
2 answers
38k views

Warning when verifying sketch with VS code

I use Visual Studio Code to develop for arduino which uses Arduino Studio installed files and needs the installation to work. This works very well. Annoying is that when verifying a sketch it takes ...
Uwe Hafner's user avatar
0 votes
2 answers
125 views

Efficiency of a cast vs a shift

I'm using a supplied library which uses a number of (non-sequential) outputs to latch a multiplexer. The code looks (in part) like this: digitalWrite(_S0, (chan & 1)); digitalWrite(_S1, (...
Jim Mack's user avatar
  • 237
3 votes
1 answer
188 views

Why don't these sketches produce a similar output?

I compiled the following two sketches with the compiler used by the Arduino IDE and ran them on an Arduino UNO (smd edition). I'm using: Arduino IDE v. 1.8.0 Arduino AVR Boards v. 1.6.20 1. void ...
noearchimede's user avatar
1 vote
2 answers
113 views

Preprocessing problem

I've a little problem, I'm trying to create a library with processor variables for tune it. So in .ino I declared my preprocessor var, but preprocessor variables appear not defined in my library. (...
Servuc's user avatar
  • 133
2 votes
3 answers
3k views

If statement comparing array to value list throws error

In my program I have the following lines of code: if (invest == {0, 1, 0, 0}) { //code } However, upon attempting to compile the code, I receive the following error: exit status 1 ...
Excelseo's user avatar
1 vote
1 answer
2k views

I need to restart Arduino IDE after each compilations

I'm using the Arduino Due and testing an I2C Scanner, the I2C Scanner works correctly but each time I want to upload a newer version of the code I get this error message : No device found on COM11 ...
snoob dogg's user avatar
3 votes
1 answer
16k views

fatal error: avr/io.h: No such file or directory

I'm compiling a project on Due that was working correclty using UNO. I get this error : 'avr/io.h: No such file or directory'. Searching across the web, it seams I'm not the only one to get that error ...
snoob dogg's user avatar
0 votes
2 answers
412 views

Error trying to compile an example from newly added Arduino menu library

I added the ArduinoMenu library https://github.com/neu-rah/ArduinoMenu and when I try to compile one of the examples, I get following error. Using library LiquidCrystal at version 1.0.5 in folder: ...
Hjhk90's user avatar
  • 291
2 votes
2 answers
1k views

How get assembler/preprocessed code for library

I am using https://github.com/sudar/Arduino-Makefile project with https://github.com/ladislas/Bare-Arduino-Project to compile my Arduino projects from Linux command line. I put as much as possible ...
gilhad's user avatar
  • 1,410
2 votes
3 answers
2k views

Compiling code via terminal

How can I compile my code via terminal? I am working on a Chrome app that allows you to write, compile, and upload code to an Arduino, and I need to know this so I can use the command line compiler on ...
Jordan Baron's user avatar
3 votes
1 answer
7k views

My Digispark board won't show up in Ports tab in Arduino IDE (OSX)

I bought a Digistump/Digispark board online and when i received it, I plugged it into my iMac to see if it works. I went to the apple in the top left corner and clicked "About this Mac". Then I ...
Sergei Glimis's user avatar
1 vote
1 answer
249 views

How to program an Arduino Uno Pro with a makefile?

I'm using Arduino Makefile to compile sketches for Uno and Mega boards. I'm now trying to compile a sketch for an Arduino Uno Pro, which is an Uno with a replaced chip to give it features more like a ...
Cerin's user avatar
  • 1,598
1 vote
1 answer
1k views

How to programmatically upload an Arduino sketch generated by node.js (electron) or from browser?

We are trying to make an app that generates an Arduino sketch (.ino) using Google's Blockly and node.js, and uploads it to Arduino. Even after searching a lot, I am unable to find how to build and ...
Siddhesh's user avatar
-1 votes
1 answer
2k views

Win10 64bit, IDE 1.8.0 back to IDE 1.6.13 won't compile anything including Blink. 1.6.12 does compile

Arduino: 1.8.0 (Windows 10), Board: "Arduino/Genuino Uno" c:\program files (x86)\arduino\hardware\tools\avr\bin../lib/gcc/avr/4.9.2/../../../../avr/bin/ar.exe: unable to rename 'core\core.a'; reason: ...
ArduinoAngryAtMe's user avatar
1 vote
2 answers
672 views

What do I do about a compiler error " variable 'font' must be const"

I am trying to run the test program from Adafruit, with their libraries, for an Arduino controlling a Nokia5110 display and get this error message: Arduino: 1.5.8 (Linux), Board: "Arduino Pro or Pro ...
Harry Weston's user avatar
0 votes
1 answer
204 views

How do I see the command line equivalent of clicking Verify?

I am using the ESP8266 board manager. I want to see how Arduino IDE compiles my code once I click Verify. Why do I want to do this? I am trying to integrate a C library for which there is now ...
Kit's user avatar
  • 101
0 votes
2 answers
814 views

Why can't my .cpp file have a class of the same name?

I made a new Arduino IDE project ABC, and am given ABC.ino. Then I create a XYZ.h and XYZ.cpp. ABC.ino: #include "XYZ.h" void setup() {} void loop() {} XYZ.h: #ifndef XYZ #define XYZ #include "...
Fine Man's user avatar
  • 189
1 vote
2 answers
572 views

Compiling sketch vi command line

Since I don't like the text editor of the Arduino IDE, I decided to write a python script that I can invoke from my text editor to compile and upload my source. I program the popular esp8266 chip. So ...
dnnagy's user avatar
  • 111
1 vote
1 answer
191 views

avr-gcc -D is ignored

Im trying to use XCode to compile avr program with arduino libs but seems like something wrong with my Makefile because it throws me warnings like # warning "F_CPU not defined for <util/delay.h&...
user840250's user avatar
6 votes
1 answer
709 views

Referencing local libraries from higher dir levels

How can I include libraries not contained in any direct subdirectories of a sketch, using the Arduino IDE? I want my project structure to look like this: Project └> MCUa └> MCUa.ino └> ...
Clausen's user avatar
  • 161
2 votes
2 answers
1k views

How to properly understand verbose compiler error text? For beginner level

I'm an Arduino newbie, no background in C/C++, needing help to understand Arduino IDE verbose output about compiler errors. My searching failed to find suitable info - have I missed a relevant guide? ...
jules's user avatar
  • 75
1 vote
1 answer
166 views

I swear this worked yesterday!! - mysterious compiler error

I thought I finally had this working yesterday, the code compiled, and executed on the arduino, there were however some small quirks but today I went to fix a small timing issue, but got the following ...
user26383's user avatar
0 votes
1 answer
172 views

where to get Arduino WIFO101 library that supports WiFi.beginAP() on board MKR1000

The sketch example from page "Wifi.beginAP()" causes compiler error because the return values are not defined for -WL_AP_LISTENING or -WL_CONNECT_FAILED. Board: Arduino MKR1000 WiFi Compiler: ...
Doug Null's user avatar
  • 191
1 vote
2 answers
1k views

How to change Arduino Nano MODEL_ID

I'm working on a project using a set of different Arduino Nano connected to a Raspberry Pi through USB. Now my question is: "how can I, from the Pi's point of view, differentiate all of those Arduino ...
Ulysse Darmet's user avatar
-2 votes
1 answer
109 views

No power_usi_disable() on Arduino Uno

we have an error after compiling the code in arduinouno that is displayed as error: 'power_usi_disable' was not declared in this scope in Board: "Arduino/Genuino Uno".how to rectify this error. ...
ppsrc's user avatar
  • 1
0 votes
1 answer
6k views

Compilation Error

Hi everyone I seem to have run into a problem while uploading a library to the board. I managed to import the library to Arduino Uno, however, i could not upload it Please Help :) Thanks in Advance ...
Pendukeni Pandeni's user avatar
1 vote
1 answer
1k views

Force compiler to execute instructions sequentially?

Is there a way to force the Arduino compiler to compile individual commands sequentially? Looking at the disassembly, lines of the assembly code for different C/Arduino commands are mixed. I was ...
Alexandra's user avatar
1 vote
1 answer
184 views

How to use same sketch on two different computers in two different directories

I have the same sketch one that I use at my desk and in the lab, but they are in different directories on the different computers. This means that I have to change the paths to the includes which I ...
Gregg's user avatar
  • 165
2 votes
3 answers
3k views

How to include <SPI.h> outside the .ino file

As I understand, Arduino IDE considers two paths for the libraries: first, "C:\Program Files\Arduino\libraries" and second, the "libraries" folder next to the schetchbook. I have a ...
Makan's user avatar
  • 239
1 vote
3 answers
626 views

Compile Error for Arduino Mega

I am using the Arduino IDE 1.6.0, There is a project that has compiled both for Due and Mega on another computer. But on my machine, it only compiles for Due. When compiling for "Mega or Mega 2560", ...
Makan's user avatar
  • 239
1 vote
2 answers
2k views

Linker error when trying to use functions in separate header and source files

It is my first day of working with Arduino (it is a Due). I want to read from TMP102 through I2C. I wrote some code and it works just fine. But now I want to separate the TMP102 code from the main ...
Dumbo's user avatar
  • 109
0 votes
2 answers
3k views

How to compile an official VS1003 / VS1053 example for Arduino / ESP8266?

Have anyone ever successfully run any of the official playback and recording examples for VS1003 or VS1053 on Arduino / ESP8266? I mean, I was able to play sound with VS1003, but I just can't make the ...
P.W.'s user avatar
  • 307
0 votes
2 answers
4k views

Error on Arduino Code (unknown type name 'LiquidCrystal')

I am using Arduino IDE 1.6.8 and I am trying to compile the following code Wheatstone Bridge. I have currently a really weird error: unknown type name 'LiquidCrystal' This error seems to come from ...
Guuk's user avatar
  • 103
-2 votes
1 answer
102 views

Compilation fails with non-explicit error message

I have written the following code for a project comprising an ultrasonic distance sensor, a buzzer and a few buttons. When the distance is less than 60 cm, the buzzer rings and stops only when ...
Rohan Gautam's user avatar
0 votes
1 answer
39 views

Unidentified constant value

im working on the following project kalman filter and im working to implement in arduino.. i read the entire code and i succesfully implemented it into arduino but i couldnt implement the following ...
sir mordred's user avatar
0 votes
1 answer
2k views

"missing filename" compilation Error

I've recently got back to my Uno. I tried compiling my program and got the following error: Arduino: 1.6.6 (Windows 8.1), Board: "Arduino/Genuino Uno" avr-g++: error: missing filename after '-o' ...
EoinScully's user avatar
12 votes
2 answers
11k views

Will a .ino Arduino Sketch compile directly on GCC-AVR?

Okay, we all have seen those questions all over the web such as Arduino v.s. C++, or other similar questions. And a vast majority of the answers do not even touch compilation differences other than ...
RedDogAlpha's user avatar
0 votes
2 answers
302 views

help compiling code for flora project

I'm working on the Adafruit Firewalker shoes. I can't make my code compile to test my flora project. This is my error message: Arduino: 1.6.7 (Windows 10), Board: "Adafruit Flora" C:\Users\Devi\...
Devin Caron's user avatar
7 votes
2 answers
9k views

Is there a way to upload precompiled code to an arduino?

My company is developing a programmable remote control car which is driven by an Arduino Nano. We would like a way for the user to install software updates to the Arduino, but we don't want to give ...
TheIronKnuckle's user avatar
0 votes
1 answer
1k views

compilation error in arduino

I'm new to arduino. I had found an interesting project to work on with, but unfortunately I'm held up at compilation error. I tried finding answers to this problem but not able to understand. Here is ...
overmass123's user avatar
0 votes
2 answers
833 views

Using Arduino IDE as an API

I have a project where it would make a lot of sense to generate Arduino compatible source code, compile it and flash it based on some settings in the project software. Is there any way to do this ...
Mr. Developerdude's user avatar
1 vote
1 answer
180 views

Defining object

I am trying to hide libraries behind another, for simplicity. But I can't deal with the objects required by the libraries. Basically I want to use the objects both in my .cpp and .ino file, but I am ...
Vasil Kalchev's user avatar
0 votes
2 answers
4k views

SPISettings was not declared in this scope

I'm trying to compile a simple I2C example to read data from an MPU-6050 accel/gyro sensor, but I'm getting the compilation error: /usr/share/arduino/libraries/SD/src/utility/Sd2Card.cpp:27:8: error: ...
Cerin's user avatar
  • 1,598
1 vote
1 answer
2k views

Error compiling Arduino

I've just installed the last version of Arduino 1.6.7 plug my Arduino SmartEverything (http://www.smarteverything.it/) to OS X 10.11.2, try to compile this project: https://github.com/nicolsc/sigfox-...
Nuñito Calzada's user avatar
0 votes
1 answer
1k views

Trying to understand compilation error message

C:\Users\Field\Documents\Arduino\Adafruit_TCS34725-master\examples\tcs34725autorange\tcs34725autorange.ino:2:31: fatal error: Adafruit_TCS34725.h: No such file or directory #include "...
Dan Wilkes's user avatar
2 votes
1 answer
763 views

Compilation error using arduino-mk on arch Linux (undefined reference to __dso_handle)

I'm compiling a simple sketch that reads values from an analog input and activates a buzzer on a digital input. working on an Arduino uno. the sketch compiles and runs fine on windows and arch linux ...
NivPgir's user avatar
  • 23
2 votes
3 answers
1k views

UART error can not compile on Arduino Yun (ATmega32u4)

This code is used for communication between the Glediator interface and a NeoPixel Matrix, but I receive an error saying 'UCSR0A' is not defined within the scope. UCSR0A |= (1<<U2X0); ...
JenniferDevelopez's user avatar
3 votes
2 answers
2k views

Cannot find crtatmega328p

I have just installed the arduino IDE on my gentoo laptop. I then installed the toolchain with the following command: crossdev -s4 avr This does a stage 4 install of the toolchain, with all its ...
tensai's user avatar
  • 131
2 votes
1 answer
238 views

How can I make Arduino IDE use Atmel's provided toolchain? (Linux/Ubuntu)

I have an Arduino based board using ATmega168PB, but so far only Atmel's provided toolchain supports this microcontroller. I can download the toolchain from Atmel's website, but I am not sure how to ...
Rodrigo Da Silva Guerra's user avatar