How to find out all
#define used by
arduino-cli in compile?
I had seen something some time ago, but I cannot find it again. I think that it was some option somewhere, and the result was that the compile did not end normally, but some generated file contained lots of useful and lots of obscure defined names.
I would like to find everything that's defined in my program, which I want to write, compile, and then run on different Arduinos, but it sometimes need different Serial to be used, different pin assignments, different internal buffer sizes and so on.
And I would like to organize the differences better, than just put all and everything to one big
#endif for each extra platform.
- if it does not have
#define Serial Serial1
- if it has 2kB RAM or less, set MY_BUF_SIZE to 10; if it has less than 3kB use 30, else use 100.
- but if it is
Micro Pro, use this pin assignment, else if it is
Nano Everyuse that, else issue error/warning for user, that pins need to be assigned.
And many others...