I created a project mostly copying ESP’s example SPI project which interfaces a classic arduino TFT 320x240 display. The first challenge will be determining pinout, although my logic analyzer will come in handy for that. The current problem I have is that I cannot compile the project for the life of me. After copying over all the files from the official repo into my project, I found that it cannot locate the image to convert to a binary format I suppose. I get the following error:
.pioenvs/esp32doit-devkit-v1/src/decode_image.o:(.literal.decode_image+0x14): undefined reference to `_binary_image_jpg_start' collect2: error: ld returned 1 exit status *** [.pioenvs/esp32doit-devkit-v1/firmware.elf] Error 1
_binary_image_jpg_start refers to line 25 in
decode_image.c. So presumably the linker does not know where to find that reference? Unlike in most projects, the
component.mk makefile has the command
COMPONENT_EMBED_FILES := image.jpg in it. However I’m doubtful this file is getting read when I hit the compile/upload button, at least when in the project directory. PlatformIO uses a different folders than the bare ESP IDF example. I came across this documentation but I don’t really know if this is what I need to do. What the heck is “SPIFFS”!? Including
component.mk makefile in this
/data folder did nothing. I don’t understand anything beyond step 2 here, I’m fairly new to PlatformIO. Step 3 resulted in the following error:
Could not find the `spiffs` section in the partitions table /home/maxim/.platformio/packages/framework-espidf/components/partition_table/partitions_singleapp.csv
I also went down the rabbit hole of attempting to modify the more promising
platformio.ini file by appending:
build_flags = -DCOMPONENT_EMBED_TXTFILES= ~/Documents/PlatformIO/Projects/alarm_clock/data/image.jpg
however this doesn’t work:
*** [.pioenvs/esp32doit-devkit-v1/firmware.elf] Implicit dependency `/home/maxim/.platformio/platforms/espressif32/builder/~/Documents/PlatformIO/Projects/alarm_clock/data/image.jpg' not found, needed by target `.pioenvs/esp32doit-devkit-v1/firmware.elf'.
It tries to include a path going to the .projectio folder that leads to where all the framework files are, but I cannot escape from that location to point to where the image actually is. Adding the image to that path just results in it not liking that it’s a JPEG, so I suspect this is a dead end.
/home/maxim/.platformio/platforms/espressif32/builder/image.jpg: file not recognized: File format not recognized
So I’m fairly lost, I don’t know what else to try. How is this supposed to work? My goal is to have the display working as a starting point to mess with FreeRTOS and Bluetooth LE.