espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.44k stars 7.25k forks source link

Multi-Target Build ? (IDFGH-12410) #13435

Closed diplfranzhoepfinger closed 2 months ago

diplfranzhoepfinger commented 6 months ago

Answers checklist.

General issue report

is there a way to build same Project for multi Target with a Script ?

like for a ESP32S3 N8R2 and N8R8

or like for a C6 and S3 ?

so that we have 2 Binaries automatically after script run ?

thanks,

igrr commented 6 months ago

You can build different configs in different directories, please check this example: https://github.com/espressif/esp-idf/tree/master/examples/build_system/cmake/multi_config

You still need to invoke idf.py (or CMake directly) twice, though. You can consider using the idf-build-apps tool to automate the process.

diplfranzhoepfinger commented 6 months ago

@igrr VERY god Support, thanks.

diplfranzhoepfinger commented 6 months ago

 idf-build-apps tool i do not see the Advantage ? 

a simple Shell script would do the same right ?

diplfranzhoepfinger commented 6 months ago

it does not work. sdkconfig.defaults.N8R2.txt sdkconfig.defaults.N8R8.txt

i do following:

idf.py -B build_N8R2 -D SDKCONFIG_DEFAULTS="sdkconfig.defaults.N8R2" build
idf.py -B build_N8R8 -D SDKCONFIG_DEFAULTS="sdkconfig.defaults.N8R8" build

but it builds 2 times the N8R2 Version. not 1 time the N8R8 and 1 time the N8R2

image

igrr commented 6 months ago

Have you also specified the sdkconfig file? You need to either do the same thing as the example does: https://github.com/espressif/esp-idf/blob/be06a6f5ffe36f9554cfc91fe2036e0fc85fea60/examples/build_system/cmake/multi_config/CMakeLists.txt#L3-L6

or pass -DSDKCONFIG=build_N8R2/sdkconfig (for the first build) and -DSDKCONFIG=build_N8R8/sdkconfig (for the 2nd) on the command line.

Otherwise both builds will use the same sdkconfig file.

diplfranzhoepfinger commented 6 months ago

aaaaaaaaaaaaaah

yes. this is the Problem.

Indastri commented 5 months ago

@diplfranzhoepfinger were you able to resolve the issue? If so please feel free to close this issue.

Cheers!

diplfranzhoepfinger commented 5 months ago

YES ! works good

diplfranzhoepfinger commented 4 months ago

i have another Topic:

diplfranzhoepfinger commented 4 months ago

If i do this:

idf.py set-target esp32s3
idf.py build
idf.py set-target esp32
idf.py -B build_ESP32 build
idf.py set-target esp32s3
idf.py -B build_ESP32S3 build

i get the following output

https://gist.github.com/diplfranzhoepfinger/70ba2c8a08899abb7af38a443860bbf0

it seems it takes alwas the "old" sdkconfig, so for ESPS3 it takes the ESP32 and vice versa.

@igrr @Indastri does it need some kind of Cleanup ?

diplfranzhoepfinger commented 4 months ago

i understood it:

idf.py set-target esp32s3
idf.py build
idf.py -B build_ESP32  set-target esp32
idf.py -B build_ESP32 build
idf.py -B build_ESP32S3  set-target esp32s3
idf.py -B build_ESP32S3 build
diplfranzhoepfinger commented 3 months ago

Question:

what about the dependencies.lock File ?

can it also be placed into the Folders ?

diplfranzhoepfinger commented 3 months ago

and: what about Eclipse ? it seems the Eclipse SDK Config editor is no more working in this Scenario.

igrr commented 3 months ago

You can specify the location of dependencies.lock: https://github.com/espressif/esp-idf/commit/17224f325450a001c4744064470cb6813b1c8514.

Regarding the sdkconfig editor not working, could you please open an issue in https://github.com/espressif/idf-eclipse-plugin/issues and provide more details?

Alvin1Zhang commented 2 months ago

Thanks for reporting, feel free to reopen or create a new ticket.

diplfranzhoepfinger commented 2 months ago

Thanks for reporting, feel free to reopen or create a new ticket.

@Alvin1Zhang @igrr

all very stable now. just the sdkconfig Editor in Ecplise Problem https://github.com/espressif/idf-eclipse-plugin/issues/981

all in this Ticket solved very well.