I have an ESP32 Dev Kit C V4 (ESP32-D0WD-V3 Board) and I'm keen on making it compatible with Matter. My aim is to transform it into a device controllable via SmartThings.
To achieve this, I've successfully installed the Matter library into the Arduino IDE. However, I've encountered a hurdle - the board selection menu doesn't include an option specific to my ESP32 variant. While there are numerous ESP32 boards listed, none match the exact model I own.
Upon researching online, I found that many users opt for the "DOIT ESP32 DEV KIT V1" board option as a close approximation. However, this selection lacks the "Partition Scheme" option crucial for optimizing code to fit within the ESP32's memory constraints.
In an attempt to rectify this, I tried manually editing the Board.txt file and appending the following configurations:
Your approach is completely valid. In case you (or others who might have the same dilemma later and find this forum topic during their researches) would like to know about an alternative, I'll mention that the "esp32" boards platform includes a "ESP32 Dev Module" board definition. When you select Tools > Board > esp32 > ESP32 Dev Module from the Arduino IDE menus, you will find that menus for all possible configuration options of the ESP32 microcontroller are added under the IDE's Tools menu. The purpose of this board definition is to allow the platform to support any arbitrary ESP32-based hardware. The model-specific board definitions such as "DOIT ESP32 DEV KIT V1" are convenient because they might provide the configuration that is appropriate for a specific model of board, but you always have the general purpose "dev module" board definition to fall back on if the manufacturer of the board model you are using hasn't added such a definition to the "esp32" boards platform.
Another thing I'll mention is that if you decide you want to make additions to the boards.txt file, I suggest instead putting those additions in a new text file and then saving that file with the name boards.local.txt under the same folder as the boards.txt file. The Arduino boards platform framework will recognize your additions in that file exactly as it would if you added them in boards.txt, as documented here:
When you edit an existing platform configuration file, there is always the chance that you might inadvertently make changes to the existing content. If that happened, it could result in some difficult to troubleshoot problems. The use of boards.local.txt keeps the user's modifications isolated to a dedicated file and can always be easily reverted by clearing the optional file.
Using boards.local.txt makes it easy to reapply modifications after each update of the platform. Arduino will periodically make a new release of the "esp32" platform and Arduino IDE will notify you of the availability of a new version and allow you to update it via Boards Manager. When you do that, all modifications you made to the previous version of the platform are lost and so you must reapply them after each update. If you keep a copy of your boards.local.txt file in a safe place. That post-update procedure is as simple as copying the file back into the platform installation folder and restarting Arduino IDE.
This is caused by a known bug in Arduino IDE, which causes it to not recognize the addition of new custom board options in boards.txt as you have done:
There is a workaround you can use to make Arduino IDE notice the new option. I'll be happy to provide instructions for performing that workaround. If you want those instructions, please add a forum reply here to tell us which operating system you are using (e.g., "Windows")?
(where <username> is your macOS username) The Library folder is hidden by default. You can make it visible by pressing the Command+Shift+. keyboard shortcut. Please be careful when deleting things from your computer. When in doubt, back up!
Start Arduino IDE.
Select the board from the IDE's Tools > Board menu.
The custom board options menus under Arduino IDE's Tools menu should now reflect the changes you made to boards.txt.
ⓘ The arduino-ide folder is used by Arduino IDE to store data, but it doesn't store any irreplaceable data there and will automatically regenerate the folder and data. So performing this workaround won't result in any loss of important data or other significant impacts.
Please let me know if you have any questions or problems while following those instructions.