E (544) esp_image: Image length 1048896 doesn't fit in partition length 1048576
E (544) boot: Factory app partition is not bootable
E (547) boot: No bootable app partitions in the partition table
Here is the whole log
What is the problem?rst:0x3 (SW_RESET),boot:0x1b (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:6804
load:0x40078000,len:13724
load:0x40080400,len:4260
entry 0x400806e4
I (107) boot: Chip Revision: 1
I (127) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (78) boot: ESP-IDF v4.0-dirty 2nd stage bootloader
I (78) boot: compile time 09:31:11
I (87) boot: Enabling RNG early entropy source...
I (87) boot: SPI Speed : 40MHz
I (88) boot: SPI Mode : DIO
I (92) boot: SPI Flash Size : 2MB
I (96) boot: Partition Table:
I (99) boot: ## Label Usage Type ST Offset Length
I (107) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (114) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (122) boot: 2 factory factory app 00 00 00010000 00100000
I (129) boot: End of partition table
I (134) boot_comm: chip revision: 1, min. application chip revision: 0
I (141) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x28420 (164896) map
I (209) esp_image: segment 1: paddr=0x00038448 vaddr=0x3ffbdb60 size=0x0377c ( 14204) load
I (215) esp_image: segment 2: paddr=0x0003bbcc vaddr=0x40080000 size=0x00400 ( 1024) load
I (216) esp_image: segment 3: paddr=0x0003bfd4 vaddr=0x40080400 size=0x0403c ( 16444) load
I (232) esp_image: segment 4: paddr=0x00040018 vaddr=0x400d0018 size=0xb8a1c (756252) map
I (504) esp_image: segment 5: paddr=0x000f8a3c vaddr=0x4008443c size=0x176d4 ( 95956) load
E (544) esp_image: Image length 1048896 doesn't fit in partition length 1048576
E (544) boot: Factory app partition is not bootable
E (547) boot: No bootable app partitions in the partition table
Seems like it doesn't fit but the program is small.
Code: Select all
void app_main()
{
int i;
uint8_t tog = 0;
// Initialize NVS partition
esp_err_t ret = nvs_flash_init();
if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND)
{
// NVS partition was truncated and needs to be erased
ret = nvs_flash_erase();
// Retry nvs_flash_init
ret |= nvs_flash_init();
}
if (ret != ESP_OK)
{
printf("Failed to init NVS");
return;
}
ESP_ERROR_CHECK(esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT));
esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT();
esp_bt_controller_init(&bt_cfg);
esp_bt_controller_enable(ESP_BT_MODE_BLE);
ble_ibeacon_init();
/* set scan parameters */
#if (IBEACON_MODE == IBEACON_RECEIVER)
esp_ble_gap_set_scan_params(&ble_scan_params);
#elif (IBEACON_MODE == IBEACON_SENDER)
esp_ble_ibeacon_t ibeacon_adv_data;
esp_err_t status = esp_ble_config_ibeacon_data (&vendor_config, &ibeacon_adv_data);
if (status == ESP_OK){
esp_ble_gap_config_adv_data_raw((uint8_t*)&ibeacon_adv_data, sizeof(ibeacon_adv_data));
}
else {
ESP_LOGE(DEMO_TAG, "Config iBeacon data failed: %s\n", esp_err_to_name(status));
}
#endif
GPIO_Init();
TIMER_Init(TIMER_0, 0, 0, 5); //5 sec
WIFI_Init();
while (1)
{
if (ble_data_update)
{
ble_data_update = 0;
for (i = 0; i < ble_beacon_size; i++)
{
printf("%x ", ble_beacon_data[i]);
}
printf("\n");
for (i = 0; i < 6; i++)
{
tog ^= 1;
gpio_set_level(GPIO_LED, tog);
ets_delay_us(100000);
}
}
}
}