ESP8266 Flash

来自Jack's Lab
(版本间的差异)
跳转到: 导航, 搜索
(以“== Flash Layout == 4KB 为一个扇区 (Sector) iBaihe 的参数: 0x3C * 4KB = 0x3C000 COS Platform 参数: (0x3C + 1) * 4KB = 0x3D000 (SAVE_0) (0x3C + 2)...”为内容创建页面)
 
(Flash Layout)
第1行: 第1行:
== Flash Layout ==
+
== 概述 ==
  
 
4KB 为一个扇区 (Sector)
 
4KB 为一个扇区 (Sector)
第15行: 第15行:
  
  
=== Without OTA ===
+
== Layout Without OTA ==
  
 
[[文件:Esp8266-flash-layout-no-ota.png]]
 
[[文件:Esp8266-flash-layout-no-ota.png]]
第39行: 第39行:
 
<br><br>
 
<br><br>
  
=== With OTA ===
+
== Layout With OTA ==
  
 
[[文件:Esp8266-flash-layout-ota.png]]
 
[[文件:Esp8266-flash-layout-ota.png]]
第49行: 第49行:
 
<br><br>
 
<br><br>
  
=== 批量参数区设计 ===
+
== 批量参数区设计 ==
  
 
<s>出厂时,Param_Saved0 写入 sn,activeflag=0, token为空,pubkey为空
 
<s>出厂时,Param_Saved0 写入 sn,activeflag=0, token为空,pubkey为空

2015年11月9日 (一) 23:34的版本

目录

1 概述

4KB 为一个扇区 (Sector)

iBaihe 的参数: 0x3C * 4KB = 0x3C000

COS Platform 参数:

(0x3C + 1) * 4KB = 0x3D000 (SAVE_0)
(0x3C + 2) * 4KB = 0x3E000 (SAVE_1)
(0x3C + 3) * 4KB = 0x3F000 (PARAM_FLAG)
  • 系统参数区 (System param) 始终为 Flash 的最后 16KB
  • 用户参数区 (User param) 指 Espressif 提供的示例 (IOT_Demo / AT) 中设定的用户参数区


2 Layout Without OTA

Esp8266-flash-layout-no-ota.png

Esp8266-flash-layout-no-ota-512.png

Esp8266-flash-layout-no-ota-1024.png

Address	Size	Name	                        Description
00000h	4k	boot.bin	                Bootloader
 
3C000h	14k	Param Start Sector
3D000h  1x4k    Param Saved 0
3E000h  1x4k    Param Saved 1
3F000h  1x4k    Param Flag

40000h	240k	app.v6.irom0text.bin	        SDK libraries
7C000h	8k	esp_init_data_default.bin	Default configuration
7E000h	8k	blank.bin	                Filled with FFh. May be WiFi configuration



3 Layout With OTA

Esp8266-flash-layout-ota.png

Esp8266-flash-layout-ota-512.png

Esp8266-flash-layout-ota-1024.png



4 批量参数区设计

出厂时,Param_Saved0 写入 sn,activeflag=0, token为空,pubkey为空 APP 传递 AP ssid 和 password 时,同时调用web api,将生成的 prikey & pubkey 传给 mini,mini收到后,将 prikey 写入 flash 的 token 域,pubkey 写入pubkey

出厂时,Param_Saved0 写入 sn, pubkey, MAC, activeflag=0

APP 传递 AP ssid 和 password 即完成添加,X2 连上 WiFi 后,向云端 push 一条消息,告诉云端:“我已激活” 即OK

激活时,将 sn, pubkey, mac 作为参数传给云端

激活时,将 sn 与 token 作为参数传给云端





















个人工具
名字空间

变换
操作
导航
工具箱