Author Topic: KDS Highlighting issues  (Read 4470 times)

Offline hans

  • Newbie
  • *
  • Posts: 2
    • View Profile
KDS Highlighting issues
« on: March 19, 2015, 12:28:24 AM »
Hello, I was wondering if anyone has successfully got the highlighting of preprocessor blocks to work correctly in KDS.

I did have to disable eclipse's "Scalability" settings for it to work on larger files like kinetis.c

It is sort of working now, but there are still a few crucial symbols it refuses to recognize.

First are the predefined symbols (I see these in my configuration properties -> C/C++ General -> Paths and Symbols -> Symbol tab)
_GNU
_KDS
_KINETIS

These are sent to the compiler with option "-D_GNU" etc during a build, but eclipse editor seems to ignore them.  Not sure if there is a setting in KDS to make it code highlight these approprialtely?

The other big one I noticed is OPSYS_CONFIG, which is defined in kinetis.c
KDS thinks this is not defined when viewing TaskConfig.h or config.h which each have #ifdef blocks for it.

This means when I try to search C/C++ fies it basically ignores my entire TaskConfig.h, which is incredibly annoying.












 




Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3188
    • View Profile
    • uTasker
Re: KDS Highlighting issues
« Reply #1 on: March 19, 2015, 01:27:44 AM »
Hi Hans

I have passed on the question to the KDS experts.

However I think that the OPSYS_CONFIG case may be generally a probem (also VisualStudio doesn't recognise this are) due to the fact that it is only valid when viewed form within the C file defining it.

VS however doesn't ignore this code when searching in files so it may be possible to work aroud it by modifying the search settings in this case to not restrict such results.

Regards

Mark

Offline TomM

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: KDS Highlighting issues
« Reply #2 on: March 19, 2015, 02:01:56 PM »
Hello Hans,
While I don't use the KDS tool, I am using CW 10.5 which is also Eclipse based.  I had similar issues and after doing much searching of Eclipse CDT posts, I now have things working OK.  If my memory is correct, the key point was setting Projects/ Properties/ C/C++ General/ Code Analysis to "Use Project Settings".  Obviously you also need to define the appropriate Macros in the Preprocessor section so that the Code Analysis realizes what the base defines are.  However, as Mark mentioned OPSYS_CONFIG and TaskConfig.h will still display as not being compiled.  When I really want to see that file in the compiled context, I do a temporary local edit and add #define OPSYS_CONFIG.

Hope that helps!

Tom

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3188
    • View Profile
    • uTasker
Re: KDS Highlighting issues
« Reply #3 on: March 19, 2015, 02:45:40 PM »
Hans

I have been referred to this: http://mcuoneclipse.com/2012/03/20/fixing-the-eclipse-index/

Maybe it helps solve the problme(s).

Regards

Mark



Offline hans

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: KDS Highlighting issues
« Reply #4 on: March 19, 2015, 08:31:55 PM »
Thanks guys, good suggestions.