how to structure a project to build multiple binaries?
how to structure a project to build multiple binaries?
I would like to build a number of small utilities and test programs along with the main application in my project. Can anyone point me at an example or "best practice" of how to use the build system to do this? (Preferably using GNU make rather than CMake.)
Re: how to structure a project to build multiple binaries?
Are the utilities and test programs firmware which runs on the ESP32?
If so, then suggest having multiple project directories which share a common "components" directory (the EXTRA_COMPONENT_DIRS variable can be used for this).
It doesn't seem to be mentioned in the docs, but you can also have the Makefiles for the smaller tools set the SDKCONFIG variable to the path of the main project sdkconfig (near the top of the makefile), in order to share one config.
If they're to run on the host, I'm afraid you'll have to make separate standalone makefiles for them.
If so, then suggest having multiple project directories which share a common "components" directory (the EXTRA_COMPONENT_DIRS variable can be used for this).
It doesn't seem to be mentioned in the docs, but you can also have the Makefiles for the smaller tools set the SDKCONFIG variable to the path of the main project sdkconfig (near the top of the makefile), in order to share one config.
If they're to run on the host, I'm afraid you'll have to make separate standalone makefiles for them.
Re: how to structure a project to build multiple binaries?
The tests and utilities are also ESP32 applications. The issue is how to organize them in a github repo -- they only make sense along with the "main" application, so should somehow be in the same repo. I was thinking the top-level of the repo should be the top level of the project, but I guess I'll follow your suggestion and just have multiple ESP-IDF projects in one repo.
Re: how to structure a project to build multiple binaries?
With regards to nested test app layout, you may also check https://github.com/espressif/esp-idf/tr ... /unit_test
Who is online
Users browsing this forum: No registered users and 80 guests