Open miathedev opened 2 years ago
I have exact same issue. In my case it's triggered by #include <list>
Did some digging. Replaced with newest gcc-arm-none-eab
i from ARM - does not help. Then looked into other ARM based Ardiuno MCU and compared Arduino.h. Temporary solve problem by commenting these lines:
https://github.com/HelTecAutomation/CubeCell-Arduino/blob/master/cores/asr650x/Arduino.h#L67-L68
Above there are lines:
//using std::abs;
//using std::max;
//using std::min;
I think there was some doubt use std or define and define won :-)
Update: need to uncoment
#include <algorithm>
using std::abs;
using std::max;
using std::min;
Did someone manage to get std::queue working? It wont compile due to a cascade of errors.
Full log output
``` ====================[ Build | Debug | cubecell_board ]========================== /home/mime/jetbrains/clion-2021.2/bin/cmake/linux/bin/cmake --build /home/mime/CLionProjects/untitled8/cmake-build-cubecell_board --target Debug -- -j 9 Processing cubecell_board (platform: asrmicro650x; board: cubecell_board; framework: arduino) Verbose mode can be enabled via `-v, --verbose` option CONFIGURATION: https://docs.platformio.org/page/boards/asrmicro650x/cubecell_board.html PLATFORM: ASR Microelectronics ASR650x (1.3.1) > Heltec CubeCell-Board (HTCC-AB01) HARDWARE: ASR6501 48MHz, 16KB RAM, 128KB Flash PACKAGES: - framework-arduinoasrmicro650x 1.3.0 - tool-cubecellelftool 0.0.1 - toolchain-gccarmnoneeabi 1.90201.191206 (9.2.1) LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf LDF Modes: Finder ~ chain, Compatibility ~ soft Found 12 compatible libraries Scanning dependencies... No dependencies Building in debug mode Compiling .pio/build/cubecell_board/src/main.cpp.o In file included from /home/mime/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/9.2.1/deque:60, from /home/mime/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/9.2.1/queue:60, from src/main.cpp:2: /home/mime/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/9.2.1/bits/stl_algobase.h:246:56: error: macro "min" passed 3 arguments, but takes just 2 246 | min(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^ In file included from src/main.cpp:1: /home/mime/.platformio/packages/framework-arduinoasrmicro650x/cores/asr650x/Arduino.h:68: note: macro "min" defined here 68 | #define min(a, b) ((a)<(b)?(a):(b)) | In file included from /home/mime/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/9.2.1/deque:60, from /home/mime/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/9.2.1/queue:60, from src/main.cpp:2: /home/mime/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/9.2.1/bits/stl_algobase.h:268:56: error: macro "max" passed 3 arguments, but takes just 2 268 | max(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^ In file included from src/main.cpp:1: /home/mime/.platformio/packages/framework-arduinoasrmicro650x/cores/asr650x/Arduino.h:69: note: macro "max" defined here 69 | #define max(a, b) ((a)>(b)?(a):(b)) | /home/mime/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/9.2.1/bits/stl_algobase.h:198:5: error: expected unqualified-id before 'const' 198 | min(const _Tp& __a, const _Tp& __b) | ^~~ /home/mime/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/9.2.1/bits/stl_algobase.h:198:5: error: expected ')' before 'const' /home/mime/.platformio/packages/framework-arduinoasrmicro650x/cores/asr650x/Arduino.h:68:20: note: to match this '(' 68 | #define min(a, b) ((a)<(b)?(a):(b)) | ^ /home/mime/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/9.2.1/bits/stl_algobase.h:198:5: error: expected ')' before 'const' 198 | min(const _Tp& __a, const _Tp& __b) | ^~~ /home/mime/.platformio/packages/framework-arduinoasrmicro650x/cores/asr650x/Arduino.h:68:19: note: to match this '(' 68 | #define min(a, b) ((a)<(b)?(a):(b)) | ^ /home/mime/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/9.2.1/bits/stl_algobase.h:222:5: error: expected unqualified-id before 'const' 222 | max(const _Tp& __a, const _Tp& __b) | ^~~ /home/mime/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/9.2.1/bits/stl_algobase.h:222:5: error: expected ')' before 'const' /home/mime/.platformio/packages/framework-arduinoasrmicro650x/cores/asr650x/Arduino.h:69:20: note: to match this '(' 69 | #define max(a, b) ((a)>(b)?(a):(b)) | ^ /home/mime/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/9.2.1/bits/stl_algobase.h:222:5: error: expected ')' before 'const' 222 | max(const _Tp& __a, const _Tp& __b) | ^~~ /home/mime/.platformio/packages/framework-arduinoasrmicro650x/cores/asr650x/Arduino.h:69:19: note: to match this '(' 69 | #define max(a, b) ((a)>(b)?(a):(b)) | ^ In file included from /home/mime/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/9.2.1/deque:60, from /home/mime/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/9.2.1/queue:60, from src/main.cpp:2: /home/mime/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/9.2.1/bits/stl_algobase.h:249:7: error: expected primary-expression before 'if' 249 | if (__comp(__b, __a)) | ^~ /home/mime/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/9.2.1/bits/stl_algobase.h:249:7: error: expected '}' before 'if' /home/mime/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/9.2.1/bits/stl_algobase.h:247:5: note: to match this '{' 247 | { | ^ /home/mime/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/9.2.1/bits/stl_algobase.h:247:6: error: expected ';' before 'if' 247 | { | ^ | ; 248 | //return __comp(__b, __a) ? __b : __a; 249 | if (__comp(__b, __a)) | ~~ /home/mime/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/9.2.1/bits/stl_algobase.h:251:7: error: expected unqualified-id before 'return' 251 | return __a; | ^~~~~~ /home/mime/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/9.2.1/bits/stl_algobase.h:271:7: error: expected primary-expression before 'if' 271 | if (__comp(__a, __b)) | ^~ /home/mime/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/9.2.1/bits/stl_algobase.h:271:7: error: expected '}' before 'if' /home/mime/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/9.2.1/bits/stl_algobase.h:269:5: note: to match this '{' 269 | { | ^ /home/mime/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/9.2.1/bits/stl_algobase.h:269:6: error: expected ';' before 'if' 269 | { | ^ | ; 270 | //return __comp(__a, __b) ? __b : __a; 271 | if (__comp(__a, __b)) | ~~ /home/mime/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/9.2.1/bits/stl_algobase.h:273:7: error: expected unqualified-id before 'return' 273 | return __a; | ^~~~~~ /home/mime/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/9.2.1/bits/stl_algobase.h:274:5: error: expected declaration before '}' token 274 | } | ^ /home/mime/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/9.2.1/bits/stl_algobase.h:333:38: error: 'random_access_iterator_tag' was not declared in this scope; did you mean 'std::random_access_iterator_tag'? 333 | struct __copy_move