Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use SD Updater #8

Open
ghost opened this issue Aug 23, 2021 · 7 comments
Open

Unable to use SD Updater #8

ghost opened this issue Aug 23, 2021 · 7 comments

Comments

@ghost
Copy link

ghost commented Aug 23, 2021

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
Copy link
Owner

@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
Copy link
Author

ghost commented Aug 24, 2021

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
Copy link
Owner

@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
Copy link
Author

ghost commented Aug 24, 2021

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
Copy link
Contributor

tobozo commented Aug 24, 2021

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

@ghost
Copy link
Author

ghost commented Aug 24, 2021

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

@tobozo
Copy link
Contributor

tobozo commented Aug 28, 2021

@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 !");
    }
  }

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants