-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Add chip target to direct CMake example code snippet in build system docs (IDFGH-14339) #15129
base: master
Are you sure you want to change the base?
docs: Add chip target to direct CMake example code snippet in build system docs (IDFGH-14339) #15129
Conversation
👋 Hello Dazza0, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
Thanks @Dazza0 for the contribution. You are right that this could be explained. But the comment for that code snippet states that it is equivalent to running On the other hand, the sentence just before it states that "When idf.py does something, it prints each command that it runs for easy reference.". I see it as a guide how to find the right cmake commands to run if someone wants to bypass It is definitely worth considering but probably only after the related build system improvements we plan to do soon. |
Would this information be better placed in the Using ESP-IDF in Custom CMake Projects. I think it's likely the main use case for users needing to call CMake directly is if they are trying to integrate IDF into an existing CMake. For context, this is what I'm trying to achieve. I have an existing CMake project that needs to build on multiple MCU families (e.g., STM32, PIC32, ESP32).
Would it be possible to provide a short list of what targets are exposed to the underlying build system. Comparing the target list between |
I think it could have a separate section much earlier, e.g. between https://docs.espressif.com/projects/esp-idf/en/v5.3.2/esp32/api-guides/build-system.html#using-cmake-directly and https://docs.espressif.com/projects/esp-idf/en/v5.3.2/esp32/api-guides/build-system.html#flashing-with-ninja-or-make.
Ah, you are right. We used to have all idf.py targets available in cmake as well but we deviated from this when we added the debugging targets. This certainly needs to be addressed or, as you suggest, describe the limitation in the documentation. There is one issue with having a list there. I don't think anyone would remember to update it over time when we add/remove a new target. Thanks for the suggestions! |
Description
The Build System documentation provides and example code snippet on how to use CMake and Ninja directly, bypassing the
idf.py
frontend.However, the snippet does not demonstrate how to set the chip target using CMake (equivalent to
idf.py set-target
). This PR updates the example code snippets to set the chip target.Related
Testing
Checklist
Before submitting a Pull Request, please ensure the following: