At the moment I'm evaluating the Keil5 ide. In Coocox the compiler will gray out the unused preprocessor code, is very handy. Can't find this option in Keil uvision 5, how do you guys do that? How can you read (and understand) the code if you don't know what's used or not.
Example: my.st.com/.../gray.PNG
Usually I just have the compiler generate browse information, and look at the areas where I can vs can't set break-points, it's pretty apparent then if code doesn't make it into the executable due to preprocessor or dead-code elimination.
Use a better editor or static-analysis tool, not sure any vendor yet has built an editor that appeals to everyone, and there are hooks to let you use your own.
nor even one that completely pleases anyone for all purposes?
I generally use 2 or 3 editors as I find each one has particular features & weaknesses that make it better/worse for specific tasks.
In uVision, if you have some text selected and choose 'Print' - it will default to printing just the selection. This is very handy.
In Eclipse, it will print the entire file.
In CooCox, I can't even see a 'Print' option on any menu or toolbar - you just have to know the Ctrl+P shortcut...
Yes, very handy - when it works !
However, Eclipse in general (which, presumably, includes CooCox) does seem to have a way to get confused about it and mess it all up - and that, then, becomes a big pain!