Compiler Defines Incorrect for UNO R4 WiFi Builds

I've upgraded my IDEs on 2 computers to 2.3.2 (not sure exactly what they were before).

My code uses a library that has this in it (It's the SparkFunLIS3DH library):

#if defined(ARDUINO_ARCH_ESP32)
	... code here that I believe is the correct code for the UNO R4 WiFi...
#elif defined(__MK20DX256__)
        ...other ignored code here...
#else
// probably __AVR__
	...code here that's being compiled, but fails to compile because 
        ...methods and constants from the SPI library that are
        ...referenced here aren't defined.
#endif

I think the constant ARDUINO_ARCH_ESP32 used to be defined for UNO R4 WiFi builds, and now it isn't.

I can't be positive that the IDE version upgrade caused the failures to start happening, but this code would compile a few days ago, and I did update my IDEs very recently, so I'm guessing the update somehow changed how compiler constants are defined.

I could, of course, just define this constant in my own code, but that just leads to other errors elsewhere that appear to be similarly fallout from incorrect compiler defines.

I do believe that have the correct board selected:
image

Anyone have any ideas what's going on here, and how I might fix it?

No, that's not the define for an R4. The R4 was an ESP32 on board, but it isn't the board you're loading code to. It just works as a serial bridge.

The define for the R4-WiFi is:
(ARDUINO_UNOR4_WIFI)

for the Minima it's
(ARDUINO_UNOR4_MINIMA)

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.