Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 8 Replies) Does VM support loading data files in FATFS? (Read 3412 times)
Jesús
Junior Member
**
Offline


Posts: 11
Joined: Jul 1st, 2021
Does VM support loading data files in FATFS?
Nov 2nd, 2021 at 7:13pm
Print Post  
My question is about whether VM has the option to load the files from the "Data" folder inside arduino sketch for the ESP32 board, and that it has the data partition in FAT (FATFS) format.

Same question for ESP8266 and LittleFS partition

Similar to the option that can be seen in the attached images.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2697
Joined: Feb 13th, 2019
Re: Does VM support loading data files in FATFS?
Reply #1 - Nov 4th, 2021 at 4:17pm
Print Post  
Thanks for the question, and believe the Arduino IDE plugin shown there is from https://github.com/lorol/arduino-esp32fs-plugin

vMicro currently supports:
ESP32 - SPIFFS
ESP8266 - SPIFFS and LittleFS

We will look at integrating FatFS for both, and LittleFS for the ESP32, however none of these options are included in the current cores from Espressif so need further consideration.

Documentation: https://www.visualmicro.com/page/ESP8266-SPIFFS-and-LittleFS-FileSystems.aspx
  
Back to top
IP Logged
 
Jesús
Junior Member
**
Offline


Posts: 11
Joined: Jul 1st, 2021
Re: Does VM support loading data files in FATFS?
Reply #2 - Nov 4th, 2021 at 9:36pm
Print Post  
Thanks for your answer.
As I understand it, Esspresif has adopted FATFS by default in its ESP-IDF (Espressif IoT Development Framework), and the latest adaptation for Arduino already includes the latest version of ESP-IDF 4.4.
It looks like the future for Arduino will be with FATFS.

Regards
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2697
Joined: Feb 13th, 2019
Re: Does VM support loading data files in FATFS?
Reply #3 - Nov 5th, 2021 at 4:17pm
Print Post  
Thanks for the information.

We have added the FatFS and LittleFS options to the ESP32 and ESP8266 board menu options in the latest release (2021.0917.6), available at the top of the below board:
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES

Updated Documentation

  
Back to top
IP Logged
 
Jesús
Junior Member
**
Offline


Posts: 11
Joined: Jul 1st, 2021
Re: Does VM support loading data files in FATFS?
Reply #4 - Nov 7th, 2021 at 3:35pm
Print Post  
Hi Simon, Thanks for the update.
I have been doing different tests of uploading the "Data" folder of my ESP32 in FATFS format but I have not succeeded.
This is the message log I get:
******************************************************************
ESP32FSUpload.exe
E:\Mis documentos\Arduino\ESP32_Base_V01\data\config.json
E:\Mis documentos\Arduino\ESP32_Base_V01\data\registros.json
E:\Mis documentos\Arduino\ESP32_Base_V01\data\sensor.json
SPIFFS Creating Image...
[SPIFFS] data   : E:\Mis documentos\Arduino\ESP32_Base_V01\data
[SPIFFS] size   : 1472
[SPIFFS] page   : 256
[SPIFFS] block  : 4096
Pack file, dir_s: E:\Mis documentos\Arduino\ESP32_Base_V01\data\config.jsondir_d: /spiflash/config.json  file name: config.json
Pack file, dir_s: E:\Mis documentos\Arduino\ESP32_Base_V01\data\registros.jsondir_d: /spiflash/registros.json  file name: registros.json
Pack file, dir_s: E:\Mis documentos\Arduino\ESP32_Base_V01\data\sensor.jsondir_d: /spiflash/sensor.json  file name: sensor.json
g_flashmem[0]: ësize: 1507328
SPIFFS Uploading Image...
[SPIFFS] upload : 854cdb0bda1d241fb56ca4c396bbb2a/ESP32_Base_V01.ino.spiffs.bin
[SPIFFS] address: 2686976
[SPIFFS] port   : COM3
[SPIFFS] speed  : 921600
[SPIFFS] mode   : dio
[SPIFFS] freq   : 80m
esptool.py v3.1
Serial port COM3
Connecting........_
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 98:f4:ab:67:1a:f0
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash will be erased from 0x00290000 to 0x003fffff...
Compressed 1507328 bytes to 2218...
Writing at 0x00290000... (100 %)
Wrote 1507328 bytes (2218 compressed) at 0x00290000 in 7.3 seconds (effective 1662.2 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
SPIFFS Image Uploaded
******************************************************************
My configuration options are those that are in the images that I attach:
The programs "mkfatfs.exe" and "mklittlefs.exe" are also available in the folder: C: \ Program Files \ Utilidades64Bits \ MVStudio \ 2022 \ Common7 \ IDE \ Extensions \ 2wwezjof.0ni \ Micro Platforms \ espressif \ tools

Even though I change from one option to another, the spiffs version (ESP32_Base_V01.ino.spiffs.bin) is always generated instead of the FATFS version (ESP32_Base_V01.fatfs.bin) as it happens inside the Arduino IDE.
I have also tried to generate the local board.txt file but I have not obtained any difference.
Please, can you indicate any option that I may be forgetting?
Thanks in advance
« Last Edit: Nov 7th, 2021 at 4:23pm by Jesús »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2697
Joined: Feb 13th, 2019
Re: Does VM support loading data files in FATFS?
Reply #5 - Nov 8th, 2021 at 9:26am
Print Post  
Thanks for the report.

When changing the FS Upload Options, you will need to run a build, and then try the upload data files again after for the correct settings to be applied.
  
Back to top
IP Logged
 
Jesús
Junior Member
**
Offline


Posts: 11
Joined: Jul 1st, 2021
Re: Does VM support loading data files in FATFS?
Reply #6 - Nov 8th, 2021 at 9:45am
Print Post  
Hello,
These days I have carried out different tests with several options:
- Clean Solution
- Rebuild Solution
- Build Solution

But I have not managed to generate the file ESP32_Base_V01.fatfs.bin in any of them, the file ESP32_Base_V01.ino.spiffs.bin is always generated and sent.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2697
Joined: Feb 13th, 2019
Re: Does VM support loading data files in FATFS?
Reply #7 - Nov 8th, 2021 at 9:49am
Print Post  
Thanks for the detail, the image should be being created using the FatFS tools, and it is just the file name we have not corrected in this initial release.

If you enable Upload > Verbose and perform the data upload, it should show the FatFS tools in use, and it is just the filename which contains spiffs.
  
Back to top
IP Logged
 
Jesús
Junior Member
**
Offline


Posts: 11
Joined: Jul 1st, 2021
Re: Does VM support loading data files in FATFS?
Reply #8 - Nov 8th, 2021 at 10:23am
Print Post  
This is the log with the "Verbose" option, Is there something relevant to see the origin of the problem?:
ESP32FSUpload.exe
## recipe.wwwfiles.upload.pattern
"c:\program Upload.exe" -serial.port=COM3 p32\Release" -target_platform="esp32" -runtime.tools.mkspiffs.path="notTheToolYoureLookingFor" -board.name="ESP32 Dev Module" -upload.verbose=True -upload.resetmethod={upload.resetmethod} -upload.speed=921600 esp32\2.0.0" -project.name="ESP32_Base_V01.ino" -project.path="E:\Mis documentos\Arduino\ESP32_Base_V01" -tools.esptool.cmd="{tools.esptool.cmd}" -tools.esptool.cmd.windows="{tools.esptool.cmd.windows}" -runtime.tools.esptool.path="{runtime.tools.esptool.path}" nsa-esp32-elf-gcc\gcc8_4_0-esp-2021r1/bin/" -build.spiffs_start="{build.spiffs_start}" -build.spiffs_end="{build.spiffs_end}" -build.spiffs_pagesize="{build.spiffs_pagesize}" -build.spiffs_blocksize="{build.spiffs_blocksize}" -build.partitions="default_ffat" -network.password={network.password} -network.auth_upload={network.auth_upload} -network.port={network.port} -upload.tool=esptool_py -tools.esptool_py.cmd="esptool.exe" -tools.esptool_py.cmd.windows="{tools.esptool_py.cmd.windows}" \esp32\tools\esptool_py\3.1.0" -build.flash_mode=dio -build.flash_freq=80m
E:\Mis documentos\Arduino\ESP32_Base_V01\data\config.json
E:\Mis documentos\Arduino\ESP32_Base_V01\data\registros.json
E:\Mis documentos\Arduino\ESP32_Base_V01\data\sensor.json
SPIFFS Creating Image...
[SPIFFS] data   : E:\Mis documentos\Arduino\ESP32_Base_V01\data
[SPIFFS] size   : 1472
[SPIFFS] page   : 256
[SPIFFS] block  : 4096
"c:\program files\utilidades64bits\mvstudio\2022\common7\ide\extensions\2wwezjof.0ni\Micro Platforms\espressif\tools\mkfatfs.exe" -c "E:\Mis documentos\Arduino\ESP32_Base_V01\data" -s 1507328 8854cdb0bda1d241fb56ca4c396bbb2a/ESP32_Base_V01.ino.spiffs.bin"
Pack file, dir_s: E:\Mis documentos\Arduino\ESP32_Base_V01\data\config.jsondir_d: /spiflash/config.json  file name: config.json
Pack file, dir_s: E:\Mis documentos\Arduino\ESP32_Base_V01\data\registros.jsondir_d: /spiflash/registros.json  file name: registros.json
Pack file, dir_s: E:\Mis documentos\Arduino\ESP32_Base_V01\data\sensor.jsondir_d: /spiflash/sensor.json  file name: sensor.json
g_flashmem[0]: ësize: 1507328
SPIFFS Uploading Image...
[SPIFFS] upload : 854cdb0bda1d241fb56ca4c396bbb2a/ESP32_Base_V01.ino.spiffs.bin
[SPIFFS] address: 2686976
[SPIFFS] port   : COM3
[SPIFFS] speed  : 921600
[SPIFFS] mode   : dio
[SPIFFS] freq   : 80m
sptool.exe" --chip esp32 --baud 921600 --port COM3 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 2686976 8854cdb0bda1d241fb56ca4c396bbb2a/ESP32_Base_V01.ino.spiffs.bin"
esptool.py v3.1
Serial port COM3
Connecting........_
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 98:f4:ab:67:1a:f0
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash will be erased from 0x00290000 to 0x003fffff...
Compressed 1507328 bytes to 2218...
Writing at 0x00290000... (100 %)
Wrote 1507328 bytes (2218 compressed) at 0x00290000 in 7.4 seconds (effective 1624.4 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
SPIFFS Image Uploaded
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2697
Joined: Feb 13th, 2019
Re: Does VM support loading data files in FATFS?
Reply #9 - Nov 8th, 2021 at 10:29am
Print Post  
The name of the resulting image file is determined within our tools, which we will update in a future release.

The output sent shows the MkFatFS.exe is being used to build the image:
Code
Select All
"c:\program files\utilidades64bits\mvstudio\2022\common7\ide\extensions\2wwezjof.0ni\Micro Platforms\espressif\tools\mkfatfs.exe" -c "E:\Mis documentos\Arduino\ESP32_Base_V01\data" -s 1507328
8854cdb0bda1d241fb56ca4c396bbb2a/ESP32_Base_V01.ino.spiffs.bin" 

  
Back to top
IP Logged
 
Jesús
Junior Member
**
Offline


Posts: 11
Joined: Jul 1st, 2021
Re: Does VM support loading data files in FATFS?
Reply #10 - Nov 8th, 2021 at 11:05am
Print Post  
Simon,
It does not seem that the problem is only the file name change, since my ESP32 program uses FATFS and cannot recognize the partition, and it does not find the three files that are loaded ("config.json", "registries.json" , "sensor.json").

On the other hand, if I generate the data partition within the Ardion IDE and upload it to ESP32, when my program restarts, it can already read the three files.

I have also seen that the version of "mkfatfs.exe" used by VM is the same as the one used by Arduino IDE and it is version 0.3.6.

I am very interested in solving this problem, can you indicate any additional action that I can do?
Thanks
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2697
Joined: Feb 13th, 2019
Re: Does VM support loading data files in FATFS?
Reply #11 - Nov 8th, 2021 at 11:12am
Print Post  
Thanks for the feedback, we will have to investigate this further and we will update when there is an update to resolve this.
  
Back to top
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2697
Joined: Feb 13th, 2019
Re: Does VM support loading data files in FATFS?
Reply #12 - Nov 8th, 2021 at 3:33pm
Print Post  
The issue should be resolved in the latest release (21.11.08.0), available from the top of the below board:
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES
  
Back to top
IP Logged
 
Jesús
Junior Member
**
Offline


Posts: 11
Joined: Jul 1st, 2021
Re: Does VM support loading data files in FATFS?
Reply #13 - Nov 8th, 2021 at 5:42pm
Print Post  
Hi Simon, thanks for the update.
Uploading the data partition in FatFS format now works
Kind regards
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint