Skip to content
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

CMake build architecture documentation #9947

Open
tejlmand opened this issue Sep 12, 2018 · 9 comments
Open

CMake build architecture documentation #9947

tejlmand opened this issue Sep 12, 2018 · 9 comments
Assignees
Labels
area: Documentation Enhancement Changes/Updates/Additions to existing features

Comments

@tejlmand
Copy link
Collaborator

tejlmand commented Sep 12, 2018

Currently the CMake documentation
https://docs.zephyrproject.org/latest/application/application.html#cmake-details
targets users starting out with the creation of the own applications.

The CMake architecture, especially on how source is organized into libraries should be documented so it is clear and structured to zephyr contributors.

Areas of importance:

  • Kernel
  • arch
  • drivers
  • subsystems
    • Bluetooth
    • Network
    • etc.
  • Others

Also, important internals of the build system should be made with all important CMake variables, like:

  • ZEPHYR_<MODULE_NAME> related variables
  • ROOT variables
  • BOARD variable
  • BOARD_REVISION variable
@tejlmand tejlmand added the Enhancement Changes/Updates/Additions to existing features label Sep 12, 2018
@SebastianBoe SebastianBoe self-assigned this Sep 13, 2018
@marc-hb
Copy link
Collaborator

marc-hb commented Feb 12, 2019

This is what the above commit produces:
sphinx-moderncmakedomain-demo

@marc-hb
Copy link
Collaborator

marc-hb commented Feb 12, 2019

@SebastianBoe , @tejlmand, @mped-oticon, @carlescufi is this issue #9947 the right place to discuss this sphinx-moderncmakedomain prototype and proposal? I have a number of questions (see latest commit) and I'd like to get the discussion started but not in the wrong place. Thx!
https://lists.zephyrproject.org/g/devel/topic/29744819

@SebastianBoe
Copy link
Collaborator

Hi, very sorry for the late reply.

A dedicated PR with an RFC or DNM tag seems to me to be the best place to discuss the prototype.

marc-hb added a commit to marc-hb/zephyr that referenced this issue Mar 11, 2019
Quick and dirty proof of concept to (hopefully) get some feedback.

Related to issue zephyrproject-rtos#9947

Includes a test hack to disable doxygen and reduce the build time to
less than 10 seconds.  To test on Linux:

   SPHINXOPTS=-v make htmldocs-fast

Output in:

   doc/_build/html/zephyr-cmake.html

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
@SebastianBoe
Copy link
Collaborator

SebastianBoe commented Dec 10, 2019

I believe this is resolved by #20324 , if not I'd like to know more about what needs to be documented.

@marc-hb
Copy link
Collaborator

marc-hb commented Dec 10, 2019

FWIW PoC/draft #13805 demoed how sphinx can be used to extract documentation straight from the CMake code. #20324 seems much higher level (and more important!).

@tejlmand
Copy link
Collaborator Author

Re-opened, as #20324 only describes the high level architecture (which is also important).

But it does not describe zephyr_library_* functions and other extension commands.
And when to use zephyr_sources() or zephyr_library() + zephyr_library_sources, and so on.

What we need is something similar to the proposal in #13805

The problem today, is that people must read: https://github.com/zephyrproject-rtos/zephyr/blob/master/cmake/extensions.cmake
in order to understand Zephyr CMake extension, which is not easy for new comers.

Also, having them documented only in a cmake file, means they will not show up when people search.
Compared to raw CMake, where a lot of good online documentation is available, as well as Q/A regarding CMake on stack overflow.
(Solving #8439 could remove or minimize the need for maintaining Zephyr CMake documentation)

@marc-hb should we reopen 13805 and continue work ?

@marc-hb
Copy link
Collaborator

marc-hb commented May 19, 2020

@marc-hb should we reopen 13805 and continue work ?

@tejlmand why not, however I won't be able to personally resume work on this in the short or medium term.

@nordicjm nordicjm added this to To do in Build system Jan 11, 2023
@zephyrbot
Copy link
Collaborator

Hi @tejlmand,

This issue, marked as an Enhancement, was opened a while ago and did not get any traction. Please confirm the issue is correctly assigned and re-assign it otherwise.

Please take a moment to review if the issue is still relevant to the project. If it is, please provide feedback and direction on how to move forward. If it is not, has already been addressed, is a duplicate, or is no longer relevant, please close it with a short comment explaining the reason.

Thanks!

@marc-hb
Copy link
Collaborator

marc-hb commented Feb 12, 2024

This is still valid and valuable IMHO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Documentation Enhancement Changes/Updates/Additions to existing features
Projects
Status: To do
Development

No branches or pull requests

5 participants