Inkplate 6COLOR compilation errors with E_INK_WIDTH and MCP23017_EXT_ADDR

Customer:

I’ve followed the setup guide to connect my Inkplate 6 to my PC. I tried using the Inkplate UI Designer to add a single bitmap image and copy it to the board. I’m getting several compilation errors:

c:\Users\[user]\ OneDrive\Documents\Arduino\libraries\Inkplate-Arduino-library-master\src/include/Image.h:123:25: error: 'E_INK_WIDTH' was not declared in this scope
uint8_t pixelBuffer[E_INK_WIDTH * 4 + 5];
^~~~~~~~~~~

c:\Users\[user]\ OneDrive\Documents\Arduino\libraries\Inkplate-Arduino-library-master\src/include/Image.h:140:29: error: 'E_INK_WIDTH' was not declared in this scope
uint8_t [E_INK_WIDTH + 20];
^~~~~~~~~~~

c:\Users\[user]\ OneDrive\Documents\Arduino\libraries\Inkplate-Arduino-library-master\src/include/Mcp.h:32:68: error: 'MCP23017_EXT_ADDR' was not declared in this scope
void pinModeMCP(uint8_t _pin, uint8_t _mode, uint8_t _mcp_id = MCP23017_EXT_ADDR);
^~~~~~~~~~~~~~~~~

c:\Users\[user]\ OneDrive\Documents\Arduino\libraries\Inkplate-Arduino-library-master\src/include/Mcp.h:33:74: error: 'MCP23017_EXT_ADDR' was not declared in this scope
void digitalWriteMCP(uint8_t _pin, uint8_t _state, uint8_t _mcp_id = MCP23017_EXT_ADDR);

Originally submitted via email support on 27 February 2023. Migrated to the forum for community visibility.

Soldered Support:

The documentation was out of date. You need to download and install the board definition from:
https://github.com/e-radionicacom/Dasduino-Board-Definitions-for-Arduino-IDE/raw/dev/package_Dasduino_Boards_index.json

Also download the Inkplate library from:
https://github.com/SolderedElectronics/Inkplate-Arduino-library/tree/PCAL-Support

Unzip the downloaded library and paste it to the Arduino libraries folder. Before uploading, make sure you’ve selected the “Soldered Inkplate6” board if you have the purple one.

Customer:

After trying that, I’m now getting linker errors:

c:/users/[...]/appdata/local/arduino15/packages/inkplate_boards/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch3/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\[user]\AppData\Local\Temp\arduino\cores\8078d5e5948bf6dc792b47b09c8fdff9\core.a(main.cpp.o):(.literal._Z8loopTaskPv+0x8): undefined reference to `setup()'
c:/users/[...]/appdata/local/arduino15/packages/inkplate_boards/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch3/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\[user]\AppData\Local\Temp\arduino\cores\8078d5e5948bf6dc792b47b09c8fdff9\core.a(main.cpp.o):(.literal._Z8loopTaskPv+0xc): undefined reference to `loop()'
c:/users/[...]/appdata/local/arduino15/packages/inkplate_boards/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch3/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\[user]\AppData\Local\Temp\arduino\cores\8078d5e5948bf6dc792b47b09c8fdff9\core.a(main.cpp.o): in function `loopTask(void*)':
C:\Users\[user]\AppData\Local\Arduino15\packages\Inkplate_Boards\hardware\esp32\3.0.1\cores\esp32/main.cpp:42: undefined reference to `setup()'
c:/users/[...]/appdata/local/arduino15/packages/inkplate_boards/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch3/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\[user]\AppData\Local\Arduino15\packages\Inkplate_Boards\hardware\esp32\3.0.1\cores\esp32/main.cpp:50: undefined reference to `loop()'
collect2.exe: error: ld returned 1 exit status

Also it says:

Multiple libraries were found for "Inkplate.h"
Used: C:\Users\[user]\OneDrive\Documents\Arduino\libraries\Inkplate-Arduino-library-PCAL-Support
Not used: C:\Users\[user]\OneDrive\Documents\Arduino\libraries\Inkplate-Arduino-library-master
Not used: C:\Users\[user]\OneDrive\Documents\Arduino\libraries\InkplateLibrary

Soldered Support:

You have multiple old installations that need to be cleaned up. First, remove “Inkplate Boards” from Arduino’s board manager and close the Arduino IDE.

When closed, delete these files and folders:

  • The Dasduino-Board-Definition folder from your Arduino15 packages directory
  • The Inkplate_Boards folder from your Arduino15 packages directory
  • The Inkplate_core folder from your Arduino15 packages directory
  • The package_Dasduino .json file from your Arduino15 directory

Also delete the old Inkplate libraries you don’t use from your Arduino libraries folder (Inkplate-Arduino-library-master and InkplateLibrary).

Then rename “Inkplate-Arduino-library-PCAL-Support” to “Inkplate-Arduino-library”.

After that, open Arduino IDE and add this link to your preferences:
https://github.com/SolderedElectronics/Dasduino-Board-Definitions-for-Arduino-IDE/raw/master/package_Dasduino_Boards_index.json

Then download the Inkplate boards from the board manager.

Attachment omitted in migration: image.png

Attachment omitted in migration: image.png

Attachment omitted in migration: image.png

Attachment omitted in migration: image.png

Customer:

After doing that, I’m still getting the same linker errors:

c:/users/[...]/appdata/local/arduino15/packages/inkplate_boards/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch3/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\[user]\AppData\Local\Temp\arduino\sketches\04FCEFC08FECCDA693C0557E4137C623\core\core.a(main.cpp.o):(.literal._Z8loopTaskPv+0x8): undefined reference to `setup()'
c:/users/[...]/appdata/local/arduino15/packages/inkplate_boards/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch3/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\[user]\AppData\Local\Temp\arduino\sketches\04FCEFC08FECCDA693C0557E4137C623\core\core.a(main.cpp.o):(.literal._Z8loopTaskPv+0xc): undefined reference to `loop()'
c:/users/[...]/appdata/local/arduino15/packages/inkplate_boards/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch3/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\[user]\AppData\Local\Temp\arduino\sketches\04FCEFC08FECCDA693C0557E4137C623\core\core.a(main.cpp.o): in function `loopTask(void*)':
C:\Users\[user]\AppData\Local\Arduino15\packages\Inkplate_Boards\hardware\esp32\3.0.1\cores\esp32/main.cpp:42: undefined reference to `setup()'
c:/users/[...]/appdata/local/arduino15/packages/inkplate_boards/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch3/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\[user]\AppData\Local\Arduino15\packages\Inkplate_Boards\hardware\esp32\3.0.1\cores\esp32/main.cpp:50: undefined reference to `loop()'
collect2.exe: error: ld returned 1 exit status
Compilation error: exit status 1

Attachment omitted in migration: image001.png

Attachment omitted in migration: image002.png

Attachment omitted in migration: image003.png

Attachment omitted in migration: image004.png

Soldered Support:

What example are you trying to compile? Try opening any Inkplate example and compiling that. This error typically occurs when you’re compiling an empty sketch or your sketch doesn’t have setup() and loop() functions defined.

See these related Arduino Forum discussions:

Customer:

I’m trying to copy a JPG onto the board. I’ve based my code on an example. When I upload the code to the board, it just cycles through different coloured screens and doesn’t display the image.

Attachment omitted in migration: fleetpartners1.ino

Soldered Support:

The Inkplate 6COLOR needs time to draw an image on the screen, approximately 15 seconds. E-paper displays are slow to draw, especially the Inkplate 6COLOR, so they’re intended for data and pictures that don’t change frequently. Just wait a moment and your image should appear on the screen.