Xinyuan-LilyGO / T-Echo

MIT License
147 stars 22 forks source link

internal Flash Memory example?? #42

Closed richonguzman closed 4 months ago

richonguzman commented 5 months ago

cant find any internal Flash Memory example to use this

lyusupov commented 4 months ago

https://github.com/adafruit/Adafruit_SPIFlash

richonguzman commented 4 months ago

https://github.com/adafruit/Adafruit_SPIFlash

So I would need to read/write flash with flash examples or SDFlash examples?

PS: can flash memory be written with VSCODE>Platformio?

lyusupov commented 4 months ago

So I would need to read/write flash with flash examples ...

Access to T-Echo's 2 Mbytes QSPI flash memory is possible with FAT filesystem and USB Mass Storage method. See this example:

https://github.com/lyusupov/SoftRF/wiki/Badge-Edition.-Aircrafts-database

richonguzman commented 4 months ago

so the flash data is added just the uf2 files when starting the USB Mass Storage method ??

on the same folder and all?

lyusupov commented 4 months ago

1) the uif2 firmware binary is applicable when the device in Adafruit bootloader mode only 2) in application mode (Arduino) -it is possible to use the same 'Drag and Drop' method as well, read

https://github.com/adafruit/Adafruit_TinyUSB_Arduino/tree/master/examples/MassStorage/msc_external_flash

richonguzman commented 4 months ago
  1. the uif2 firmware binary is applicable when the device in Adafruit bootloader mode only
  2. in application mode (Arduino) -it is possible to use the same 'Drag and Drop' method as well, read

    • Adafruit SPIflash examples and
    • Adafruit TinyUSB Arduino examples

https://github.com/adafruit/Adafruit_TinyUSB_Arduino/tree/master/examples/MassStorage/msc_external_flash

sorry I got lost for a moment:

My The T-echo is running as "Adafruit bootloader mode" and I can upload like a "external mass flash disk" the .uf2 file and also through VSCODE+Platformio. This works fine.

But this is where I need to be specific: will I be able to add also a .json file into the flash of T-echo by copying it also to the "external mass flash disk" that "Adafruit bootloader mode" enables?

lyusupov commented 4 months ago

will I be able to add also a .json file into the flash of T-echo by copying it also to the "external mass flash disk ...

Play with msc_external_flash sketch (mentioned above) to answer your question by yourself. You may borrow T-Echo specific GPIOs and flash types from SoftRF source code: https://github.com/lyusupov/SoftRF/blob/master/software/firmware/source/SoftRF/src/platform/nRF52.cpp#L199-L233

richonguzman commented 4 months ago

will I be able to add also a .json file into the flash of T-echo by copying it also to the "external mass flash disk ...

Play with msc_external_flash sketch (mentioned above) to answer your question by yourself. You may borrow T-Echo specific GPIOs and flash types from SoftRF source code: https://github.com/lyusupov/SoftRF/blob/master/software/firmware/source/SoftRF/src/platform/nRF52.cpp#L199-L233

thanks for the guidance!!!

I will try (as this is all new to me)

;)

lyusupov commented 4 months ago
image