[SOLVED] Search project for text strings not working

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] Search project for text strings not working

    Hi All,
    I've been getting to know 3.28 and 3.30 as a development environment. One thing that comes up all the time is that I want to find all the occurances of a preprocessor macro, or a variable, or a comment in the project. Mostly, this is not working for me and I have to use some external grep program to do the job. SES is just not finding them even when they exist, and under the directory structure of the main project. Is there a switch or option somewhere that affects what SES will search ?
    George
  • Hello George,

    Thank you for your inquiry.
    Could you describe how you proceeded when trying to search for text strings.
    You can either mark your text, right click it and choose Find References.
    Or through the context menu, Search->Find in Files... there type in your string and choose Entire Solution.
    Then all files linked in the project folder and all included directories in the Project Settings-> Preprocessor-> User include directories will be searched.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi Nino,
    I came across two cases this morning where the search does not work. The first was when I was searching for a function declared in a system .h file, and the function was not used in the source yet. Specifically I was looking for a function from CMSIS called NVIC_GetPriority. The search returns nothing. However a search for NVIC_SetPriority finds the CMSIS file and opens it up. The very next method in that file is the Get that was not found.
    In another case I was looking for a method from the FreeRTOS source, which is included in my project. The method was conditionally defined out, so the search did not show it.
    It seems that there is some logic being used to filter the results of a search to only show those hits that are active. I can see that as being useful, but for me there are more cases where I prefer to see everything and filter it myself. Maybe the best of both would be to have an option to declutter or not.
    George
  • Hi George,

    The first was when I was searching for a function declared in a system .h file, and the function was not used in the source yet. Specifically I was looking for a function from CMSIS called NVIC_GetPriority. The search returns nothing. However a search for NVIC_SetPriority finds the CMSIS file and opens it up. The very next method in that file is the Get that was not found.


    This sounds strange indeed. Could you provide us with an example project where this issue is reproducible?

    The method was conditionally defined out, so the search did not show it.


    I just tried to reproduce this behaviour but everything was showing correctly.
    Can you provide the exact example that was not showing?
    How was is included in the project?
    What kind of file type was it?
    How did you search for it? What "search method" did you use?

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Here is another example, more flagrant. In the project there is a ATSAME70Q21_Vectors.s. I can open that file, select a vector, and try to search for it. For example, if I double-click to select "UASRT0_IRQHandler", each of the five instances of the symbol in this file are highlighted. But the find references command reports "No results". I can try to cut down the project to a simple example and upload it.
    George
  • Hi George,

    We were not able to reproduce the issue so far.
    Can you provide the exact example that was not showing?
    Can you provide an example project/setup?
    How was is included in the project?
    What kind of file type was it?
    How did you search for it? What "search method" did you use?

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.