cancel
Showing results for 
Search instead for 
Did you mean: 

Why does the index not work and how to make it work?

PŠirů.1
Associate II

In STM32CubeIDE it seems that index don´t work. I tried refresh it, but it didn´t help.

This happens when I import existing project into workspace. We tried it on multiple projects and multiple computers, but so far nothing has solved this problem

12 REPLIES 12

Hello @Pavel Širů�?ek​ 

Could you please tell me which STMCubeIDE version did you use.

Please tell me more about the scenario to check the issue.

Best regards,

Nesrine

PŠirů.1
Associate II

Hello,

thank you for quick response.

I use Version: 1.2.1

Build: 5190_20200115_1224 (UTC)

When i CTRL + left mouse click a function name, this should switch me to function definition (or define, variable, etc...). This works for functions automatically generated from CubeMX. (For example function HAL_GPIO_WritePin works as expected.) But it doesn't work for functions written by myself. IDE throws a error Could not find symbol "function_name" in index. In Attolic, this was working well.

Best regards,

Pavel

Hi @Pavel Širů�?ek​ 

Thanks for your feedback, the reported problem will be reviewed by STM32CubeIDE development team.

Best regards,

Nesrine

Hello @Pavel Širů�?ek​ 

Are your files physically inside the project or linked in from external drive?

Have you tried right-clicking on the project and Indexer --> Re-build?

Index can go broken if you modify/add files outside Eclipse awareness, for example with another external editor...

Regards,

Nesrine

or Networked / Shared drive?

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
PŠirů.1
Associate II

Hello,

Files are on the same drive but in different location than folder with .project.

Yes, i tried re-build the indexer.

Im adding files by simply copy+pasting them to folders. Is this the problem?

Thank you,

Pavel

Hello @Pavel Širů�?ek​ 

Could you please provide us the structure (in text form is fine, for example C:/MyProjects/MyProject) for the project and for the additional files creates that experiences the error when CTRL + clicking them? Also a screenshot of the Project Explorer view might be helpful.

Best regards,

Nesrine

PŠirů.1
Associate II

0693W000000W1RCQA0.pngHello,

sure. Project location is:

D:/fw/projects/projectName/.project

And sources location is:

D:/fw/sources/common/example1.h

D:/fw/sources/common/example1.c

D:/fw/sources/drivers/adc_driver.h

D:/fw/sources/drivers/adc_driver.c

Workspace location is:

D:/fw/workspaces/projectName/

Project setting:

<?xml version="1.0" encoding="UTF-8"?>

<projectDescription>

   <name>projectName</name>

   <comment></comment>

   <projects>

      <project>RemoteSystemsTempFiles</project>

   </projects>

   <buildSpec>

      <buildCommand>

         <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>

         <triggers>clean,full,incremental,</triggers>

         <arguments>

         </arguments>

      </buildCommand>

      <buildCommand>

         <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>

         <triggers>full,incremental,</triggers>

         <arguments>

         </arguments>

      </buildCommand>

   </buildSpec>

   <natures>

      <nature>org.eclipse.cdt.core.cnature</nature>

      <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>

      <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>

      <nature>com.st.stm32cube.ide.mcu.MCUProjectNature</nature>

      <nature>com.st.stm32cube.ide.mcu.MCUCubeIdeServicesRevAProjectNature</nature>

      <nature>com.st.stm32cube.ide.mcu.MCUManagedMakefileProjectNature</nature>

      <nature>com.st.stm32cube.ide.mcu.MCUEndUserDisabledTrustZoneProjectNature</nature>

      <nature>com.st.stm32cube.ide.mcu.MCUSingleCpuProjectNature</nature>

      <nature>com.st.stm32cube.ide.mcu.MCURootProjectNature</nature>

   </natures>

   <linkedResources>

      <link>

         <name>app</name>

         <type>2</type>

         <locationURI>PARENT-2-WORKSPACE_LOC/sources/app/projectName</locationURI>

      </link>

      <link>

         <name>common</name>

         <type>2</type>

         <locationURI>PARENT-2-WORKSPACE_LOC/sources/common</locationURI>

      </link>

      <link>

         <name>drivers</name>

         <type>2</type>

         <locationURI>PARENT-2-WORKSPACE_LOC/sources/drivers</locationURI>

      </link>

      <link>

         <name>hal</name>

         <type>2</type>

         <locationURI>PARENT-2-WORKSPACE_LOC/sources/hal/ev-build</locationURI>

      </link>

      <link>

         <name>modules</name>

         <type>2</type>

         <locationURI>PARENT-2-WORKSPACE_LOC/sources/modules</locationURI>

      </link>

      <link>

         <name>rtos</name>

         <type>2</type>

         <locationURI>PARENT-2-WORKSPACE_LOC/sources/rtos</locationURI>

      </link>

   </linkedResources>

</projectDescription>

Best Regards,

Pavel

PŠirů.1
Associate II

Hello.

I finally solved this problem.

Here's how for everyone with the same issue:

1) Go to Project->Properties.

2) Search for indexer.

3) Set to this setting:

0693W000000WdkcQAC.png

4) Rebuild index.

I don´t know, what setting is responsible for fixing this issue, but everything is working now, and this is what is important for me.

Thank you all for help.

Best Regards,

Pavel