Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to determine flash size of NodeMCU?

Tags:

nodemcu

Just bought a couple of NodeMCU from vendor on AliExpress. They were advertised as "v2" and having 4M flash.

How can I verify the flash size? The board says "Ver 0.1", but don't know if that means anything.

like image 626
cc young Avatar asked Sep 19 '25 15:09

cc young


2 Answers

You have basically two options: install a firmware (NodeMCU, Arduino, etc.) and use their functions or extract the flash ID and look it up.

Install NodeMCU

  • Build and flash the NodeMCU firmware.
  • Run print(node.flashsize())

Chip ID

  • install esptool.py
  • run esptool.py -p <serial-port> flash_id (gives you a hex manufacturer & chip ID)
  • look up the chip in https://review.coreboot.org/plugins/gitiles/flashrom/+/refs/heads/master/include/flashchips.h
like image 96
Marcel Stör Avatar answered Sep 22 '25 04:09

Marcel Stör


As Marcel Stor said before in this comment, the esptool.py may be used to find the flash size.

  • Just run python esptool.py -p <serial_port> flash_id
  • Flash size is output like this Detected flash size: xx

Output sample

enter image description here

like image 30
Dorin Avatar answered Sep 22 '25 04:09

Dorin