Customer:
I’m having trouble getting any of the example code to compile in Arduino IDE 2.1.1. The error message is:
In file included from c:\users\[user] removed].thermalwave.000\appdata\local\arduino15\packages\inkplate_boards\tools\xtensa-esp32-elf-gcc\gcc8_4_0-esp-2021r2-patch3\xtensa-esp32-elf\include\c++\8.4.0\stdlib.h:36,
from C:\Users\[user] removed].THERMALWAVE.000\AppData\Local\Arduino15\packages\Inkplate_Boards\hardware\esp32\3.0.1/tools/sdk/esp32/include/newlib/platform_include/assert.h:21,
from c:\users\[user] removed].thermalwave.000\appdata\local\arduino15\packages\inkplate_boards\tools\xtensa-esp32-elf-gcc\gcc8_4_0-esp-2021r2-patch3\xtensa-esp32-elf\sys-include\sys\reent.h:503,
from C:\Users\[user] removed].THERMALWAVE.000\AppData\Local\Arduino15\packages\Inkplate_Boards\hardware\esp32\3.0.1/tools/sdk/esp32/include/newlib/platform_include/sys/reent.h:17,
from c:\users\[user] removed].thermalwave.000\appdata\local\arduino15\packages\inkplate_boards\tools\xtensa-esp32-elf-gcc\gcc8_4_0-esp-2021r2-patch3\xtensa-esp32-elf\sys-include\stdio.h:60,
from C:\Users\[user] removed].THERMALWAVE.000\AppData\Local\Arduino15\packages\Inkplate_Boards\hardware\esp32\3.0.1\cores\esp32/Arduino.h:27,
from sketch\SimpleTime.ino.cpp:1:
c:\users\[user] removed].thermalwave.000\appdata\local\arduino15\packages\inkplate_boards\tools\xtensa-esp32-elf-gcc\gcc8_4_0-esp-2021r2-patch3\xtensa-esp32-elf\include\c++\8.4.0\cstdlib:41:10: fatal error: bits/c++config.h: No such file or directory
#include
^
compilation terminated.
exit status 1
Compilation error: exit status 1
Originally submitted via email support on 10 August 2023. Migrated to the forum for community visibility.
Soldered Support:
This appears to be an issue within the ESP32 core part of the Inkplate 2 board definition. Arduino IDE 1.8.18 has been found to work in more cases than version 2 and newer.
When you have it installed, make sure you’re using the newest Inkplate board definitions and newest version of the library: Inkplate Get Started Page — Inkplate docs documentation
Try to compile and upload the basic black/white/red example - this should always work.
Customer:
I uninstalled both the board definition and the library and then reinstalled them in IDE 1.8.19 with the same error. The cstdlib file located at \appdata\local\arduino15\packages\inkplate_boards\tools\xtensa-esp32-elf-gcc\gcc8_4_0-esp-2021r2-patch3\xtensa-esp32-elf\include\c++\8.4.0 is importing the c++config.h header assuming it is located in \xtensa-esp32-elf\include\c++\8.4.0\bits but it’s actually located in \xtensa-esp32-elf\include\c++\8.4.0\xtensa-esp32-elf\bits. Every file in this package that includes the c++config.h header has the same issue.
Soldered Support:
Try installing a newer version of the board definitions. In Arduino IDE board defs list, change the link from:
https://github.com/SolderedElectronics/Dasduino-Board-Definitions-for-Arduino-IDE/raw/master/package_Dasduino_Boards_index.json
to:
https://github.com/SolderedElectronics/Dasduino-Board-Definitions-for-Arduino-IDE/raw/dev/package_Dasduino_Boards_index.json
This will get you board defs from the dev branch. The board definition for Inkplate 2 has not changed but it’s worth a try.
If this doesn’t work, try a temporary fix: open the file in question and replace #include <bits/c++config.h> with #include <xtensa-esp32-elf/bits/c++config.h> for all occurrences. Visual Studio Code’s find-and-replace function could work for this. This may work well enough just to compile for now.
Customer:
The newer definitions didn’t change anything. I tried replacing the references in the files, but even after replacing the #include line in every file (there are over a hundred references to c++config.h), it throws an error for every reference of any files in the /xtensa-esp32-elf/bits/ directory. I moved that directory entirely into \Inkplate_Boards\tools\xtensa-esp32-elf-gcc\gcc8_4_0-esp-2021r2-patch3\xtensa-esp32-elf\include\c++\8.4.0 and merged it with the /bits directory there. This seemed to work, but when I try to compile the Black_White_Red example, I get a new error:
c:\Users\[user] removed].THERMALWAVE.000\Documents\Arduino\libraries\InkplateLibrary\src\include\ImageDitherColor.cpp:41:43: error: 'height' defined but not used
static unsigned int width = E_INK_HEIGHT, height = E_INK_WIDTH;
^
c:\Users\[user] removed].THERMALWAVE.000\Documents\Arduino\libraries\InkplateLibrary\src\include\ImageDitherColor.cpp:41:21: error: 'width' defined but not used
static unsigned int width = E_INK_HEIGHT, height = E_INK_WIDTH;
^
cc1plus.exe: some warnings being treated as errors
exit status 1
Compilation error: exit status 1
Soldered Support:
This is definitely a board definition issue. Inkplate core comes with the ESP32 core packaged in and that example should compile without a problem. Arduino may be using cached content from an old version of the board definition.
When you go to your Arduino boards manager and find Inkplate boards, check which version is installed. With the /dev/ board definitions, you should be able to install up to version 7.0.0. The specific error you’re getting was related to board def version 2.0.0, so it must be cached somewhere.
If reinstalling the board in the IDE doesn’t work, try deleting the cached content manually:
- Uninstall the Inkplate board definitions.
- Go to
C:\Users\[user]\AppData\Local\Arduino15\cache\github.com and delete the folder for SolderedElectronics.
- Go to
C:\Users\[user]\AppData\Local\Arduino15\staging\packages and delete the Inkplate_core zip file.
- Re-install the board definitions through Arduino IDE.
Attachment omitted in migration: image.png
Customer:
I followed all the steps you recommended and re-installed the board definitions, but it’s still giving the same error.
Attachment omitted in migration: image001.png
Soldered Support:
Try these steps:
- Delete Inkplate board definitions again in Arduino IDE
- Close Arduino IDE
- Go to the Arduino15 folder and delete cache for SolderedElectronics and Github
- Go to the Packages folder in Arduino15 and check if Inkplate_boards exists - if so, delete it
- Also go to Staging/Packages and delete everything that has to do with ESP32 (which is Inkplate)
- Delete the package_Dasduino_Boards_index.json in Arduino15
- Do a fresh reinstall of the board definitions
Combined with deleting other ESP32 boards, this should work. If it doesn’t, we can explore using VSCode, PlatformIO, or another similar development environment.
Customer:
I tried everything you suggested and there is no change. The only way I seem to be able to get the code to compile is by cutting all the files out of the directory at \Arduino15\packages\Inkplate_Boards\tools\xtensa-esp32-elf-gcc\gcc8_4_0-esp-2021r2-patch3\xtensa-esp32-elf\include\c++\8.4.0\xtensa-esp32-elf\bits\ and pasting them into the directory at C:\Users\[user] removed].THERMALWAVE.000\AppData\Local\Arduino15\packages\Inkplate_Boards\tools\xtensa-esp32-elf-gcc\gcc8_4_0-esp-2021r2-patch3\xtensa-esp32-elf\include\c++\8.4.0\bits\.
When I do this it will compile and upload the program to the Inkplate 2 board. Is it normal for the display to flicker this much whenever the contents are being updated? It does the same thing when compiling and updating with Python as well. See the video: https://youtu.be/TXvjvBI9Fjc
Attachment omitted in migration: image001.jpg
Attachment omitted in migration: image003.jpg
Attachment omitted in migration: image002.gif
Soldered Support:
Yes, that is the normal way the display updates. Inkplate 2 is a high-latency but low power ePaper display so it takes a while to update. If you want the update to be faster, you can draw just black pixels, which will skip the part of the update that draws the red pixels. This happens with Python as well.