Skip to main content

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
3 votes
2 answers
4k views

How to upload already compiled code when no changes were made?

How do I use the Arduino IDE to upload the last compiled code? I don't want to have to wait 2 minutes to upload compiled code when there are no changes. It's a big codebase, where I frequently make ...
0 votes
1 answer
151 views

Problem converting a sketch from SPIFFS to LittleFS - no matching function for call error

I'm playing with a tutorial from this DroneBot Workshop YouTube (excellent video presentation by the way on WiFi manager for newbies). I am working with a NodeMCU ESP8266. The example code was written ...
0 votes
1 answer
172 views

The Arduino copy of example code for tone() function produces a compile error: 'tone' is not declared in this scope. How can I fix this?

It's 32-bit ARM core processor is SAM3X8E ARM Cortex-M3 CPU. Error: sketch_nov16b\sketch_nov16b.ino: In function 'void setup()': sketch_nov16b:49:43: error: 'tone' was not declared in this scope tone(...
2 votes
1 answer
337 views

How to find out all #define used by arduino-cli in compile?

How to find out all #define used by arduino-cli in compile? I had seen something some time ago, but I cannot find it again. I think that it was some option somewhere, and the result was that the ...
4 votes
3 answers
554 views

How to compile without adding the bootloader?

I'm using a standalone atmega328p with a 16MHz crystal. I'm programming it via avrdude on a raspberry pi, using the SPI and RESET pins. When I compile my program, this is what I see at the end of the ...
1 vote
0 answers
31 views

Sketch does not run right when uploaded via Arduino IDE vs PlatfomIO

I try to upload Adafruit's example sketch (Wemos mini 8266 + Lolin TFT-2.4" touch screen). When complied and uploaded via Arduino IDE v1.8.19, sketch runs OK (including TFT), but when uploading ...
2 votes
5 answers
223 views

Break a big file into smaller files

I had a really big .ino file and I decided to break it down into sub-files. So I had the .ino file, the globals.h file and the functions.h file. I moved all the global vars and functions to their ...
0 votes
4 answers
1k views

What should I do with stackOverflow in compile error?

I don't have port, but when I want to compile my code (even empty files), I encounter this error: Sketch uses 444 bytes (1%) of program storage space. Maximum is 32256 bytes. Global variables use 9 ...
1 vote
0 answers
120 views

Error compiling arduino sketch to seeduino xiao for RF24 Module

I am trying to get 2 rf24 modules talking to each other. This is my first real arduino project so bear with my ignorance please. I could get them to work with 2 arduino nano but, when trying to ...
5 votes
1 answer
1k views

Library not found when using the arduino-cli command (although working with the Arduino IDE)

I have a sketch which I can upload without problem with the Arduino IDE. I installed the arduino-cli Version: 0.28.0 Commit: 06fb1909 Date: 2022-10-18T15:53:04Z. I want to compile and upload a code ...
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 ...
1 vote
1 answer
968 views

Error compiling code (tv-b gone)

I have been getting started with the Arduino and found a great project online called TV-B-Gone. It includes some code which I cannot compile. Yes I have included main.h and worldcodes.cpp. /* TV-B-...
0 votes
1 answer
961 views

"previous declaration of 'HTTPMethod HTTP_HEAD'"

I'm getting the following error when I try to compile my code on my LOLIN(WeMos) D1 R1: In file included from C:\Users\Administrator\Documents\Arduino\libraries\WiFiManager/WiFiManager.h:17, ...
4 votes
2 answers
353 views

How to cut down size of imported DigiKeyboard library

I'm working on a project with a Digispark ATTiny85, that performs keystrokes using the DigisparkKeyboard library (https://github.com/digistump/DigisparkArduinoIntegration/tree/master/libraries/...
0 votes
0 answers
150 views

Disable USB support for mega32u4

I have a custom Leonardo board (mega32u4-based) that does not use at all the USB features. When I build my sketch (vscode and platformio) I read: Compiling .pio/build/leonardo/FrameworkArduino/CDC.cpp....
2 votes
2 answers
241 views

How to install the application + its configuration to many devices of the same kind? (ESP32)

Being the newbie in the Arduino area... Having more devices, how can I upload some configuration parameters after the code was uploaded? Is it possible? Situation: I have the simple application for ...
1 vote
0 answers
647 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 ...
30 votes
6 answers
57k views

How to compile, upload and monitor via the Linux command line?

Interfacing an Arduino Uno (uploading etc.) with the Arduino IDE (using the Fedora package) works fine under Fedora 21. But I rather want to use vim + make + vim-quickfix-mode etc. How can I do that?...
0 votes
1 answer
3k views

Random "Compilation error: Error: 13 INTERNAL: exit status 1". No clue how to resolve or even what causes this error

I am a beginner with Arduino. I have a program that is intentionally simple. The code refuses to compile, spitting out the error Compilation error: Error: 13 INTERNAL: exit status 1. I have gotten ...
1 vote
1 answer
69 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 ...
5 votes
2 answers
1k views

Does the compiler generate intermediate assembler?

My source files are *.ino, but after compilation there aren't any other files placed in the folder. Does the compiler generate intermediate assembler, and if so, where does it leave them? Or is the ...
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 ...
2 votes
1 answer
171 views

Conditional compilation depending on sizeof(double)

Is there a macro (#define ...) somewhere in the bowels of Arduino IDE or core header files which tells me at compile time(!), if the double data type for a given platform/board is a true double ...
1 vote
1 answer
307 views

Program size optimization

I am trying to spare a few bytes of program size. I faced a problem which I cannot understand and I hope somebody will help. Look at this empty sketch, pleas. It takes just 444 bytes: void setup() { } ...
1 vote
0 answers
59 views

Fresh install getting Assembler Error

I am using Raspberry Pi 4 to connect via usb to program ardino Nano, I intend to communicate with the nano via i2c, but this is irrelivant. With a fresh install of Arduino for ARM 32 bit I get this ...
5 votes
3 answers
2k views

Using Arduino as a standalone compiler

I mostly program in C/C++ so I conviniently have a GCC compiler for all my compilations. I was wondering if there is a special compiler for Arduino that can be used just like the GCC Compiler? Because ...
5 votes
6 answers
14k views

LCD 16*02 I2C shield only shows first character printed

I have an I2C LCD screen provided with a Sunfounder kit and certainly built by DFRobot or such a constructor (there is nothing written on the LCD), and an Arduino Uno R3 copy. My issue is when I use ...
1 vote
0 answers
88 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
0 answers
94 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 ...
1 vote
2 answers
93 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
1 answer
3k 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....
1 vote
2 answers
107 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?
1 vote
0 answers
221 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 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: ...
1 vote
2 answers
1k 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
0 answers
176 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 ...
2 votes
0 answers
386 views

Problem in Uploading through Visual Studio

This is my simple program: int led = 13; void setup() { pinMode(led, OUTPUT); /* add setup code here */ } void loop() { digitalWrite(led, HIGH); delay(1000); digitalWrite(led, LOW)...
0 votes
2 answers
307 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\...
0 votes
1 answer
215 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 ...
1 vote
1 answer
314 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 ...
10 votes
1 answer
4k views

Setting timer3 in CTC mode - conflict with servo library

I would like to set up a timer in order to call a function 800 times per second. I'm using the Arduino Mega and Timer3 with a prescaler of 1024. To choose the prescaler factor I've considered the ...
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 ...
1 vote
1 answer
1k views

undefined reference to `PPMintIn::PPMintIn(int)'

I am making a new library that will utilize PinChangeInt's library. My intention is to further simplify repetitive code by creating a library. (This is to allow for multiple PPM channels without ...
1 vote
0 answers
82 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
0 answers
848 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 <...
2 votes
1 answer
778 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 ...
0 votes
1 answer
834 views

Add -D option via boards.txt

I'm trying to find a way to set a -D compiler option from within the boards.txt file. Basically set a #define for use in code. There are already some special ones like board.vid but is there a generic ...
15 votes
1 answer
329 views

Is there a preprocessor constant for memory size

I would like my compiles to exclude some code depending upon the flash/program space available. To be used in the demo code of a library I support. Whereas my current solution is to use a #ifdef of ...
1 vote
1 answer
195 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&...
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 ...