I'm using this code from 2dom on github for use on my RGB matrix display - LINK
I'll insert it below for convenience. I see it can be used for either ESP8266 or ESP32, and there are sections of code that run for each option enclosed by #ifdef and #endif.
However there does not seem to be a #define anywhere in the sketch, e.g "#define ESP32" in my case.
Is that correct? Could anyone explain please.
Not specifically that, it shows the following in Arduino IDE, I will try with verbose enabled:
Sketch uses 660798 bytes (50%) of program storage space. Maximum is 1310720 bytes.
Global variables use 52176 bytes (15%) of dynamic memory, leaving 275504 bytes for local variables. Maximum is 327680 bytes.
esptool.py v2.6
Serial port COM10
Connecting........__
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: 3c:71:bf:60:63:f0
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 6553.6 kbit/s)...
Hash of data verified.
Compressed 17392 bytes to 11186...
Writing at 0x00001000... (100 %)
Wrote 17392 bytes (11186 compressed) at 0x00001000 in 0.1 seconds (effective 1023.1 kbit/s)...
Hash of data verified.
Compressed 660912 bytes to 396883...
Writing at 0x00010000... (4 %)
Writing at 0x00014000... (8 %)
Writing at 0x00018000... (12 %)
Writing at 0x0001c000... (16 %)
Writing at 0x00020000... (20 %)
Writing at 0x00024000... (24 %)
Writing at 0x00028000... (28 %)
Writing at 0x0002c000... (32 %)
Writing at 0x00030000... (36 %)
Writing at 0x00034000... (40 %)
Writing at 0x00038000... (44 %)
Writing at 0x0003c000... (48 %)
Writing at 0x00040000... (52 %)
Writing at 0x00044000... (56 %)
Writing at 0x00048000... (60 %)
Writing at 0x0004c000... (64 %)
Writing at 0x00050000... (68 %)
Writing at 0x00054000... (72 %)
Writing at 0x00058000... (76 %)
Writing at 0x0005c000... (80 %)
Writing at 0x00060000... (84 %)
Writing at 0x00064000... (88 %)
Writing at 0x00068000... (92 %)
Writing at 0x0006c000... (96 %)
Writing at 0x00070000... (100 %)
Wrote 660912 bytes (396883 compressed) at 0x00010000 in 5.8 seconds (effective 917.5 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 128...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (128 compressed) at 0x00008000 in 0.0 seconds (effective 2234.2 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...