Closed dhalbert closed 5 years ago
Hi @dhalbert ,
are you sure there is no stray file in the folder where the Blink you are compiling lives?
The ./new:1:40: error:
string looks suspicious.
I'll try on a clean 18.04 VM and will report back
@facchinm Hmm, there is a file named new
, but it is not in examples/01.Basics/Blink
, it's in my home directory (!). It happens to contain some code with hid_report_descriptor
. If I rename it to new1
, the problem goes away. (There were files labeled new
and old
I was diff-ing.)
But this is now a different kind of bug. Why should a stray file named new
be included in a compilation, and only for Nano 33 BLE? The panel icon I use to start arduino does start it up with my homedir as the current directory.
Indeed it's very suspicious; paths outside compiler and core folders should never be included... Unless you have something overriding the default paths as environment variable. Could it be the case?
I don't see any such env var; perhaps there is some typo in the Mbed build scripts (like a new
instead of $new
or something). The new
is not affecting other board compilations. I'll poke around.
.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/functional
has these includes:
Note the #include <new>
. So somehow .
is part of the include path.
#if __cplusplus >= 201103L
#include <new>
#include <tuple>
#include <type_traits>
#include <bits/functional_hash.h>
#include <bits/invoke.h>
#include <bits/std_function.h>
#if __cplusplus > 201402L
# include <unordered_map>
# include <vector>
# include <array>
# include <utility>
# include <bits/stl_algo.h>
#endif
For Arduino Nano 33 BLE< note, the -I.
:
/home/halbert/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++ -c -I. ...
In a vanilla Uno build, there is no -I.
as a command-line arg on any of the compilation lines.
Sorry for the slew of messages. In .arduino15/packages/arduino/hardware/mbed/1.1.2/platform.txt
, there is:
...
compiler.c.flags=-c -I. {compiler.warning_flags} -Os -g -nostdlib "@{compiler.mbed.defines}" "@{compiler.mbed.cflags}" {compiler.mbed.arch.define} -MMD -mcpu={build.mcu}
...
compiler.cpp.flags=-c -I. {compiler.warning_flags} -g -Os -nostdlib "@{compiler.mbed.defines}" "@{compiler.mbed.cxxflags}" {compiler.mbed.arch.define} -MMD -mcpu={build.mcu}
...
No other BSP platform.txt
files that I have installed include -I.
You are TOTALLY right. I don't know when that include path slipped into (it exist since the initial commit). I'm removing it right now; thank you so much for spotting this!
Using Arduino: 1.8.10 (tar file unpacked into personal
bin
directory) Arduino nRF528x (Mbed OS) 1.1.2 on Ubuntu 18.04 x64I get compilation errors when compiling the canonical Blink example. Blink compiles fine on Windows 10 with the same BSP and Arduino versions. After the first failure I removed
.arduino15
and reinstalled the BSP to make sure everything was clean, and the errors still occur.