(solved) sdkconfig.defaults not being (completely) read

User avatar
mzimmers
Posts: 643
Joined: Wed Mar 07, 2018 11:54 pm
Location: USA

(solved) sdkconfig.defaults not being (completely) read

Postby mzimmers » Tue Nov 16, 2021 4:59 pm

Hi all -

I'm trying to set up my project for use with an sdkconfig.defaults file. One of the settings (flash size) doesn't seem to be read. Here's the file:

Code: Select all

# the device used on this project has 8MB of flash.
CONFIG_ESPTOOLPY_FLASHSIZE="8MB"
#
# we use a custom partition table on this project.
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"
#
# the line below is necessary until Espressif fixes its expired certificat of 11/2021.
# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE is not set
And upon attempting to build, I get this error:

Code: Select all

FAILED: partition_table/partition-table.bin 
cmd.exe /C "cd /D C:\Users\mzimmers\fluidra\cp_fluidra\fw\build\esp-idf\partition_table && C:\Users\mzimmers\.espressif\python_env\idf4.3_py3.8_env\Scripts\python.exe C:/Users/mzimmers/esp-idf/components/partition_table/gen_esp32part.py -q --offset 0x8000 --flash-size 2MB C:/Users/mzimmers/fluidra/cp_fluidra/fw/partitions.csv C:/Users/mzimmers/fluidra/cp_fluidra/fw/build/partition_table/partition-table.bin && C:\Users\mzimmers\.espressif\tools\cmake\3.16.4\bin\cmake.exe -E echo "Partition table binary generated. Contents:" && C:\Users\mzimmers\.espressif\tools\cmake\3.16.4\bin\cmake.exe -E echo ******************************************************************************* && C:\Users\mzimmers\.espressif\python_env\idf4.3_py3.8_env\Scripts\python.exe C:/Users/mzimmers/esp-idf/components/partition_table/gen_esp32part.py -q --offset 0x8000 --flash-size 2MB C:/Users/mzimmers/fluidra/cp_fluidra/fw/build/partition_table/partition-table.bin && C:\Users\mzimmers\.espressif\tools\cmake\3.16.4\bin\cmake.exe -E echo *******************************************************************************"
Partitions defined in 'C:/Users/mzimmers/fluidra/cp_fluidra/fw/partitions.csv' occupy 4.0MB of flash (4194304 bytes) which does not fit in configured flash size 2MB. Change the flash size in menuconfig under the 'Serial Flasher Config' menu.
And, indeed, in my newly-generated sdkconfig file, this is the setting:

Code: Select all

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"
Can someone see what I'm doing wrong?

Thanks...
Last edited by mzimmers on Tue Nov 16, 2021 6:50 pm, edited 1 time in total.

chegewara
Posts: 2240
Joined: Wed Jun 14, 2017 9:00 pm

Re: sdkconfig.defaults not being (completely) read

Postby chegewara » Tue Nov 16, 2021 5:28 pm

Did you make clean build after preparing sdkconfig.defaults?

Code: Select all

idf.py fullclean && idf.py build

User avatar
mzimmers
Posts: 643
Joined: Wed Mar 07, 2018 11:54 pm
Location: USA

Re: sdkconfig.defaults not being (completely) read

Postby mzimmers » Tue Nov 16, 2021 5:32 pm

Hi Chegewara - yes I did.

chegewara
Posts: 2240
Joined: Wed Jun 14, 2017 9:00 pm

Re: sdkconfig.defaults not being (completely) read

Postby chegewara » Tue Nov 16, 2021 5:39 pm

Code: Select all

CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y

User avatar
mzimmers
Posts: 643
Joined: Wed Mar 07, 2018 11:54 pm
Location: USA

Re: sdkconfig.defaults not being (completely) read

Postby mzimmers » Tue Nov 16, 2021 5:48 pm

Still getting the same error. Tried using that line both with, and instead of, the original line.

chegewara
Posts: 2240
Joined: Wed Jun 14, 2017 9:00 pm

Re: sdkconfig.defaults not being (completely) read

Postby chegewara » Tue Nov 16, 2021 6:02 pm

This should be enough, just delete build folder and rebuild project (and maybe delete sdkconfig too).

https://github.com/espressif/esp-idf/bl ... g.defaults

User avatar
mzimmers
Posts: 643
Joined: Wed Mar 07, 2018 11:54 pm
Location: USA

Re: sdkconfig.defaults not being (completely) read

Postby mzimmers » Tue Nov 16, 2021 6:50 pm

Hi chegewara -

Yes, that did fix it. (It turns out I had two build directories at different levels in the project; once I deleted both of them, your fix worked.)

Thanks for the help.

Who is online

Users browsing this forum: vpascucci and 214 guests