I guess this might actually be a kind of a niche topic but still. I just wanted to show people that are using vim as an editor while doing projects with ChibiOs (Like I am) that there is a way to get the supernice autocompletion in vim and the ChibiOs project, from what I have seen it also finds the correct files for even specific structures for specific processors.
So what I am using is NeoVim under manjaro linux, To complement me with some autocompletion and also some edit-time warnings and errors I am using the absolutely amazing project https://github.com/Valloric/YouCompleteMe. This project takes care of all the autocompletion. The problem is that this needs to know what compiler flags you are setting and such to be usable. To fix this I am using the https://github.com/rdnetto/YCM-Generator project, but a bit patched to actually read the output from stdout and parse those flags and generate the file that YouCompleteMe needs.
link to patched generator: https://github.com/TotalKrill/YCM-Generator/tree/stdout
Now with this I can use the following bash command, also i am doing verbose builds:
Code: Select all
~/.config/nvim/bundle/YCM-Generator/config_gen.py -s -B arm-none-eabi-gcc -f .
(This will make clean and then run make)
This then gives me autocompletion for internal ChibiOs stuff, a quick test in the testhal/STM32F37x/ADC/ folder looks like this:
I am using the following nvim setup if anyone is interested, there is also very basic installation tips there ( the correct version of the YCM-Generator has to be downloaded separatly for now, pull is request pending)
https://github.com/TotalKrill/.nvim