Closed
Description
Bug Report
Current behavior
I created a new sketch sketch_july2a
with the default content (empty setup and loop functions).
The command
arduino-cli compile --preprocess --fqbn arduino:avr:uno sketch_july2a.ino
gives me the following output (full path of source file replaced with ...
):
# 1 ".../sketch_july2a.ino"
# 1 ".../sketch_july2a.ino"
# 2 ".../sketch_july2a.ino"
void setup();
# 7 ".../sketch_july2a.ino"
void loop();
# 2 ".../sketch_july2a.ino"
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Expected behavior
The generated C++ code is missing #include <Arduino.h>
, and the source file and line number instructions should start with #line
.
This is the result of compiling the sketch with the Arduino app, which I would also expect as output of the arduino-cli command above:
#include <Arduino.h>
#line 1 ".../sketch_july2a.ino"
#line 1 ".../sketch_july2a.ino"
#line 2 ".../sketch_july2a.ino"
void setup();
#line 7 ".../sketch_july2a.ino"
void loop();
#line 2 ".../sketch_july2a.ino"
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Environment
- CLI version: 0.3.7-alpha.preview (built from branch
massi/preprocess
Fix compile error when --preprocess or --show-properties were passed #331) - Go version: go1.12.7
- OS version: macOS 10.14.6
Additional context
I'd like to get the C++ code that is generated as an intermediate step when compiling a sketch.
Metadata
Metadata
Assignees
Labels
No labels