Commit Graph

51 Commits

Author SHA1 Message Date
Philip Gladstone 7185b9c603
Improved startup performance and measurement tools. (#3171)
* Don't adjust the clock until after we deal with rtctime...
* Switched to using START_OPTION_CPU_FREQ_MAX instead.
* Use setfield and add caching of the startup option
* Put the startupcounts warning into a warning box
2020-10-18 20:46:47 +02:00
Terry Ellison 1f2e5bba4a
Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
Terry Ellison bbeb09b695 Squashed updates do get Lua51 and Lua53 working (#3075)
-  Lots of minor but nasty bugfixes to get all tests to run clean
-  core lua and test suite fixes to allow luac -F to run cleanly against test suite
-  next tranch to get LFS working
-  luac.cross -a options plus fixes from feedback
-  UART fixes and lua.c merge
-  commit of wip prior to rebaselining against current dev
-  more tweaks
2020-06-09 22:26:52 +02:00
Terry Ellison 98c2c0520d
Dev make cleanup (#2842) 2019-07-23 18:47:18 +03:00
Johny Mattsson 526d21dab4 Major cleanup - c_whatever is finally history. (#2838)
The PR removed the bulk of non-newlib headers from the NodeMCU source base.  
app/libc has now been cut down to the bare minimum overrides to shadow the 
corresponding functions in the SDK's libc. The old c_xyz.h headerfiles have been 
nuked in favour of the standard <xyz.h> headers, with a few exceptions over in 
sdk-overrides. Again, shipping a libc.a without headers is a terrible thing to do. We're 
still living on a prayer that libc was configured the same was as a default-configured
xtensa gcc toolchain assumes it is. That part I cannot do anything about, unfortunately, 
but it's no worse than it has been before.

This enables our source files to compile successfully using the standard header files, 
and use the typical malloc()/calloc()/realloc()/free(), the strwhatever()s and 
memwhatever()s. These end up, through macro and linker magic, mapped to the 
appropriate SDK or ROM functions.
2019-07-22 00:58:21 +03:00
Terry Ellison d6980ad802
SDK 3.0 tranche3 (#2761)
Force libpp.a into iRAM, and backout redundant IRAM_DATA_ATTR changes
2019-05-19 14:38:23 +01:00
Terry Ellison f1b5dfc34e
SDK-3.0 tranche updates (#2757)
includes some dRAM -> iRAM optimisations
2019-05-17 13:04:19 +01:00
ziggurat29 5a6992c26a added spiffsimg host tools project to msvc build configuration. (#2686) 2019-04-09 14:38:49 +01:00
Terry Ellison 9a47107920
SDK 3.0 release (#2692)
* Rebaseline firmware to non-OS SDK version 3.0
* Note that SDK version 3.0 introduces the concept of a Flash Partition Table(PT).  This is located at Flash offset 0x10000 in our firmware build.
* The firmware is now PT aware with both LFS and SPIFFS taking their partition size and location from the PT
* A new tool `tools/nodemcu-partition.py` is now used to initialise these data and can also download LFS and SPIFFS images to these partitions.
2019-04-05 16:01:45 +01:00
sergio d77666c0e8 trailing spaces cleanup (#2659) 2019-02-17 18:26:29 +00:00
Philip Gladstone 11c47fa17a New version of spiffs (#2172) 2017-12-03 13:14:22 +01:00
philip 761c9dff7f Try to fix the blocksize issues 2017-07-06 23:18:06 -04:00
Johny Mattsson c01f653736 Unbreak build when SPIFFS_CACHE==0. (#2028) 2017-07-05 18:00:26 +02:00
Philip Gladstone e7f063950b Update to current version of SPIFFS (#1949) 2017-05-21 16:16:39 +02:00
Arnim Läuger 4e4dfc1d88 Align 8 MB & 16 MB flash sizes with SDK 2.1.0. (#1968)
* align 8MB and 16MB auto flash support with sdk 2.1.0
* remove SAFE_API
* fix flash size mismatch detection logic
2017-05-16 16:50:36 +02:00
Arnim Läuger fc887e9f9f Fix memory leak in file_stat(). (#1871)
* Change vfs_stat() api to pre-allocated buffer for stat info.
* Change vfs_readdir() api to stat buffer as well. vfs_item api removed.
2017-03-29 13:58:40 +02:00
Arnim Läuger c57af8972f Rework support for >4MB modules: place SPIFFS after SDK data (#1646) 2016-12-26 14:17:57 +01:00
Arnim Läuger c70dc7497e Handle error condition in file.read() (#1599)
* handle error condition in file.read()

* simplify loop initialization
2016-11-19 10:36:00 -05:00
Arnim Läuger fdc766be9f fix vfs_lseek() result checking in enduser_setup and clarify SPIFFS_lseek() return value (#1570) 2016-11-08 22:27:12 +01:00
Arnim Läuger a0e2e0ca37 Implement object model for files (#1532) 2016-11-08 21:02:51 +01:00
Philip Gladstone ebb537c502 Version of printf that doesn't suffer from buffer overflows (#1564) 2016-10-27 09:38:47 +03:00
Philip Gladstone 0ee1ab68b0 Improve reliability of FS detection. (#1528)
* Version to make filesystem detection more reliable
* Improve bad fs detection
2016-10-25 22:51:59 +02:00
Arnim Läuger a86fb74c34 implement file.size for spiffs (#1516)
Another bug squashed!
2016-10-02 21:32:48 -04:00
Arnim Läuger ecf8bd98d6 Add FatFs and SD card support (#1397)
* Add FatFs
* enable BUILD_FATFS for all-module build
* push vfs into rest of firmware
* align maximum filename length
* increase timeout for acmd41 during card initialization
* switch from DOS to Unix path semantics chdrive() is substituted by chdir()
* update to fatfs R.012a incl. patches 1-6
* add callback for rtc provisioning in file
* update docs
2016-09-05 20:17:13 +02:00
Arnim Läuger 84c005e85c Update to SDK 1.5.4.1 (#1390) 2016-07-22 23:18:47 +02:00
Philip Gladstone af39a0bc25 Upgrade to latest SPIFFS and add building of file systems (#1226)
Fixes #1164 and thus also #1150, #1149, #1147 and #898.

* Move to latest version of SPIFFS
* Add SPIFFS porting layer for NodeMCU
* Add option to delete output if it doesn't fit
* Change FLASHSIZE to be in bits by default: default 4mb 32mb
* Add SPIFFS_MAX_FILESYSTEM_SIZE override
* Add notes on SPIFFS_FIXED_LOCATION
* Add 1M boundary
* Include the current version of the LICENSE
2016-06-05 23:10:58 +02:00
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