Monday, December 11th 2017, 10:24am UTC+1

You are not logged in.

  • Login
  • Register

gpontis

Beginner

Date of registration: Dec 18th 2007

Posts: 44

Location: California

1

Tuesday, October 31st 2017, 3:27pm

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

SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 434

2

Thursday, November 2nd 2017, 9:21am

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

gpontis

Beginner

Date of registration: Dec 18th 2007

Posts: 44

Location: California

3

Thursday, November 2nd 2017, 8:47pm

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

SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 434

4

Friday, November 3rd 2017, 9:41am

Hi George,

Quoted

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?

Quoted

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

gpontis

Beginner

Date of registration: Dec 18th 2007

Posts: 44

Location: California

5

Sunday, November 5th 2017, 2:27am

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

gpontis

Beginner

Date of registration: Dec 18th 2007

Posts: 44

Location: California

6

Monday, November 6th 2017, 5:43pm

Sorry - specific example above with .s file was not showing results due to having a filter for only *.c. It does work with *.*

Previous examples still don't work as I would have expected.

George

SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 434

7

Tuesday, November 7th 2017, 11:00am

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

hiqrf3

Beginner

Date of registration: Oct 23rd 2017

Posts: 14

8

Wednesday, November 8th 2017, 3:00am

I actually had the same problem.

hiqrf3

Beginner

Date of registration: Oct 23rd 2017

Posts: 14

9

Monday, November 20th 2017, 9:49am

Maybe you can try set “Environment options -> search dependencies" and "user regular expressions" to "YES".