Open dmetzinger opened 6 years ago
Found the same problem. Also noticed user fonts aren't loaded from SPIFFS. UPD. Found a problem. Ensure you have CONFIG_SPIFFS_BASE_ADDR=0x180000 in the sdkconfig. I had it set as CONFIG_SPIFFS_BASE_ADDR=180000
hello everybody, i meet same problem that is no JPEG and BMP display on demo, i used is ESP-WROVER-KIT V3, the LCD just dispaly white lights, even i changed CONFIG_SPIFFS_BASE_ADDR=0x180000 to try, but result is sames. how can i fix it?
@andywang2039 I had the same problem, eventually figured out that my ESP-WROVER-KIT v3 (bought direct from Espressif...) has a display with ILI9341 driver IC, not ST7789V like it's supposed to. Had me questioning my sanity since that doesn't seem to be documented anywhere, boo! Only noticed after I tried the master-spi demo in the idf which detected the driver.
I face the same problem as well. Mine is M5Stack. Checked the sdkconfig CONFIG_SPIFFS_BASE_ADDR is 180000. Running out of clues. Any advice, please?
I have got it working, but the image demo are still blank despite "make flashfs". I tried make copyfs as well.
Further work, I found out that the jpeg files reading errors. See below. I don't have the solution yet. Feel free to comment, please?
Display: ILI9341: PORTRAIT 240,320 Color
Clear screen time: 61 ms
Send color buffer time: 229 us (240 pixels) I (127242) event: station ip lost File error: Bad file numbers JPG: filename str /spiffs/images/test1.jpg JPG time, scale: 5: 55 ms File error: Bad file numbers JPG: filename str /spiffs/images/test1.jpg JPG time, scale: 4: 54 ms File error: Bad file numbers JPG: filename str /spiffs/images/test1.jpg JPG time, scale: 3: 54 ms File error: Bad file numbers JPG: filename str /spiffs/images/test1.jpg JPG time, scale: 2: 54 ms File error: Bad file numbers JPG: filename str /spiffs/images/test1.jpg JPG time, scale: 1: 55 ms File error: Bad file numbers JPG: filename str /spiffs/images/test1.jpg JPG time, scale: 0: 54 ms File error: Bad file numbers JPG: filename str /spiffs/images/test2.jpg JPG time, scale: 5: 54 ms File error: Bad file numbers JPG: filename str /spiffs/images/test2.jpg JPG time, scale: 4: 54 ms File error: Bad file numbers JPG: filename str /spiffs/images/test2.jpg JPG time, scale: 3: 54 ms File error: Bad file numbers JPG: filename str /spiffs/images/test2.jpg JPG time, scale: 2: 54 ms File error: Bad file numbers JPG: filename str /spiffs/images/test2.jpg JPG time, scale: 1: 54 ms File error: Bad file numbers JPG: filename str /spiffs/images/test2.jpg JPG time, scale: 0: 54 ms File error: Bad file numbers JPG: filename str /spiffs/images/test4.jpg JPG time, scale: 5: 54 ms File error: Bad file numbers JPG: filename str /spiffs/images/test4.jpg JPG time, scale: 4: 54 ms File error: Bad file numbers JPG: filename str /spiffs/images/test4.jpg JPG time, scale: 3: 54 ms File error: Bad file numbers JPG: filename str /spiffs/images/test4.jpg JPG time, scale: 2: 54 ms File error: Bad file numbers JPG: filename str /spiffs/images/test4.jpg JPG time, scale: 1: 54 ms File error: Bad file numbers JPG: filename str /spiffs/images/test4.jpg JPG time, scale: 0: 54 ms Error: -1 [opening file] BMP: filename str /spiffs/images/tiger.bmp BMP time, scale: 5: 55 ms Error: -1 [opening file] BMP: filename str /spiffs/images/tiger.bmp BMP time, scale: 4: 54 ms Error: -1 [opening file] BMP: filename str /spiffs/images/tiger.bmp BMP time, scale: 3: 55 ms Error: -1 [opening file] BMP: filename str /spiffs/images/tiger.bmp BMP time, scale: 2: 54 ms Error: -1 [opening file] BMP: filename str /spiffs/images/tiger.bmp BMP time, scale: 1: 54 ms Error: -1 [opening file] BMP: filename str /spiffs/images/tiger.bmp BMP time, scale: 0: 54 ms
"make makefs to create spiffs image in build directory without flashing to ESP32"
type make makefs, and looked into build/spiffs_image, found out that the spiffs images are created. What is spiffs image? can I just copy the *.jpeg files?
make makefs creates spiffs_image.img in build folder, not in build/spiffs_image folder. I tried by copying the spiffs_image.img into build/spiffs_image folder. Tested it does not work.
The function disp_images() does not show all the images and scale each image at all scale level. I have modified to show all images to do that. //------------------------- static void disp_images() { uint32_t tstart; char * filename = NULL;
disp_header("JPEG IMAGES");
if (spiffs_is_mounted) { // ** Show scaled (1/8, 1/4, 1/2 size) JPG images //TFT_jpg_image(CENTER, CENTER, 3, SPIFFS_BASE_PATH"/images/test1.jpg", NULL, 0); //Wait(500);
for (int scale=5; scale >= 0; scale--) {
tstart = clock();
// ** Show scaled (1/8, 1/4, 1/2 size) JPG images
filename = SPIFFS_BASE_PATH"/images/test1.jpg";
TFT_jpg_image(CENTER, CENTER, scale,filename, NULL, 0);
if (doprint) printf("JPG: filename str %s \r\n", filename);
//TFT_bmp_image(CENTER, CENTER, scale, SPIFFS_BASE_PATH"/images/tiger.bmp", NULL, 0);
tstart = clock() - tstart;
if (doprint) {
printf(" JPG time, scale: %d: %u ms\r\n", scale, tstart);
}
sprintf(tmp_buff, "Decode time: %u ms", tstart);
update_header(NULL, tmp_buff);
Wait(-500);
}
//TFT_jpg_image(CENTER, CENTER, 2, SPIFFS_BASE_PATH"/images/test2.jpg", NULL, 0);
//Wait(500);
for (int scale=5; scale >= 0; scale--) {
tstart = clock();
// ** Show scaled (1/8, 1/4, 1/2 size) JPG images
filename = SPIFFS_BASE_PATH"/images/test2.jpg";
TFT_jpg_image(CENTER, CENTER, scale,filename, NULL, 0);
if (doprint) printf("JPG: filename str %s \r\n", filename);
//TFT_jpg_image(CENTER, CENTER, 3, SPIFFS_BASE_PATH"/images/test1.jpg", NULL, 0);
//TFT_bmp_image(CENTER, CENTER, scale, SPIFFS_BASE_PATH"/images/tiger.bmp", NULL, 0);
tstart = clock() - tstart;
if (doprint) printf(" JPG time, scale: %d: %u ms\r\n", scale, tstart);
sprintf(tmp_buff, "Decode time: %u ms", tstart);
update_header(NULL, tmp_buff);
Wait(-500);
}
for (int scale=5; scale >= 0; scale--) {
tstart = clock();
// ** Show scaled (1/8, 1/4, 1/2 size) JPG images
filename = SPIFFS_BASE_PATH"/images/test3.jpg";
TFT_jpg_image(CENTER, CENTER, scale,filename, NULL, 0);
if (doprint) printf("JPG: filename str %s \r\n", filename);
//TFT_jpg_image(CENTER, CENTER, 3, SPIFFS_BASE_PATH"/images/test1.jpg", NULL, 0);
//TFT_bmp_image(CENTER, CENTER, scale, SPIFFS_BASE_PATH"/images/tiger.bmp", NULL, 0);
tstart = clock() - tstart;
if (doprint) printf(" JPG time, scale: %d: %u ms\r\n", scale, tstart);
sprintf(tmp_buff, "Decode time: %u ms", tstart);
update_header(NULL, tmp_buff);
Wait(-500);
}
//TFT_jpg_image(CENTER, CENTER, 1, SPIFFS_BASE_PATH"/images/test4.jpg", NULL, 0);
//Wait(500);
for (int scale=5; scale >= 0; scale--) {
tstart = clock();
// ** Show scaled (1/8, 1/4, 1/2 size) JPG images
filename = SPIFFS_BASE_PATH"/images/test4.jpg";
TFT_jpg_image(CENTER, CENTER, scale,filename , NULL, 0);
if (doprint) printf("JPG: filename str %s \r\n", filename);
//TFT_jpg_image(CENTER, CENTER, 2, SPIFFS_BASE_PATH"/images/test2.jpg", NULL, 0);
//TFT_jpg_image(CENTER, CENTER, 3, SPIFFS_BASE_PATH"/images/test1.jpg", NULL, 0);
//TFT_bmp_image(CENTER, CENTER, scale, SPIFFS_BASE_PATH"/images/tiger.bmp", NULL, 0);
tstart = clock() - tstart;
if (doprint) printf(" JPG time, scale: %d: %u ms\r\n", scale, tstart);
sprintf(tmp_buff, "Decode time: %u ms", tstart);
update_header(NULL, tmp_buff);
Wait(-500);
}
// ** Show full size JPG image
tstart = clock();
TFT_jpg_image(CENTER, CENTER, 0, SPIFFS_BASE_PATH"/images/test3.jpg", NULL, 0);
tstart = clock() - tstart;
if (doprint) printf(" JPG Decode time: %u ms\r\n", tstart);
sprintf(tmp_buff, "Decode time: %u ms", tstart);
update_header(NULL, tmp_buff);
Wait(-GDEMO_INFO_TIME);
// ** Show BMP image
update_header("BMP IMAGE", "");
for (int scale=5; scale >= 0; scale--) {
tstart = clock();
filename = SPIFFS_BASE_PATH"/images/tiger.bmp";
TFT_bmp_image(CENTER, CENTER, scale, filename, NULL, 0);
if (doprint) printf("BMP: filename str %s \r\n", filename);
tstart = clock() - tstart;
if (doprint) printf(" BMP time, scale: %d: %u ms\r\n", scale, tstart);
sprintf(tmp_buff, "Decode time: %u ms", tstart);
update_header(NULL, tmp_buff);
Wait(-500);
}
Wait(-GDEMO_INFO_TIME);
} else if (doprint) printf(" No file system found.\r\n"); }
FYI, I have added the test_spiffs function which I modified from https://github.com/loboris/ESP32_spiffs_example. The intention is to show spiffs partition and its files are intact. If you are interested, email me at siowlimchow@gmail.com.
Steps that I get it working:
sdkconfig
line 80 change CONFIG_SPIFFS_BASE_ADDR=180000
to CONFIG_SPIFFS_BASE_ADDR=0x180000
make build && make flash
make makefs
make flashfs
Have fun with fully working demo!
@janekm Thanks a ton, had the same issue and would never have figured it out.
Great!
THANK YOU -- fixed my issue!
Bought my ESP32-WROVER-KIT a few days ago from Mouser, hoping it was a v3 -- but it has an ILI9341 but otherwise it looks (black matte) like a V3 which is supposed to have ST7789V (in v2/v3) so I guess it is a V1 or something else (branded Expressif). the display OD measured exactly that of the ILI9341.
This solution to get the images working is greatly appreciated! Ronan
You should also change SPIFFS BASE ADDRESS in main/Kconfig.prebuild to 0x180000. and range.
ronammcall- The board with the ILI9341 is a V3 not a V1. Check the documentation and you can verify it.
@360art thanks. It works for me.
Hi, I'm facing in the same issue. I'm using Platformio on Windows, can someone help me with the @360art solution reproduced on Platformio?
Have you followed the recommended steps?
Yes, the steps:
I've un update: using "tft_image_debug" flag.
For jpg images:
[..] jpg prepare error 2 jpg prepare error 2 jpg prepare error 2 [..]
For bmp image:
[..] Error: -3 [reading header] [..]
Nope. See it above, https://github.com/loboris/ESP32_TFT_library/issues/24#issuecomment-380583113 from 360art
Great instruction if I knew where to run "make ...". I'm using Windows 10. Can you point my in the right direction please?
Sorry, I am not Windows user. However, it should not be hard. Google it, you will get the answers.
On Wed, 27 Jan 2021 at 01:35, romocitto88 notifications@github.com wrote:
Great instruction if I knew where to run "make ...". I'm using Windows 10. Can you point my in the right direction please?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/loboris/ESP32_TFT_library/issues/24#issuecomment-767513789, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCYQVWOPQJD3W6YFYCN4CLS32ZH7ANCNFSM4EHKDQWQ .
What is the difference doing:
mkspiffs.exe -c [..]\ESP32_TFT_library-master\data -b 4096 -p 256 -s 1114112 image.img
esptool.py --chip esp32 --port "COM30" --baud 460800 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_size detect 0x110000 [..]\image.img
Often this is not the best place for getting those answers, instead reading the ESP32 user manual. One good reason is, a blind leading a blind. However, user manual is skwsys accurate.
On Thu, 28 Jan 2021 at 2:00 AM, romocitto88 notifications@github.com wrote:
What is the difference doing:
- Upload from platformio (make build && make flash)
- Exec (make makefs)
mkspiffs.exe -c [..]\ESP32_TFT_library-master\data -b 4096 -p 256 -s 1114112 image.img
- Exec (make flashfs)
esptool.py --chip esp32 --port "COM30" --baud 460800 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_size detect 0x110000 [..]\image.img
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/loboris/ESP32_TFT_library/issues/24#issuecomment-768268723, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCYQVS4IWO77ASTYQUTYRTS4AE5ZANCNFSM4EHKDQWQ .
JPEG and BMP do not display on ESP-WROVER-KIT. All other functions display correctly.
make clean & make erase_flash -> make all & make flashfs -> make flash monitor
Built with latest esp-idf (as of 12/7/2017) and xtensa (1.22.0-75-gbaf03c2-5.2.0)
sdkconfig