I'm working to get a Visual Studio Code Devcontainer up and running with a Bazel build for Arduboy. I've pushed my current (problematic - per this GH issue) effort to my arduboy_bazel repo.
Alternatively you can dev entirely in the cloud and skip the vs code install / extension install by using the (free for ~40 hours per month) gitpod.io in your browser, point it at my repo.
I'm having trouble getting past the following compiler error in building an example Arduboy demo I've copied into my repo (buttons.cpp) see ref.
Versions
I'm installing all avr tooling & stdlib using the github.com/arduino/toolchain-avr repo branch 7.3.0-atmel3.6.1-arduino7See here
vscode ➜ /workspaces/arduboy_bazel (main ✗) $ /home/vscode/toolchain-avr/objdir/bin/avr-g++ --version
avr-g++ (GCC) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I'm using github.com/arduino/ArduinoCore-avr at tag 1.8.5See here
In file included from external/arduinocore_avr/cores/arduino/main.cpp:20:0:
external/arduinocore_avr/cores/arduino/Arduino.h:132:5: error: conflicting declaration of C function 'int atexit(void (*)(...))'
int atexit(void (*func)()) __attribute__((weak));
^~~~~~
In file included from external/arduinocore_avr/cores/arduino/Arduino.h:23:0,
from external/arduinocore_avr/cores/arduino/main.cpp:20:
/home/vscode/toolchain-avr/objdir/avr/include/stdlib.h:685:12: note: previous declaration 'int atexit(void (*)())'
extern int atexit(void (*)(void));
^~~~~~
And many more with similar root cause - Full errors.
Thoughts
Are there conflicting function declarations for a number of avr stdlib functions, redefined in arduinocore_avr's Arduino.h?
Is my compilation mistreating C / C++ headers in some way?
Context
I'm working to get a Visual Studio Code Devcontainer up and running with a Bazel build for Arduboy. I've pushed my current (problematic - per this GH issue) effort to my arduboy_bazel repo.
If you wanted to play with it you could:
F1
->Remote-Containers: Rebuild and open in Container
bazel build //example:buttons --config=avr --verbose_failures --sandbox_debug
bazel aquery //example:buttons --config=avr --verbose_failures --sandbox_debug
Alternatively you can dev entirely in the cloud and skip the vs code install / extension install by using the (free for ~40 hours per month)
gitpod.io
in your browser, point it at my repo.I'm having trouble getting past the following compiler error in building an example
Arduboy
demo I've copied into my repo (buttons.cpp
) see ref.Versions
avr tooling
&stdlib
using thegithub.com/arduino/toolchain-avr
repo branch7.3.0-atmel3.6.1-arduino7
See heregithub.com/arduino/ArduinoCore-avr
at tag1.8.5
See hereCompilation Command
bazel build //example:buttons --config=avr --verbose_failures --sandbox_debug
Error
And many more with similar root cause - Full errors.
Thoughts
Are there conflicting function declarations for a number of avr
stdlib
functions, redefined inarduinocore_avr's Arduino.h
?Is my compilation mistreating C / C++ headers in some way?
Do you see anything I'm doing wrong here?
Thanks for any assistance!