Hello, I am currently developing code for one of NXP micro controllers that runs FreeRTOS. My primary tool is MCUXpresso IDE, but whenever I have the need to investigate deeper FreeRTOS code I find it a little less convenient, even after building my uc image with the mcu ide. I would like to ask here if someone has a similar setup or even an advice.
Yes, It is the sort of the basics - there are defines that aren’t expanded, and also there is no marking of which d section of ifdef takes place. Another example is that some of the redirection command are not working properly (by redirection command i mean to the commands that allow jumping to the definition or declaration of a token)
There are also heuristic settings in the indexer, accessible through the options menu, that can cause those symptoms. Additionally, generally the indexer won’t work if you use a makefile buid in Eclipse rather than a managed build.
Hi, I’m a heavy user of MCUXpresso IDE and LPC microcontrollers. MCUXpresso runs on top of Eclipse (plus CDT), so you can investigate how to squeez this platform.
However, when it’s time to seriously hack the source code then I use these tools as well (old school, although I’m not that old):
gVIm. My primary source code editor (I don’t code inside MCUXpresso).
Exhuberant ctags and cscope.
Codequery (cscope with steroids. Not sure if it exists out of the Linux world).
Doxygen (it creates beautiful diagrams for several relationships from the source code).
When it’s time of hardware debugging through JTAG, then I use the Ozone IDE (from Segger. You need a jlink hardware debugger). However, MCUXpresso IDE is good enough for when using other jtag debuggers.
The problems that I described (Or maybe its better to say- the not optimal coding I experience) is after I build the index. And in vs code the situation is not better, while in addition I need to use clangd server, and build with bear to have all of that.
I indeed use makefile, but its minor and used for some includes from another repository (which its code is specifically not related to this free-rtos discussion). Still think that may be the issue?
I still need some time to examine cscope and ctag, as i have never used them before. How is that they help you more than the regular IDE?
And about Codequery, Doxygen: sounds very interesting. I still need to read and experience these myself. I will write here after doing so.
as before, thanks for the comments. Im still searching for how to improve the coding experience
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.
The information is gathered from this cscope tutorial and this ctags tutorial
After the installation of those components, in the source directory of the project I do
ctags -R *
cscope -R -b
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
I also :set cscopetag inside vim to make the cscope use the ctags indexes
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
Ctrl-] to jump to a tag
Ctrl-t to take a backward step
:ts for searching a tag. (i.e. yank a tag with yw and then :ts Ctrl+R+" to see it’s refrences
I use MCUXpresso constantly. While not my favorite environment, I haven’t had issues with defines - if you set up the indexer options.
In the Settings, there is page (I’m not at my work computer at the moment) that allows you to select which build configuration is used for the indexer. I like to make sure it is set to the active build configuration - that ensures your code reflects what is built.