We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
首先在main.c中增加了 ` #if ((SPI_FLASH_SIZE_MAP == 0) || (SPI_FLASH_SIZE_MAP == 1)) #error "The flash map is not supported" #elif (SPI_FLASH_SIZE_MAP == 2) #define SYSTEM_PARTITION_OTA_SIZE 0x6A000 #define SYSTEM_PARTITION_OTA_2_ADDR 0x81000 #define SYSTEM_PARTITION_RF_CAL_ADDR 0xfb000 #define SYSTEM_PARTITION_PHY_DATA_ADDR 0xfc000 #define SYSTEM_PARTITION_SYSTEM_PARAMETER_ADDR 0xfd000 #define SYSTEM_PARTITION_CUSTOMER_PRIV_PARAM_ADDR 0x7c000 #elif (SPI_FLASH_SIZE_MAP == 3) #define SYSTEM_PARTITION_OTA_SIZE 0x6A000 #define SYSTEM_PARTITION_OTA_2_ADDR 0x81000 #define SYSTEM_PARTITION_RF_CAL_ADDR 0x1fb000 #define SYSTEM_PARTITION_PHY_DATA_ADDR 0x1fc000 #define SYSTEM_PARTITION_SYSTEM_PARAMETER_ADDR 0x1fd000 #define SYSTEM_PARTITION_CUSTOMER_PRIV_PARAM_ADDR 0x7c000 #elif (SPI_FLASH_SIZE_MAP == 4) #define SYSTEM_PARTITION_OTA_SIZE 0x6A000 #define SYSTEM_PARTITION_OTA_2_ADDR 0x81000 #define SYSTEM_PARTITION_RF_CAL_ADDR 0x3fb000 #define SYSTEM_PARTITION_PHY_DATA_ADDR 0x3fc000 #define SYSTEM_PARTITION_SYSTEM_PARAMETER_ADDR 0x3fd000 #define SYSTEM_PARTITION_CUSTOMER_PRIV_PARAM_ADDR 0x7c000 #elif (SPI_FLASH_SIZE_MAP == 5) #define SYSTEM_PARTITION_OTA_SIZE 0x6A000 #define SYSTEM_PARTITION_OTA_2_ADDR 0x101000 #define SYSTEM_PARTITION_RF_CAL_ADDR 0x1fb000 #define SYSTEM_PARTITION_PHY_DATA_ADDR 0x1fc000 #define SYSTEM_PARTITION_SYSTEM_PARAMETER_ADDR 0x1fd000 #define SYSTEM_PARTITION_CUSTOMER_PRIV_PARAM_ADDR 0xfc000 #elif (SPI_FLASH_SIZE_MAP == 6) #define SYSTEM_PARTITION_OTA_SIZE 0x6A000 #define SYSTEM_PARTITION_OTA_2_ADDR 0x101000 #define SYSTEM_PARTITION_RF_CAL_ADDR 0x3fb000 #define SYSTEM_PARTITION_PHY_DATA_ADDR 0x3fc000 #define SYSTEM_PARTITION_SYSTEM_PARAMETER_ADDR 0x3fd000 #define SYSTEM_PARTITION_CUSTOMER_PRIV_PARAM_ADDR 0xfc000 #else #error "The flash map is not supported" #endif
#define SYSTEM_PARTITION_CUSTOMER_PRIV_PARAM SYSTEM_PARTITION_CUSTOMER_BEGIN
uint32 priv_param_start_sec;
static const partition_item_t at_partition_table[] = { { SYSTEM_PARTITION_BOOTLOADER, 0x0, 0x1000}, { SYSTEM_PARTITION_OTA_1, 0x1000, SYSTEM_PARTITION_OTA_SIZE}, { SYSTEM_PARTITION_OTA_2, SYSTEM_PARTITION_OTA_2_ADDR, SYSTEM_PARTITION_OTA_SIZE}, { SYSTEM_PARTITION_RF_CAL, SYSTEM_PARTITION_RF_CAL_ADDR, 0x1000}, { SYSTEM_PARTITION_PHY_DATA, SYSTEM_PARTITION_PHY_DATA_ADDR, 0x1000}, { SYSTEM_PARTITION_SYSTEM_PARAMETER, SYSTEM_PARTITION_SYSTEM_PARAMETER_ADDR, 0x3000}, { SYSTEM_PARTITION_CUSTOMER_PRIV_PARAM, SYSTEM_PARTITION_CUSTOMER_PRIV_PARAM_ADDR, 0x1000}, }; 和添加 void ICACHE_FLASH_ATTR user_pre_init(void) { if(!system_partition_table_regist(at_partition_table, sizeof(at_partition_table)/sizeof(at_partition_table[0]),SPI_FLASH_SIZE_MAP)) { os_printf("system_partition_table_regist fail\r\n"); while(1); } }
` 然后makefile中修改 BOOT?=new APP?=2 SPI_SPEED?=40 SPI_MODE?=QIO SPI_SIZE_MAP?=2 支持FOTA 。 烧录进ESP-12S后,发生错误,不断重启,后来一句一句验证,错误语句是 system_param_load(ESP_PARAM_START_SEC, 0, &save_flash_data, sizeof(save_flash_data));, 其中 struct esp_platform_saved_param {
uint8 devkey[40]; uint8 token[40]; uint8 activeflag; uint8 pad[3]; uint8 socket_switch_flag; //开关状态存储 uint8 calibration_flag; //电压电流校准标志,为0没有校准,为1则校准过 uint8 calibration_voltage_pulse[2] ;//电压脉冲值 uint8 calibration_current_pulse[2] ;//电流脉冲值 uint8 electricity_value[4] ; //电量值 uint8 time_switch_num; //定时个数 uint8 time_switch[81]; //存放定时数据6个 uint8 calibration_voltage[2] ; //APP获取到的电压值 校准用 uint8 calibration_current[2] ; //APP获取到的电流值 uint8 server_dns[32]; //域名保存 uint8 updata_flag; //升级标志 uint8 time_zone[32]; //时区保存 uint8 updata[3]; //预留 uint8 ssid[32]; //SSID uint8 password[64]; //密码 uint8_t iPhone_ip[4];
};是348字节, #define ESP_PARAM_START_SEC 0x7D 烧录配置选的8Mnit。 无线重启 报错: Fatal exception 9(LoadStoreAlignmentCause):
epc1=0x4000438f, epc2=0x00000000, epc3=0x00000000, excvaddr=0x3f 新手求助``
The text was updated successfully, but these errors were encountered:
No branches or pull requests
首先在main.c中增加了
`
#if ((SPI_FLASH_SIZE_MAP == 0) || (SPI_FLASH_SIZE_MAP == 1))
#error "The flash map is not supported"
#elif (SPI_FLASH_SIZE_MAP == 2)
#define SYSTEM_PARTITION_OTA_SIZE 0x6A000
#define SYSTEM_PARTITION_OTA_2_ADDR 0x81000
#define SYSTEM_PARTITION_RF_CAL_ADDR 0xfb000
#define SYSTEM_PARTITION_PHY_DATA_ADDR 0xfc000
#define SYSTEM_PARTITION_SYSTEM_PARAMETER_ADDR 0xfd000
#define SYSTEM_PARTITION_CUSTOMER_PRIV_PARAM_ADDR 0x7c000
#elif (SPI_FLASH_SIZE_MAP == 3)
#define SYSTEM_PARTITION_OTA_SIZE 0x6A000
#define SYSTEM_PARTITION_OTA_2_ADDR 0x81000
#define SYSTEM_PARTITION_RF_CAL_ADDR 0x1fb000
#define SYSTEM_PARTITION_PHY_DATA_ADDR 0x1fc000
#define SYSTEM_PARTITION_SYSTEM_PARAMETER_ADDR 0x1fd000
#define SYSTEM_PARTITION_CUSTOMER_PRIV_PARAM_ADDR 0x7c000
#elif (SPI_FLASH_SIZE_MAP == 4)
#define SYSTEM_PARTITION_OTA_SIZE 0x6A000
#define SYSTEM_PARTITION_OTA_2_ADDR 0x81000
#define SYSTEM_PARTITION_RF_CAL_ADDR 0x3fb000
#define SYSTEM_PARTITION_PHY_DATA_ADDR 0x3fc000
#define SYSTEM_PARTITION_SYSTEM_PARAMETER_ADDR 0x3fd000
#define SYSTEM_PARTITION_CUSTOMER_PRIV_PARAM_ADDR 0x7c000
#elif (SPI_FLASH_SIZE_MAP == 5)
#define SYSTEM_PARTITION_OTA_SIZE 0x6A000
#define SYSTEM_PARTITION_OTA_2_ADDR 0x101000
#define SYSTEM_PARTITION_RF_CAL_ADDR 0x1fb000
#define SYSTEM_PARTITION_PHY_DATA_ADDR 0x1fc000
#define SYSTEM_PARTITION_SYSTEM_PARAMETER_ADDR 0x1fd000
#define SYSTEM_PARTITION_CUSTOMER_PRIV_PARAM_ADDR 0xfc000
#elif (SPI_FLASH_SIZE_MAP == 6)
#define SYSTEM_PARTITION_OTA_SIZE 0x6A000
#define SYSTEM_PARTITION_OTA_2_ADDR 0x101000
#define SYSTEM_PARTITION_RF_CAL_ADDR 0x3fb000
#define SYSTEM_PARTITION_PHY_DATA_ADDR 0x3fc000
#define SYSTEM_PARTITION_SYSTEM_PARAMETER_ADDR 0x3fd000
#define SYSTEM_PARTITION_CUSTOMER_PRIV_PARAM_ADDR 0xfc000
#else
#error "The flash map is not supported"
#endif
#define SYSTEM_PARTITION_CUSTOMER_PRIV_PARAM SYSTEM_PARTITION_CUSTOMER_BEGIN
uint32 priv_param_start_sec;
static const partition_item_t at_partition_table[] = {
{ SYSTEM_PARTITION_BOOTLOADER, 0x0, 0x1000},
{ SYSTEM_PARTITION_OTA_1, 0x1000, SYSTEM_PARTITION_OTA_SIZE},
{ SYSTEM_PARTITION_OTA_2, SYSTEM_PARTITION_OTA_2_ADDR, SYSTEM_PARTITION_OTA_SIZE},
{ SYSTEM_PARTITION_RF_CAL, SYSTEM_PARTITION_RF_CAL_ADDR, 0x1000},
{ SYSTEM_PARTITION_PHY_DATA, SYSTEM_PARTITION_PHY_DATA_ADDR, 0x1000},
{ SYSTEM_PARTITION_SYSTEM_PARAMETER, SYSTEM_PARTITION_SYSTEM_PARAMETER_ADDR, 0x3000},
{ SYSTEM_PARTITION_CUSTOMER_PRIV_PARAM, SYSTEM_PARTITION_CUSTOMER_PRIV_PARAM_ADDR, 0x1000},
};
和添加
void ICACHE_FLASH_ATTR user_pre_init(void)
{
if(!system_partition_table_regist(at_partition_table, sizeof(at_partition_table)/sizeof(at_partition_table[0]),SPI_FLASH_SIZE_MAP)) {
os_printf("system_partition_table_regist fail\r\n");
while(1);
}
}
`
然后makefile中修改
BOOT?=new
APP?=2
SPI_SPEED?=40
SPI_MODE?=QIO
SPI_SIZE_MAP?=2
支持FOTA 。
烧录进ESP-12S后,发生错误,不断重启,后来一句一句验证,错误语句是
system_param_load(ESP_PARAM_START_SEC, 0, &save_flash_data,
sizeof(save_flash_data));,
其中
struct esp_platform_saved_param {
};是348字节,
#define ESP_PARAM_START_SEC 0x7D
烧录配置选的8Mnit。
无线重启 报错:
Fatal exception 9(LoadStoreAlignmentCause):
epc1=0x4000438f, epc2=0x00000000, epc3=0x00000000, excvaddr=0x3f
新手求助``
The text was updated successfully, but these errors were encountered: