A detailed description of the functions in the platformio

In CubeIDE,I see a very detailed description of the functions and it’s useful for me. Is it possible to somehow include this in the platformio?

The parsing and displaying of the autocomplete is done by the Microsoft C/C++ extension (IntelliSense), PlatformIO has no control over that.

But as I see this should already work? Visual Studio Code C++ Extension July 2020 Update: Doxygen comments and Logpoints - C++ Team Blog shows that it’s working. These are Doxygen comments after all.

1 Like

It does work, and it looks like the parser is a bit smarter than CubeIDE…


… was shown as …


It pulled just the brief description, and the parameters text.

If I add documentation for some parameters…

… it then shows that up quite nicely!


I’ll have to look at this further… very nice indeed!

Yes, indeed, if you fill in the description correctly, then IntelliSense “pulls out” everything and this is very convenient. Perhaps I have expressed my idea incorrectly. Is it possible to add help information to the tooltips, which generates IntelliSense. When I open examples, I have to either read the description (if any) or search for something on the Internet, especially for HAL functions.
So maybe there is some kind of reference that can be installed / enabled so that when you hover over a function, a description of the function opens?

Aah I now get the actual problem.

You are right that you don’t get to see much when you start writing code with your example function

Just the function name and parameters. But, that’s a problem of the STM32Cube header file. It has no Doxygen comments on it!

…because the actual Doxygen comments are in the .c implementation…

…this is extremely unusual. One shouldn’t have one function and put two different sets of comments on it, in the header and the implementation…

The c_cpp_properties.json only adds the Inc/ path to the search path for functions, but not the Src/ path where those .c files live. If I do that manually by adding


in the includePath array, I get the better result

In order to fix that automatically one would have to adapt the include paths in the stm32cube.py build script. ~~Please file an issue in https://github.com/platformio/platform-ststm32/issues.~~ I have filed an issue at Enable better IntelliSense in STM32Cube framework by adding Src path to search path · Issue #449 · platformio/platform-ststm32 · GitHub.

1 Like

Thank you for your comprehensive answer.