lovyan03 / M5Stack_LovyanLauncher

M5Stack Tools & Application Launcher
MIT License
181 stars 23 forks source link

Unable to use SD Updater #8

Open ghost opened 3 years ago

ghost commented 3 years ago

Hi,

I use LovyanLauncher into the M5Stack Gray using M5Burner.

I downloaded several games and apps (*.bin) into the SDcard, when I put the sd card to M5gray, and click on SD Updater on the top of the menu, I click on UniFlow.bin for example, then it says: Loading... with progress bar, and then it restarts to LovyanLauncher again!!!

Why I can't launch Uniflow or any other bin files from "SD Updater" menu ?

lovyan03 commented 3 years ago

@jJit0 I don't know anything about "UniFlow", so I will assume that you are talking about "UIFlow". The SD updater is basically intended for binaries built on the Arduino. To be more precise, it only updates the APP area of the patation structure set by the ArduinoESP32. On the other hand, "UIFlow" has its own structure which is incompatible with the ArduinoESP32 patation structure. Hence, it cannot be updated from SD-Updater.

LovyanLauncher is just calling the function of SD-Updater, please refer to this URL for more information about SD-Updater. @tobozo https://github.com/tobozo/M5Stack-SD-Updater

ghost commented 3 years ago

I’m sorry but I didn’t understand anything!!!

Do you have an English README.MD of LovyanLauncher on how to use it and all details? I don’t speak chinese, the current Readme.md is only in chinese 😣

I need to understand what’s LovyanLauncher is used for? And how do I use it?

lovyan03 commented 3 years ago

@jJit0 I am Japanese and can only handle Japanese. I don't understand Chinese. I think you need to know about SD-Updater first. If you are developing with ArduinoESP32, it will help you, but if you are using UIFlow or MicroPython, it will not help you.

Before asking any more questions, please read the SD-Updater repository.

ghost commented 3 years ago

Yeah sorry I meant Japanese Readme

Ok no problem, I need to understand how SD Updater work first before using it on the LovyanLauncher

Thanks anyway, Arigato Lovyan-san

tobozo commented 3 years ago

hey @jJit0 please create an issue or join the dedicated gitter community so we can talk about your issue

ghost commented 3 years ago

Hey @tobozo yeah no problem I’ll join the gitter community and talk about it

tobozo commented 3 years ago

@jJit0 can you please give a try using the unstable branch of this repository with this pull request along with the branch 1.1.0 of M5Stack-SD-Updater have been modified to work with the latest esp32-arduino-core 2.x.x

Here's a snippet of how to use the SD-Updater from your own sketch:

// #include <ESP32-Chimera-Core.h>
#include <M5Stack.h>
#define SDU_APP_NAME "M5Stack SDLoader Snippet"
#include <M5StackUpdater.h>

void setup() {

  M5.begin();

  Serial.println("Welcome to the SD-Updater minimal example!");
  Serial.println("Now checking if a button was pushed during boot ...");

  // checkSDUpdater();
  checkSDUpdater(
    SD,           // filesystem (default=SD)
    MENU_BIN,     // path to binary (default=/menu.bin, empty string=rollback only)
    2000,         // wait delay, (default=0, will be forced to 2000 upon ESP.restart() )
    TFCARD_CS_PIN // (usually default=4 but your mileage may vary)
  );

  Serial.println("Nope, will run the sketch normally");

}

void loop() {

  // provide means to copy the sketch to filesystem
  M5.update();
  if( M5.BtnB.pressedFor( 1000 ) ) {
    Serial.println("Will copy this sketch to filesystem");
    if( copyFsPartition( SD, "/MY_SKETCH.bin", TFCARD_CS_PIN ) ) {
      Serial.println("Copy successful !");
    } else {
      Serial.println("Copy failed !");
    }
  }

}