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
0
votes
0answers
30 views

How to add additional include path (e.g. as a flag) to Arduino Compiler?

I have been trying for a while to add an additional include path to Arduino compiler (in VS-Code) to be able to compile my project that has header and source files distributed in different levels of ...
0
votes
0answers
32 views

How to compile Arduino Framework with GNU

I'm wondering if it's possible to use GNU (g++) to compile a arduino Sketch. I wanna be able to unit test my code with catch2. g++ -std=c++11 <filename> works well with catch2, but I obviously ...
1
vote
0answers
32 views

Trying to show g++ (linter-gcc for Atom) where to find Arduino libs

I'm trying to use Atom as an IDE for arduino and arduino-based boards. I'm using arduino-cli for compilation and avrdude for upload, and now I'm trying to use linter-gcc for linting. g++ is running ...
0
votes
1answer
43 views

Changes to user included library

I've been putting a small helper library together which I'm just including manually via the libraries sub-directory. I've just made some changes to the library in the filesystem however when trying to ...
1
vote
2answers
71 views

Gratuitious instantiation of `Serial`, why?

Let's take a very simple sketch, any simple one-.ino sketch. Say, just a led blinker like this void setup() { pinMode(LED_BUILTIN, OUTPUT); digitalWrite(LED_BUILTIN, LOW); } void loop() { ...
0
votes
1answer
184 views

ESP32 on Arduino IDE: Identify the board type in code (preprocessor macro)

I have read the answers on this post, but they do not seem to be providing a solution for ESP32 boards. Is there a way to get the .name that is used from the boards.txt without modifying the platform....
0
votes
2answers
49 views

Runtime compilation

I want to compile a sketch on Arduino Uno, while Arduino is running and not connected to anything else, and then run the compiled sketch automatically. Is this feasible? How?
0
votes
0answers
85 views

Error compile board LOLIN(WEMOS) D1 R2 & mini

I have a wemos d1 mini and a mpu 6060 sensor. I am trying to send the data from the sensor to Firebase. However i have come across a hurdle which i cant seem to solve. This is my error, can you help ...
0
votes
1answer
25 views

Exit status 1 can't compile [closed]

I am a complete beginner with very little knowledge. I am trying to do a switch in Arduino UNO using a guide I found on the internet but it won't compile. The servo motor should function if it is ...
0
votes
0answers
70 views

Compile error with Arduino tensorflow lite library

I was reading the article about tensorflow lite on SAMD51 here and tried it and failed to compile. It was the example from the arduino tensorflow lite lirabry and doesnt seem to compile. Selected ...
1
vote
0answers
84 views

Arduino uno wifi rev2 error compiling sketch to board [duplicate]

I'm having an irritating situation with my Arduino Uno wifi rev2 board. I made an installation with an LCD, keypad and little servo motor. I first wrote the code for my regular Arduino Uno and ...
0
votes
1answer
43 views

Arduino Nano/Uno and js sketch compiling/uploading from browser

I need to compile generated source code in js runtime then upload it to my device. Compiling: I have found arduino-cli Uploading: There is only avrgirl but it doesn't work in browser. What should ...
0
votes
0answers
239 views

Having problems compiling this code for NRF24l01 on stm8s103f3p6

It said it has mutiple libraries were found for "nRF24L01.h" but i check the Ardurino libraries I can only found one. And it work fine if I compile it to Arduino uno. //Include Libraries #include <...
1
vote
0answers
68 views

Error Compiling any coding in Arduino IDE

I was using the example code of "Blink", and when I try to compile it, it pop out an error as below. I tried to: uninstall and installed back the Arduino IDE installed different versions of Arduino ...
1
vote
1answer
62 views

How to delegate code compilation to a remote machine?

Sometime I write Arduino code on a slow Windows laptop that I use for controlling hardware projects and 3D printing. My main Windows computer and also my Linux home server are located somewhere else ...
0
votes
1answer
23 views

What is the difference between Tools > Board settings in Arduino IDE? ex: ESP32-Dev v. Huzzah32

I had a recent memory issue where the resolution was to change the Tools > Partition setting. However this setting wasn't available in the Arduino IDE for the boards I was using (Huzzah32 and NodeMCU-...
0
votes
2answers
82 views

Compile error in Ubuntu 18.04

I'm trying to compile a code to arudino pro micro, I have the right option for compiling like the port and the type of the board,but I get an error,I can't copy
0
votes
2answers
46 views

Project wont compile when I place functions below function calls [closed]

I use VSCode, not the Arduino IDE. I saw and tried to use a lot of code snippets which are provided for Arduino projects... So when I copy/paste these examples into my VSCode and try to compile it ...
1
vote
0answers
332 views

code error- Real Time Clock program-DS3231 RTC module

I'am a NEW-B with an ELEGOO mega 2560 starter kit.The program code came from their disc.The verifying error message for the declaration: RTCDateTime dt; is RTCDateTime' does mot name a type exit ...
0
votes
1answer
123 views

How to Compile Different Sketches in Different Visual Studio Code Workspaces

I'm using Visual Studio Code with the Arduino extension. I have two workspaces each with a different sketch file loaded - Sketch_1 and Sketch_2. Sketch_1 will verify and upload properly. When I click ...
0
votes
0answers
50 views

Combining sketches

I have two codes for my to sensors and they work separately. However, I need to combine them in one program please can you help? The pulse code /* PulseSensor Starter Project and Signal Tester * ...
1
vote
0answers
124 views

Eclipse “CDT Core Builder” error

I installed an Eclipse Version: 2018-12 (4.10.0) for Arduino. I’ve got an CDT Core Builder error when I try to compile. I’ve searched but cannot fix the problem.
0
votes
1answer
1k views

Multiple definition error when linking firmware.elf

I just can't wrap my head around on how to properly work with multiple files. My code has been getting quite big so I decided to split all the classes into one file each. So I'm left with 6 files: ...
1
vote
0answers
151 views

Why does the program size increase so drastically with these switch-cases?

EDIT: The problem is my op-code catch is op >= 0x20 || op <= 0x2F rather than op >= 0x20 && op <= 0x2F and so most of the switch-case was being optimised away! This is a really ...
5
votes
1answer
954 views

How can I have code in a project that won't compile for Arduino?

I want to test the algorithms in my code without needing to send it to an actual Arduino board. I figured I could lay out my project like: project/ core.cpp # core algorithms core.h ...
0
votes
1answer
1k views

'dynamic_cast' not permitted with -fno-rtti

class A { virtual ~A(); } class B : public A { public: int foo; } void bar(A *foo_){ B* b = dynamic_cast<B*>(foo_); if(b != nullptr){ cout << (*foo_)->...
1
vote
2answers
521 views

How do I make Arduino IDE use a specific version of GCC in Debian?

Using Raspbian Stretch. I installed gcc-4.9 with specified version. Then I installed arduino (2.1.0.5) which in turn pulled gcc 4.6. When I try to compile Marlin in it, it says Marlin requires C++...
2
votes
0answers
445 views

Prevent Arduino IDE from rebuilding the core library after every restart

I have an Arduino IDE 1.8.5 setup (installed from the ZIP file) which I use to work exclusively with a single board. Every time the IDE is restarted, the first compilation takes much longer than ...
0
votes
1answer
247 views

Headers linking - PlatformIO

For those who use the IDE Platform IO, I have an issue for you. I use to program a home application of sensor reading and use the library "JC_Button.h" to manage buttons. There are other third-party ...
1
vote
1answer
53 views

Changing type of one variable dramatically changes compile size

I have a sketch containing the following method: // Writes zeros to the complete screen clearing it: void clearScreen(uint8_t val) { setDrawArea(0x00, 0x7f, 0x00, 0x07); // complete screen ...
1
vote
1answer
59 views

Cannot load anything from library

So I installed libraries through the Arduino interface (Sketch > Include Library > Manage Library). Then I check: C:\Users\username\OneDrive\Documents\Arduino\Libraries, and I confirm the new ...
2
votes
0answers
1k views

ESP8266 can't read parasitic DS18B20 temperature (reset during conversion, 85°C)

tl;dr at the end I was running two DS18B20+PAR temperature sensors without any problems for the last two years on an ESP-01 module running on 3.3V on GPIO 2 using a 4.7K pullup resistor. Now, ...
1
vote
1answer
992 views

Compiling with -flto and -nostartfiles results in no program at all

Towards developing my own bootloader I've stumbled over an issue with avr-gcc. I am trying to compile my code with the compiler flags -flto #to enable link time optimization -nostartfiles #...
2
votes
2answers
258 views

Purposely create compile error to fail the upload [closed]

I would like to create a compile error so sketch does not upload in certain cases. I have written a library with a function that adds pins being used to an array. If the same pin is used twice I ...
1
vote
1answer
1k views

Segmentation fault at Serial.begin()

I try to communicate with my Arduino clone (Elegoo Uno R3) from Arduino IDE (v1.8.4 installed by dnf from repos) at Fedora 27. Compiling and upload of normal example code works well. However, as I try ...
2
votes
2answers
6k 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: #...
23
votes
2answers
12k 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 ...
0
votes
2answers
101 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, (...
3
votes
1answer
181 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 ...
0
votes
2answers
82 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. (...
2
votes
3answers
2k 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 ...
1
vote
1answer
1k 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 ...
0
votes
1answer
8k 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 ...
0
votes
2answers
366 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: ...
2
votes
2answers
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 ...
2
votes
3answers
959 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 ...
2
votes
1answer
6k 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 ...
1
vote
1answer
184 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 ...
1
vote
1answer
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 ...
-1
votes
1answer
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: ...