bmorcelli / M5Stick-Launcher

App launcher for M5StickC, M5StickC Plus, M5StickC Plus 2 and M5Cardputer
MIT License
221 stars 20 forks source link

Unable to compile #12

Closed DormantDrakaiNa closed 5 months ago

DormantDrakaiNa commented 5 months ago

Trying to compile it myself, I keep running across this issue:

Compilation error: too many arguments for format [-Werror=format-extra-args]

That is from line 804 in the ino file:

Serial.printf("\nError: file dont reach spiffs offset %d, to read spiffs.", spiffs_offset,HEX);

I don't understand how to handle spiffs yet with all this, so is there something I'm doing wrong? I followed the directions to that point for a Cardputer.

bmorcelli commented 5 months ago

It is not a problem with SPIFFs itself, it's a problem with this Serial.printf(), try to run without the ",HEX"

Or just comment this line out, it is an informative serial message, nothing much special...

What program are you using to build this project? If Arduino IDE, which version?

DormantDrakaiNa commented 5 months ago

Ok, I just commented it out and it compiled. It has errors in the output, but it does flash and boot. I'll have to try again removing ,HEX to see if there's any difference. I'm using Arduino IDE, version 2.3.2. As far as I can tell, I have all the relevant libraries needed. Here's the rest of the errors in case it's helpful or useful for anything, or if I've made some sort of mistake.

In file included from C:\Users\3drak\Desktop\launch\Launcher\Launcher.ino:20:
c:\Users\3drak\Documents\Arduino\libraries\SdFat\src/SdFat.h:448:2: warning: #warning File not defined because __has_include(FS.h) [-Wcpp]
 #warning File not defined because __has_include(FS.h)
  ^~~~~~~
C:\Users\3drak\Desktop\launch\Launcher\Launcher.ino: In function 'void loop()':
C:\Users\3drak\Desktop\launch\Launcher\Launcher.ino:722:28: warning: unknown escape sequence: '\040'
             LNDISP.println(" -## M5Launcher ##- \n Binary is too big \n should I continue? \nEnter/M5 to continue\n\ any key to cancel ");
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\3drak\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\cores\esp32\esp32-hal-uart.c: In function 'uartSetPins':
C:\Users\3drak\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\cores\esp32\esp32-hal-uart.c:153:9: warning: 'return' with no value, in function returning non-void
         return;
         ^~~~~~
C:\Users\3drak\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\cores\esp32\esp32-hal-uart.c:149:6: note: declared here
 bool uartSetPins(uint8_t uart_num, int8_t rxPin, int8_t txPin, int8_t ctsPin, int8_t rtsPin)
      ^~~~~~~~~~~

The other question I have is what format is the boot image? I'm assuming in the M5Launcher-image.h, the boot image is the first section, and the menu or sd card error screen is the second. I thought it was just hex but that's probably wrong.

bmorcelli commented 5 months ago

The M5Launcher-image.h stores the boot image for Cardputer/Stickcplus2 and stickcplus 1.1... that last is different from the other, that's why it need 2 matrices..

These errors you've got, I can't reproduce them here.. this is so odd...

Maybe something with the libraries, or board version, idk...

DormantDrakaiNa commented 5 months ago

Awesome, I was going in the right direction on it then. Could you confirm if they're in hex or another format? I tried converting an image of the right resolution to hex and ended up with a black screen. I feel like it's not centered on the screen and black is the default without an image

With the errors, I've got the board selection set to M5Stack-ATOMS3 and have the following libraries. Some are from messing with ESP32 Cam boards.

  1. SD
  2. Adafruit BusIO
  3. Adafruit DMA neopixel library
  4. Adafruit GFX Library
  5. Adafruit NeoPixel
  6. Adafruit ST7735 and ST7789 Librart
  7. Adafruit TFTLCD Library
  8. Adafruit seesaw Library
  9. Arducam_Mega
  10. AsyncTCP
  11. BME69x Sensor library
  12. DeepSleepScheduler
  13. ESP32-Chimera-Core
  14. ESP32_RTC_EEPROM
  15. ESPAsyncTCP
  16. ESPAsyncWebServer
  17. ESPxRGB
  18. ILI9341_t3n
  19. IRrenote
  20. KinkedList
  21. LovyanGFX
  22. M%Cardputer
  23. M5GFX
  24. M5Unified
  25. NimBLE-Arduino
  26. PNGdec
  27. SdFat
  28. TFT Touch Shiel v2.0
  29. TFT-eSPI_Scroll
  30. Tjpg_Decoder
  31. Time
  32. Timer
  33. TimerExtensions
  34. Timezone
bmorcelli commented 5 months ago

Yes, they are in HEX, but the conversion is kinda tricky... For the Cardputer hex image I needed to use a .bmp file in the conversion

And the plus 1.1 I needed to use a .png with 16bytes configuration..

DormantDrakaiNa commented 5 months ago

Thank you. Seems I'm having some sort of issue with it. I started with a png that had been resized to 240x135, converted it to bmp, then used BmpHexToPro to convert it to hex, but I'm still getting a black display after flashing. Still has the battery and white bar on the left side, but the rest is black where the original boot image was.

bmorcelli commented 5 months ago

Help me understand what you're trying to accomplish..

Are you porting the Launcher to other devices? Such as AtomS3?

I've got some help from the community to have this bootscreen working, so I can't really help with it..

But I woul be really glad to help (and get help) to port this project to M5Core, m5Core2 and AtomS3 (if it is easy to plug an SD card reader in it)

I don't have any of these devices to mess with, so it is keeping undone..