Good environment for developing with FreeRTOS

It took me some time, but I started to obtain some experience with cscope and ctags.
I will try to keep this post updated from time to time, since I think it might help me (and maybe others) to have more efficient code navigating.

Currently I want to share my basic setup.

  1. The information is gathered from this cscope tutorial and this ctags tutorial

  2. After the installation of those components, in the source directory of the project I do

ctags -R *
cscope -R -b
  1. Now, I act according to this post and set the correspond environment variable:
export CSCOPE_DB=/foo/cscope.out

and I also add a reference to it in vimrc cs add $CSCOPE_DB

  1. I also :set cscopetag inside vim to make the cscope use the ctags indexes

  2. Finally, I locate myself in the source folder (This is important since all tags are relative to this folder) and I navigate from there. (i.e after cd the source folder I just vim and keep on from there)

This should be enough to make the indexes work. Some basic keys are

  1. Ctrl-] to jump to a tag
  2. Ctrl-t to take a backward step
  3. :ts for searching a tag. (i.e. yank a tag with yw and then :ts Ctrl+R+" to see it’s refrences
1 Like