Selecting "partition.csv" filename in sdkconfig depending on sdkconfig config option

eriksl
Posts: 111
Joined: Thu Dec 14, 2023 3:23 pm
Location: Netherlands

Selecting "partition.csv" filename in sdkconfig depending on sdkconfig config option

Postby eriksl » Fri Sep 06, 2024 6:58 pm

Hi this may sound a bit complex, but it's not really, I think.

At this moment I am doing work on supporting multiple boards with one set of source files. Before I did this with multiple project directories that symlinked to selected source files and therefore each board would have it's own sdkconfig. This had some drawbacks.

Now I have only one project directory, with the source files residing under "main" as usual and additionally a file Kconfig.projbuild there that has kconfig statements to enable the user to select one board type. When a board is selected, some config options are automatically set, e.g. the amount of flash and spiram, which are required to be known during compile time.

This works. No problem there.

Now what I am bumping into: various boards have various flash chip sizes e.g. need different partition tables. I'd thought I solve this by setting the existing Kconfig symbol PARTITION_TABLE_CUSTOM_FILENAME in my own piece of additional Kconfig statements in Kconfig.projbuild. But it doesn't work. At least I can't get it to work. PARTITION_TABLE_CUSTOM_FILENAME already has a "default" value set by ESP-IDF and I cannot overwrite it in my own kconfig file. I've tried various methods and either I get errors from Kconfig or the value I set is ignored.

Anyone a thought on how to solve this? How do you tackle this if you have multiple boards (with different flash sizes) you want to support?

Thanks!

Who is online

Users browsing this forum: No registered users and 97 guests