RTEMS WAF compile_commands.json generation for BSP, user app and kernel

Hello everyone, I’ve been struggling for a few last days to generate a compile_commands.json file using WAF. I’m working on Windows. Are there any examples or solutions to enable basic code navigation? I also have the option to use the Microsoft C/C++ extension, but it requires precisely configuring include paths and defines.

Thanks in advance.

I tried adding waf’s clang_compilation_database.py as documented in the top of it but I got an error I did not understand:

No function 'clangdb_i386/pc686' defined in /opt/work/chris/rtems/kernel/rtems.git/wscript

I suggest as the next step asking Thomas the waf maintainer what the error is and how to handle it?

1 Like

Yes, thank you, this will be a very useful option. I also have a question for you, as I understand you are one of the RTEMS developers. I’m curious about which IDE your team uses and whether you use IntelliSense. How can one set up an environment with minimal hassle to enable code navigation and autocompletion?

I can only speak for myself about a workflow. I use the same workflow and tools on FreeBSD, Linux, MacOS and even Windows. It is:

  1. SSH
  2. tmux
  3. Emacs

My use of Emacs goes back to the early 1990s and it is not the important. There are a lot of great editors around. The important bit is only text terminals. I use to use X windowing and a GUI desktop and then I started to work part time for a while in the early 2000s. I wanted to be able to walk out of an office and pick up remotely. I could connect to my desktop machine but I could not get to my editor and get it to save files. Things like RDP did not exist. In the end I decided to give away the GUI and desktop and only use text terminals. It is a small amount of time to change but I not go back.

I use a MacBook as a terminal and I work only with ssh and tmux sessions. I can on the other side of world or a plane and performance is great and usable. The MacBook handles the web, email and chats.