Commit Graph

25 Commits

Author SHA1 Message Date
TerryE 1e49d03dbc Limit file.open() names to 31 char max C string format. See #1112 2016-03-04 01:46:35 +00:00
Arnim Läuger 3b589e2177 Merge pull request #958 from DiUS/modules-gnu11
Enable -std=gnu11 for modules dir.
2016-01-22 23:20:29 +01:00
Johny Mattsson 182d45f928 Enable -std=gnu11 for modules dir.
Plus boat-load of fixes to actually make that build.
2016-01-20 19:40:47 +11:00
Johny Mattsson 58427563ed Ugly workaround for broken SPIFFS GC alignment.
Proper fix should be done upstream and pulled in once available.
2016-01-12 17:24:02 +11:00
Johny Mattsson a6c0873a28 Upgrade to SDK 1.5.0 + Espressif's Open LWIP 1.5.0.
Removed earlier TCP port randomisation fix - the new SDK has its own fix
even though Espressif told me they wouldn't fix it. Yay?
2015-12-23 11:17:05 +11:00
Johny Mattsson fd9113124c Corrected the 4-page alignment for start of fs. 2015-12-16 18:59:55 +11:00
Johny Mattsson c4e8b04fbf Cleaned up all uses of INTERNAL_FLASH_START_ADDRESS.
There was only one genuine use of this macro, all other places were
using it only as a necessary compensation. While this was fine as long as
it was the first meg of flash which was mapped, it became incorrect and
quite dangerous whenever this assumption did not hold (such as when
running from the second slot in an OTA scenario).

The flash API now uses actual addresses, not translated/mapped
addresses, and the users of this API have been adjusted accordingly.
This makes the flash API work correctly regardless of what flash mapping
is in use.

The old macro is still available under the new name
INTERNAL_FLASH_MAPPED_ADDRESS, and this is used to detect flash writes
where the source is mapped flash (and thus has to be bounced), and to
adjust the _flash_used_end linker symbol when used with
flassh_find_sector() by the filesystem code. The latter usage is not
OTA-proof, but in an OTA scenario the filesystem needs a fixed location
anyway and thus would not use this code path.
2015-12-12 13:20:22 +11:00
Johny Mattsson dec159bce1 Support for fixing the filesystem location.
To assist with testing new SDK.
2015-10-12 13:26:05 +11:00
Johny Mattsson 00527237f9 Remove now-unnecessary alignment constraints in SPIFFS.
With platform_s_flash_read() now properly handling unaligned destination
buffers, there is no need to shim SPIFFS any more.
2015-08-04 16:30:58 +10:00
Johny Mattsson 4a47813e20 Reduced SPIFFS cache, freeing ~0.5k RAM.
Also made the cache on/off configurable via user_config.h. Uncached writes
are not a very good idea, but for read-only deployments a further ~0.5k RAM
can be gained by disabling the cache.

Tweaked the file.read() workhorse to read large chunks at a time rather
than use getc(), to compensate for potential unavailability of cache.
2015-07-31 18:15:18 +10:00
Johny Mattsson 8d68ad7e15 Updated SPIFFS to 0.3.2, plus alignment fix. 2015-07-17 13:40:55 +10:00
funshine 1c2ee75a00 fix mqtt, do a format when wrong flash size is detected 2015-04-03 00:51:02 +08:00
funshine 4332b21ef3 minor fix 2015-03-20 19:42:10 +08:00
funshine 27c0620912 fix bugs for spiffs from pellepl/spiffs 2015-03-10 23:07:47 +08:00
funshine 81ea8d9597 add math, add file.fsinfo(), update spiffs. 2015-03-10 01:12:36 +08:00
funshine 1798c6b78c minor update 2015-02-14 16:59:45 +08:00
funshine 6c1c6805b3 modify loadfile to malloc memory according to file size 2015-02-13 19:23:30 +08:00
funshine 2d711bbc0d update spiffs to 0.2.2, add file.rename api 2015-02-11 21:20:54 +08:00
funshine 6a0599d22c fix alignment 2015-01-27 21:02:54 +08:00
funshine 425e664114 fix #132, #113, switch to lib/libssl.a 2015-01-27 20:47:41 +08:00
funshine 971c4b569b fix net.socket:send(), fix file.read() when 0xFF reached 2015-01-08 16:03:21 +08:00
funshine b65fb02cc5 add file.format() to rebuild fs system, get more ram back 2015-01-07 15:57:17 +08:00
HuangRui c04f2578ec Updated SDK to v0.9.5 and optimized memory. 2015-01-05 10:09:51 +08:00
funshine 2321ee972b fix file api issue when compile using gcc toolchain 2014-12-26 00:03:48 +08:00
funshine cdd13b1af3 source file first commit, folder structure refact 2014-12-22 19:35:05 +08:00