HelTecAutomation / CubeCell-Arduino

Heltec CubeCell Series (based on ASR6501, ASR6502 chip) Arduino support.
256 stars 139 forks source link

nullptr issue with latest ArduinoJson #190

Open aparcar opened 3 years ago

aparcar commented 3 years ago

In one of the latest ArduinoJson versions a nullptr check was added, which now crashes CubeCell boards...

Ref: https://github.com/bblanchon/ArduinoJson/releases/tag/v6.17.0

Building in release mode
Compiling .pio/build/cubecell_board/src/main.cpp.o
Compiling .pio/build/cubecell_board/lib4ee/CayenneLPP/CayenneLPP.cpp.o
Compiling .pio/build/cubecell_board/libc02/LoraWan102/loramac/region/RegionEU433.c.o
Compiling .pio/build/cubecell_board/libc02/LoraWan102/loramac/region/RegionEU868.c.o
In file included from .pio/libdeps/cubecell_board/ArduinoJson/src/ArduinoJson.hpp:7,
                 from .pio/libdeps/cubecell_board/ArduinoJson/src/ArduinoJson.h:9,
                 from src/main.cpp:2:
.pio/libdeps/cubecell_board/ArduinoJson/src/ArduinoJson/Configuration.hpp:271:4: error: #error nullptr is defined as a macro. Remove the faulty #define or #undef nullptr
  271 | #  error nullptr is defined as a macro. Remove the faulty #define or #undef nullptr
      |    ^~~~~
Compiling .pio/build/cubecell_board/libc02/LoraWan102/loramac/region/RegionIN865.c.o
Compiling .pio/build/cubecell_board/libc02/LoraWan102/loramac/region/RegionKR920.c.o
Compiling .pio/build/cubecell_board/libc02/LoraWan102/loramac/region/RegionUS915-Hybrid.c.o
Compiling .pio/build/cubecell_board/libc02/LoraWan102/loramac/region/RegionUS915.c.o
In file included from .pio/libdeps/cubecell_board/ArduinoJson/src/ArduinoJson.hpp:7,
                 from .pio/libdeps/cubecell_board/ArduinoJson/src/ArduinoJson.h:9,
                 from .pio/libdeps/cubecell_board/CayenneLPP/src/CayenneLPP.h:11,
                 from .pio/libdeps/cubecell_board/CayenneLPP/src/CayenneLPP.cpp:6:
.pio/libdeps/cubecell_board/ArduinoJson/src/ArduinoJson/Configuration.hpp:271:4: error: #error nullptr is defined as a macro. Remove the faulty #define or #undef nullptr
  271 | #  error nullptr is defined as a macro. Remove the faulty #define or #undef nullptr
      |    ^~~~~
Compiling .pio/build/cubecell_board/libc02/LoraWan102/radio/radio.c.o
*** [.pio/build/cubecell_board/src/main.cpp.o] Error 1
*** [.pio/build/cubecell_board/lib4ee/CayenneLPP/CayenneLPP.cpp.o] Error 1
SebDominguez commented 2 years ago

related #216 It's not a board crash, its just a build error. You can bypass the build check in ArduinoJson or remove the faulty #define nullptr NULL inside <Arduino.h>