Hi! Just a quick question. I'm building software that is supposed to be compatible with several different devices, such as the ESP32, Arduino Nano, Nano 33 BLE and RP2040 Connect.
I'm current using architecture flags AVR to detect when software is compiled for Arduino Nano and ESP32 to detect when software is compiled for the ESP32. I check this with the defined() method to differentiate pinouts and methods between these boards.
Does anyone know the specific flags to use for the Nano 33 BLE and/or for the RP2040 connect? Are the any docs for this? Thanks.
I don't think there is a list because new architectures and boards can be added by third parties. You can find the defines in the "boards.txt" file. For example, in the file "hardware/mbed_nano/2.0.0/boards.txt" you will see:
Writing libraries for multiple boards is a bit of nightmare, "Write once, test everwhere".
Check out the defines used in the SafeString library which covers a lot of boards and weird Stream stuff for some mbed packages