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

Incorrect Filesystem Docs #23

Open
tripflex opened this issue May 2, 2019 · 2 comments
Open

Incorrect Filesystem Docs #23

tripflex opened this issue May 2, 2019 · 2 comments

Comments

@tripflex
Copy link
Contributor

tripflex commented May 2, 2019

https://github.com/cesanta/mongoose-os-docs/blob/master/mongoose-os/howtos/fs.md

Is now incorrect, as "apparently" sys.mount is deprecated (which to cesanta means removed):

cesanta/mongoose-os#501

@grand87
Copy link

grand87 commented Jul 27, 2019

I also met this issue - my intention was to create an additional filesystem to keep data for http server
I overcame it with a modification to the mos.yml file which created & mounted filesystem:

  - ["fstab.fs1.dev", "sfl0"]
  - ["fstab.fs1.type", "SPIFFS"]
  - ["fstab.fs1.opts", '{"addr":3145728, "size" : 524288, "bs": 4096, "ps": 128, "es": 4096}']
  - ["fstab.fs1.path", "/http"]
  - ["fstab.fs1.create", true]

I am using ESP8266
With an update fw I am able to put new files to /http partition with mos put
However after fw update I saw below log messages:

[Jul 27 12:21:59.174] mgos_vfs.c:100          Create SPIFFS (dev 0x3fff01ac, opts {"addr":3145728, "size" : 524288, "bs": 4096, "ps": 128, "es": 4096})
[Jul 27 12:21:59.189] mgos_vfs_fs_spiffs.:155 addr 0x300000 size 524288 bs 4096 ps 128 es 4096 nfd 10 encr 0 => -10025
[Jul 27 12:22:04.482] mgos_vfs.c:147          /http: SPIFFS @ sfl0, opts {"addr":3145728, "size" : 524288, "bs": 4096, "ps": 128, "es": 4096}
[Jul 27 12:22:05.047] mgos_vfs.c:320          /http: size 480561, used: 0, free: 480561
[Jul 27 12:22:05.180] mgos_sys_config.c:174   Saved to conf9.json

The error code 10025 makes me uncomfortable even if I could use this partition
Would like to get updated manual)

@mamuesp
Copy link
Collaborator

mamuesp commented Jul 28, 2019

Perhaps you should look if your starting address is correct, because in the example "addr is the offset from the beginning of the flash chip where to create the filesystem, 3145728 is just after the first 3M." Perhaps on your board this won't work. A little advice: please pose such questions in the developer forum, github is no discussion board.

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

3 participants