Commit Graph

17 Commits

Author SHA1 Message Date
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
Vowstar 749e71d9cb Fixed strange SPI flash API error. Added word_of_aligned_array. 2015-05-05 23:59:30 +08:00
HuangRui 5c84359b5c ROM flash size can changed with detected size, fixed #283. 2015-03-16 05:40:43 +08:00
HuangRui f7eed2b53b Changed e9 to magic_e9. 2015-03-16 01:44:54 +08:00
HuangRui 4e7473bc00 Fixed flash automatic detection bug. Support 128MBit flash. 2015-03-16 01:05:06 +08:00
HuangRui dfce182622 Paste new version, make it can get correct flash size. 2015-03-16 00:51:47 +08:00
HuangRui ed87cbd96f Try to fix flash auto detection bug. 2015-03-16 00:48:28 +08:00
HuangRui 0232c13b83 Emergency update, fix flash size auto detection bug.
64Mbit and 128Mbit supported by hardware, but not supported by this SDK 0.9.5. Waiting SDK update.
2015-02-15 02:13:58 +08:00
HuangRui 5d9caf23b6 Support 64Mbit and 128Mbit flash size auto detection. 2015-02-11 21:16:48 +08:00
funshine acd9d0dc97 deep optimizing ram usage 2015-01-07 01:15:38 +08:00
HuangRui 3c6ebea059 Use safe flash options. 2015-01-06 19:32:17 +08:00
funshine ff6e5e9924 build pre-build bin, auto save flash init data 2015-01-05 21:56:55 +08:00
HuangRui c04f2578ec Updated SDK to v0.9.5 and optimized memory. 2015-01-05 10:09:51 +08:00
HuangRui 0420b6d72f Add definition of NODE_STORE_TYPEDEF_ATTR and NODE_STORE_ATTR. 2015-01-02 17:56:34 +08:00
HuangRui 1b9479a650 Added NODE_STORE_ATTR __attribute__((aligned(4),packed)) 2015-01-01 22:22:05 +08:00
HuangRui a93e62c444 Add node.flashid() and node.flashsize(). 2014-12-31 08:08:31 +08:00
HuangRui 715ff5b7aa NodeMCU firmware can auto detect flash size now. 2014-12-31 02:47:44 +08:00