Partition table error?

Mike K
Posts: 1
Joined: Sun Feb 12, 2017 3:51 am

Partition table error?

Postby Mike K » Sun Feb 12, 2017 4:20 am

Hello,

I'm following the ESP-IDF Getting Started Guide, and the hello_world app is compiling fine, and the Flash Download Tool works as described in that guide, but the output shows a partition table error:
flash_parts: partition 2 invalid - offset 0x10000 size 0x100000 exceeds flash chip size 0x100000
boot: Failed to verify partition table
boot: load partition table error!
user code done
Partition Table Error.png
Partition Table Error.png (31.41 KiB) Viewed 21618 times
I'm using the locations specified in the guide. This is for the ESP32_Core_board_V2.

Any ideas on how to fix?

Thanks,
Mike K

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Partition table error?

Postby WiFive » Sun Feb 12, 2017 9:22 am

Getting started guide may be out of date

http://esp-idf.readthedocs.io/en/latest ... oject.html

davdav
Posts: 208
Joined: Thu Nov 17, 2016 2:33 pm

Re: Partition table error?

Postby davdav » Mon Feb 13, 2017 4:32 pm

I have the same issue and I followed the guide reported by wifive but I got the

Code: Select all

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0008,len:8
load:0x3fff0010,len:2388
load:0x40078000,len:6788
load:0x40080000,len:252
entry 0x40080034
[0;31mE (44) flash_parts: partition 2 invalid - offset 0x10000 size 0x100000 exceeds flash chip size 0x100000[0m
[0;31mE (44) boot: Failed to verify partition table[0m
[0;31mE (61) boot: load partition table error![0m
user code done
Is there any known issue with ESP32-core_board_v2 and latest ESP-IDF release?

I was able to program and it worked fine with former release ( I don't remember the version number but was the end of november 2016).

Thanks

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: Partition table error?

Postby kolban » Mon Feb 13, 2017 4:48 pm

Can we check that the version of esptool.py being used is the one supplied as part of the ESP-IDF? It has been my experience that when I have seen strange flashing problems, sometimes it is cause by using an incompatible "esptool.py". For example, a different one earlier in the PATH or one that was installed via "pip".

If the problem persists, take the steps to create a PDF document that contains ALL the steps followed plus their outputs so that we might be able to take a look-see and see if anything springs out.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Partition table error?

Postby WiFive » Mon Feb 13, 2017 5:10 pm

@davdav Looks like bootloader is out of date. For both seems flash chip size not configured/detected properly.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Partition table error?

Postby ESP_Angus » Tue Feb 14, 2017 3:23 am

What flash size did you have set in the flash download tool? The bootloader is reporting the flash size was configured as 1MB total. The default partition table layout has a 1MB main app partition at offset 0x10000, so this can't fit in 1MB total of flash.

Most ESP32 modules (including the modules on the Core Board) have 4MB of onboard flash, so changing the configured flash size in the flashing tool and re-flashing (at least the bootloader) should solve this problem.

davdav
Posts: 208
Joined: Thu Nov 17, 2016 2:33 pm

Re: Partition table error?

Postby davdav » Tue Feb 14, 2017 12:01 pm

Hi everybody,
Let me describe what I have done.

I have compiled using Eclipse.

My sdkconfig file is the following

Code: Select all

#
# Automatically generated file; DO NOT EDIT.
# Espressif IoT Development Framework Configuration
#

#
# SDK tool configuration
#
CONFIG_TOOLPREFIX="xtensa-esp32-elf-"
CONFIG_PYTHON="python"

#
# Bootloader config
#
# CONFIG_LOG_BOOTLOADER_LEVEL_NONE is not set
# CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set
CONFIG_LOG_BOOTLOADER_LEVEL_WARN=y
# CONFIG_LOG_BOOTLOADER_LEVEL_INFO is not set
# CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG is not set
# CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE is not set
CONFIG_LOG_BOOTLOADER_LEVEL=2

#
# Security features
#
# CONFIG_SECURE_BOOT_ENABLED is not set
# CONFIG_FLASH_ENCRYPTION_ENABLED is not set

#
# Serial flasher config
#
CONFIG_ESPTOOLPY_PORT="COM6"
# CONFIG_ESPTOOLPY_BAUD_115200B is not set
CONFIG_ESPTOOLPY_BAUD_230400B=y
# CONFIG_ESPTOOLPY_BAUD_921600B is not set
# CONFIG_ESPTOOLPY_BAUD_2MB is not set
# CONFIG_ESPTOOLPY_BAUD_OTHER is not set
CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200
CONFIG_ESPTOOLPY_BAUD=230400
# CONFIG_ESPTOOLPY_COMPRESSED is not set
# CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set
# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set
CONFIG_ESPTOOLPY_FLASHMODE_DIO=y
# CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set
CONFIG_ESPTOOLPY_FLASHMODE="dio"
# CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set
CONFIG_ESPTOOLPY_FLASHFREQ_40M=y
# CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set
# CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set
CONFIG_ESPTOOLPY_FLASHFREQ="40m"
# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set
CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y
# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set
CONFIG_ESPTOOLPY_FLASHSIZE="2MB"
CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y
CONFIG_ESPTOOLPY_BEFORE_RESET=y
# CONFIG_ESPTOOLPY_BEFORE_NORESET is not set
# CONFIG_ESPTOOLPY_BEFORE_ESP32R0 is not set
CONFIG_ESPTOOLPY_BEFORE="default_reset"
CONFIG_ESPTOOLPY_AFTER_RESET=y
# CONFIG_ESPTOOLPY_AFTER_NORESET is not set
CONFIG_ESPTOOLPY_AFTER="hard_reset"
# CONFIG_MONITOR_BAUD_9600B is not set
# CONFIG_MONITOR_BAUD_57600B is not set
CONFIG_MONITOR_BAUD_115200B=y
# CONFIG_MONITOR_BAUD_230400B is not set
# CONFIG_MONITOR_BAUD_921600B is not set
# CONFIG_MONITOR_BAUD_2MB is not set
# CONFIG_MONITOR_BAUD_OTHER is not set
CONFIG_MONITOR_BAUD_OTHER_VAL=115200
CONFIG_MONITOR_BAUD=115200

#
# Partition Table
#
CONFIG_PARTITION_TABLE_SINGLE_APP=y
# CONFIG_PARTITION_TABLE_TWO_OTA is not set
# CONFIG_PARTITION_TABLE_CUSTOM is not set
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_CUSTOM_APP_BIN_OFFSET=0x10000
CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv"
CONFIG_APP_OFFSET=0x10000
CONFIG_PHY_DATA_OFFSET=0xf000
CONFIG_OPTIMIZATION_LEVEL_DEBUG=y
# CONFIG_OPTIMIZATION_LEVEL_RELEASE is not set

#
# Component config
#
CONFIG_BT_ENABLED=y
CONFIG_BTC_TASK_STACK_SIZE=3072
# CONFIG_BLUEDROID_MEM_DEBUG is not set
CONFIG_BT_RESERVE_DRAM=0x10000

#
# ESP32-specific
#
# CONFIG_ESP32_DEFAULT_CPU_FREQ_80 is not set
# CONFIG_ESP32_DEFAULT_CPU_FREQ_160 is not set
CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y
CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240
CONFIG_MEMMAP_SMP=y
# CONFIG_MEMMAP_TRACEMEM is not set
CONFIG_TRACEMEM_RESERVE_DRAM=0x0
# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set
# CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set
CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y
# CONFIG_ESP32_ENABLE_COREDUMP is not set
CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32
CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2048
CONFIG_MAIN_TASK_STACK_SIZE=4096
CONFIG_NEWLIB_STDOUT_ADDCR=y
# CONFIG_NEWLIB_NANO_FORMAT is not set
CONFIG_CONSOLE_UART_DEFAULT=y
# CONFIG_CONSOLE_UART_CUSTOM is not set
# CONFIG_CONSOLE_UART_NONE is not set
CONFIG_CONSOLE_UART_NUM=0
CONFIG_CONSOLE_UART_BAUDRATE=115200
# CONFIG_ULP_COPROC_ENABLED is not set
CONFIG_ULP_COPROC_RESERVE_MEM=0
# CONFIG_ESP32_PANIC_PRINT_HALT is not set
CONFIG_ESP32_PANIC_PRINT_REBOOT=y
# CONFIG_ESP32_PANIC_SILENT_REBOOT is not set
# CONFIG_ESP32_PANIC_GDBSTUB is not set
CONFIG_ESP32_DEBUG_OCDAWARE=y
CONFIG_INT_WDT=y
CONFIG_INT_WDT_TIMEOUT_MS=300
CONFIG_TASK_WDT=y
# CONFIG_TASK_WDT_PANIC is not set
CONFIG_TASK_WDT_TIMEOUT_S=5
CONFIG_TASK_WDT_CHECK_IDLE_TASK=y
# CONFIG_ESP32_TIME_SYSCALL_USE_RTC is not set
CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y
# CONFIG_ESP32_TIME_SYSCALL_USE_FRC1 is not set
# CONFIG_ESP32_TIME_SYSCALL_USE_NONE is not set
CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y
CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=0
CONFIG_WIFI_ENABLED=y
# CONFIG_SW_COEXIST_ENABLE is not set
CONFIG_ESP32_WIFI_RX_BUFFER_NUM=25
CONFIG_PHY_ENABLED=y

#
# PHY
#
CONFIG_ESP32_PHY_AUTO_INIT=y
# CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set
CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20
CONFIG_ESP32_PHY_MAX_TX_POWER=20
# CONFIG_ETHERNET is not set

#
# FreeRTOS
#
CONFIG_FREERTOS_UNICORE=y
CONFIG_FREERTOS_CORETIMER_0=y
# CONFIG_FREERTOS_CORETIMER_1 is not set
CONFIG_FREERTOS_HZ=1000
CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y
# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set
CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL=y
# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY is not set
CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=3
CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y
# CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set
# CONFIG_FREERTOS_ASSERT_DISABLE is not set
CONFIG_FREERTOS_BREAK_ON_SCHEDULER_START_JTAG=y
# CONFIG_ENABLE_MEMORY_DEBUG is not set
CONFIG_FREERTOS_ISR_STACKSIZE=1536
# CONFIG_FREERTOS_LEGACY_HOOKS is not set
# CONFIG_FREERTOS_DEBUG_INTERNALS is not set

#
# Log output
#
# CONFIG_LOG_DEFAULT_LEVEL_NONE is not set
# CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set
# CONFIG_LOG_DEFAULT_LEVEL_WARN is not set
CONFIG_LOG_DEFAULT_LEVEL_INFO=y
# CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set
# CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set
CONFIG_LOG_DEFAULT_LEVEL=3
CONFIG_LOG_COLORS=y

#
# LWIP
#
# CONFIG_L2_TO_L3_COPY is not set
CONFIG_LWIP_MAX_SOCKETS=4
CONFIG_LWIP_THREAD_LOCAL_STORAGE_INDEX=0
# CONFIG_LWIP_SO_REUSE is not set
# CONFIG_LWIP_SO_RCVBUF is not set
CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1
# CONFIG_LWIP_IP_FRAG is not set
# CONFIG_LWIP_IP_REASSEMBLY is not set
CONFIG_TCP_MAXRTX=12
CONFIG_TCP_SYNMAXRTX=6
# CONFIG_LWIP_DHCP_DOES_ARP_CHECK is not set

#
# mbedTLS
#
CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=16384
# CONFIG_MBEDTLS_DEBUG is not set
CONFIG_MBEDTLS_HARDWARE_AES=y
CONFIG_MBEDTLS_HARDWARE_MPI=y
CONFIG_MBEDTLS_MPI_USE_INTERRUPT=y
CONFIG_MBEDTLS_HARDWARE_SHA=y
CONFIG_MBEDTLS_HAVE_TIME=y
# CONFIG_MBEDTLS_HAVE_TIME_DATE is not set

#
# OpenSSL
#
# CONFIG_OPENSSL_DEBUG is not set
CONFIG_OPENSSL_ASSERT_DO_NOTHING=y
# CONFIG_OPENSSL_ASSERT_EXIT is not set

#
# SPI Flash driver
#
# CONFIG_SPI_FLASH_ENABLE_COUNTERS is not set


I use ESP32 download tool v3.4.4 and this is the screenshot of the program.
Immagine.jpg
Immagine.jpg (79.22 KiB) Viewed 21556 times
I changed the FLASH SIZE to 32Mbit and I use for partition_singleapp.bin the offset 0x4000 (with the other version I had to use 0x8000).

And it seems to work with the example which come from the esp-idf-template from github.

If I use my main.c file (compiled and working on former firmware release) I got this

Code: Select all

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0008,len:8
load:0x3fff0010,len:2388
load:0x40078000,len:6788
load:0x40080000,len:252
entry 0x40080034
[0;32mI (836) heap_alloc_caps: Initializing. RAM available for dynamic allocation:[0m
[0;32mI (836) heap_alloc_caps: At 3FFC7300 len 00018D00 (99 KiB): DRAM[0m
[0;32mI (845) heap_alloc_caps: At 3FFE8000 len 00018000 (96 KiB): D/IRAM[0m
[0;32mI (867) heap_alloc_caps: At 4009D6BC len 00002944 (10 KiB): IRAM[0m
[0;32mI (887) cpu_start: Pro cpu up.[0m
[0;32mI (899) cpu_start: Single core mode[0m
[0;32mI (911) cpu_start: Pro cpu start user code[0m
[0;32mI (1142) phy: phy_version: 258, Nov 29 2016, 15:51:07, 0, 0[0m
[0;32mI (1575) cpu_start: Starting scheduler on PRO CPU.[0m
Do you think it is ok?

Thanks

Ritu21
Posts: 123
Joined: Sat Aug 04, 2018 9:58 am

Re: Partition table error?

Postby Ritu21 » Thu Apr 18, 2019 10:04 am

Hi,

I am facing the similar issue.Getting below error after flashing the image in new board. My application is using OTA update. Also SPI flash size is changed to 16MB but it is taking 4MB.

load:0x40080400,len:6680
entry 0x40080760
I (60) boot: ESP-IDF v4.0-dev-217-g5b2247df2-dirty 2nd stage bootloader
I (60) boot: compile time 13:56:56
I (62) boot: Enabling RNG early entropy source...
I (67) boot: SPI Speed : 40MHz
I (71) boot: SPI Mode : DIO
I (75) boot: SPI Flash Size : 4MB
E (79) flash_parts: partition 5 invalid - offset 0x400000 size 0x200000 exceeds flash chip size 0x400000
E (90) boot: Failed to verify partition table
E (95) boot: load partition table error!

Please help me with the solution Asap.

Thanks
Ritu

rillhu
Posts: 10
Joined: Wed Apr 19, 2017 5:35 am

Re: Partition table error?

Postby rillhu » Mon Mar 30, 2020 1:00 pm

load:0x40080400,len:6680
entry 0x40080760
I (60) boot: ESP-IDF v4.0-dev-217-g5b2247df2-dirty 2nd stage bootloader
I (60) boot: compile time 13:56:56
I (62) boot: Enabling RNG early entropy source...
I (67) boot: SPI Speed : 40MHz
I (71) boot: SPI Mode : DIO
I (75) boot: SPI Flash Size : 4MB

I suggest you change the DIO -> QIO or reduce the 4MB -> 2MB and test again. I guess you might fix the issue by doing this.

Who is online

Users browsing this forum: No registered users and 327 guests