As the title says... Chat on...

User avatar
By picstart
#8808 nodeMcu claims to auto detect the size of the flash.
node.flashid() reports 1261768 for the 512 byte flash.
I have replaced the flash with a winbond 4Mbyte and node.flashid() reports 1458415
Issue
The undocumented node.flashsize() reports both flash chips as 524288 aka 512K.
Now flashsize() maybe broken and always report 512K regardless of the flash installed or
The nodeMCU firmware for autodetect has a lookup table that possibly can't correlate id 1458415 as being a 32mbit or 4mbyte flash.
The method used to autodetect the Flash installed is not documented. It may not be working.
There is a #define in config.h that would set flashsize to 4096k bytes
Anyone have an idea how to tell if flash is being fully utilized by the firmware.
User avatar
By picstart
#8853 Investigation continues
Further investigating

Background
Winbond 25Q32BVSIG 32Mbit
Windows eclipse IDE thanks to CHERTS and others
The code below produces a flawless compile and a good flash and yes the esp8266 runs lua.
A small miracle considering the coder job security built into the myriad of dependencies that must mesh to have success.
I guess the coders gave up on KISS.
Any how it works for now but I suspect any small variation will bring about massive failure in the compile.

Info:
The determination of FLASH is defined at compile time in
nodemcu-firmware>app>include>user_config.h
Code: Select all// #define FLASH_512K
// #define FLASH_1M
// #define FLASH_2M
//#define FLASH_4M
#define FLASH_AUTOSIZE

This is the original code however I haven't proved or disproved that FLASH_AUTOSIZE is working since node.flashsize() returns the same value for both 32mbit flash and 2mbit flash'.

Issue
commenting in #define FLASH_4M and commenting out #define FLASH_AUTOSIZE
results in a flawless compile but the flash runs but results in the blue light being solid at the end of the flashing ( it should be off)

Any ideas?