Skip to content

Commit

Permalink
Merge pull request #12 from esp8266/esp8266
Browse files Browse the repository at this point in the history
pull latest changes
  • Loading branch information
ficeto committed May 6, 2015
2 parents a1aa4c1 + 8dc2570 commit 9b5b323
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 79 deletions.
14 changes: 3 additions & 11 deletions hardware/esp8266com/esp8266/boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ generic.menu.FlashSize.4M=4M
generic.menu.FlashSize.4M.build.flash_size=4M

##############################################################
nodemcu.name=NODEMCU ESP8266 Module (v0.9)
nodemcu.name=NodeMCU (ESP8266 ESP-12 Module)

nodemcu.upload.tool=esptool
nodemcu.upload.speed=115200
nodemcu.upload.resetmethod=ck
nodemcu.upload.maximum_size=524288
nodemcu.upload.maximum_size=4194304
nodemcu.upload.wait_for_upload_port=true
nodemcu.serial.disableDTR=true
nodemcu.serial.disableRTS=true
Expand All @@ -73,7 +73,7 @@ nodemcu.build.board=ESP8266_ESP12
nodemcu.build.core=esp8266
nodemcu.build.variant=nodemcu
nodemcu.build.flash_mode=qio
nodemcu.build.flash_size=512K
nodemcu.build.flash_size=4M
nodemcu.build.flash_freq=40

nodemcu.menu.CpuFrequency.80=80 MHz
Expand Down Expand Up @@ -101,14 +101,6 @@ nodemcu.menu.UploadSpeed.512000.upload.speed=512000
nodemcu.menu.UploadSpeed.921600=921600
nodemcu.menu.UploadSpeed.921600.upload.speed=921600

nodemcu.menu.FlashSize.512K=512K
nodemcu.menu.FlashSize.512K.build.flash_size=512K
nodemcu.menu.FlashSize.256K=256K
nodemcu.menu.FlashSize.256K.build.flash_size=256K
nodemcu.menu.FlashSize.1M=1M
nodemcu.menu.FlashSize.1M.build.flash_size=1M
nodemcu.menu.FlashSize.2M=2M
nodemcu.menu.FlashSize.2M.build.flash_size=2M
nodemcu.menu.FlashSize.4M=4M
nodemcu.menu.FlashSize.4M.build.flash_size=4M

Expand Down
12 changes: 12 additions & 0 deletions hardware/esp8266com/esp8266/cores/esp8266/Esp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,13 @@ FlashMode_t EspClass::getFlashChipMode(void)
* Infos from
* http://www.wlxmall.com/images/stock_item/att/A1010004.pdf
* http://www.gigadevice.com/product-series/5.html?locale=en_US
* http://www.elinux.org/images/f/f5/Winbond-w25q32.pdf
*/
uint32_t EspClass::getFlashChipSizeByChipId(void) {
uint32_t chipId = getFlashChipId();
switch(chipId) {

// GigaDevice
case 0x1740C8: // GD25Q64B
return (8_MB);
case 0x1640C8: // GD25Q32B
Expand All @@ -243,6 +246,15 @@ uint32_t EspClass::getFlashChipSizeByChipId(void) {
return (128_kB);
case 0x1040C8: // GD25Q12
return (64_kB);

// Winbond
case 0x1640EF: // W25Q32
return (4_MB);
case 0x1540EF: // W25Q16
return (2_MB);
case 0x1440EF: // W25Q80
return (1_MB);

default:
return 0;
}
Expand Down
Loading

0 comments on commit 9b5b323

Please sign in to comment.