Skip to main content

Questions tagged [compiler]

A compiler converts source code (C++, Java, etc) to machine code which is what the CPU runs.

Filter by
Sorted by
Tagged with
2 votes
0 answers
36 views

Unnecessary recompille after connection error

I sometimes multitask during a large compile (wifi, etc libraries) and don't get back in time to press the ESP32 upload button. If the connection times out, the IDE recompiles all the source again. ...
user1527315's user avatar
-1 votes
2 answers
103 views

Removing the L from F_CPU in assembly

I am developing a mixed c++ /asm project. In the asm I am using F_CPU to do some busy waiting as follows. However, by default, the F_CPU is defined with a trailing L (for long). The asm is not able to ...
Fabio Dalla Libera's user avatar
2 votes
1 answer
246 views

How to make the compiler ensure that local variables memory allocation won't cause any RAM overflow during execution?

Upon compiling a sketch using the Arduino IDE, a message like the following gets displayed in the console: Global variables use 1540 bytes (75%) of dynamic memory, leaving 508 bytes for local ...
Ramanewbie's user avatar
1 vote
1 answer
1k views

Compiler error: final link failed: bad value collect2.exe

I work With VS Code v:1.59.1. With extension vscode-arduino v:0.4.4 befor update of vscode. in version 1.58. all was ok. I can build and upload code for all mucrocontrollers. but after the update, I ...
Hassan Daoud's user avatar
0 votes
1 answer
130 views

Global array doesn't get assigned the space it would take up in memory

I have this sketch: const uint32_t len = 65536; uint8_t arr[len]; void setup() {} void loop() {} The length of the array should fit into the dynamic memory. However, when I compile the sketch it ...
LukasFun's user avatar
  • 295
1 vote
0 answers
457 views

Can data be stored in program storage space instead of dynamic memory?

I'm declaring an array at top level like so: constexpr byte a[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; // whatever data I'm referencing the array in such a way that it's not optimized away. When ...
adrianton3's user avatar
0 votes
1 answer
149 views

Problems with compiling more then one sketch in the Arduino IDE

I found this ESP8266-MQTT program on Github. How can I compile this thing with the Arduino IDE? I only can open one sketch at a time. If I try to compile this then parts of the program are missing for ...
Fred Mustermann's user avatar
2 votes
1 answer
3k views

ld.exe:linker_script.ld:138 cannot move location counter backwards | ArduinoFFT Error

Board: Arduino Nano 33 BLE Sense I'm pulling PCM data from an onboard microphone and running it through the arduinoFFT library (version 1.5.6) to obtain a spectrogram. Since the arduinoFFT library ...
Ben L's user avatar
  • 23
2 votes
1 answer
1k views

Arduino IDE - scope of the pre-processor "#define"

I'm creating an Arduino library and have 3 files - a "test.ino" program, and two library/class files: "testLibrary.h" and a "testLibrary.cpp". The library makes use of ...
Zanshin's user avatar
  • 61
6 votes
3 answers
3k 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 ...
Supragy Mishra's user avatar
4 votes
1 answer
598 views

Does the compiled binary of a sketch include uncalled functions from a library?

I am writing a GUI using a TFT display and the Adafruit GFX library and its default font on Arduino Nano. I want to be memory efficient and I assumed that the 'optimise for size' default setting of ...
WildCat's user avatar
  • 323
1 vote
0 answers
254 views

Error compiling to ESP32 using Arduino: Operand 2 of 'l32r' has out of range value

I was trying to follow this tutorial and ran into a problem compiling on the Arduino IDE with an ESP32 board. https://eloquentarduino.github.io/2019/12/how-to-do-gesture-identification-on-arduino/ I ...
solutionhacker's user avatar
1 vote
0 answers
99 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 ...
Nathan Almeida's user avatar
1 vote
2 answers
120 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?
user65440's user avatar
0 votes
1 answer
4k views

Can't use uint16_t in library

I wonder why the following minimal example sketch doesn't compile (unknown type name 'uint16_t'): sketch_does_not_compile.ino: #include "myheader.h" void setup() { char a[]="hello ...
Sim Son's user avatar
  • 1,878

15 30 50 per page