Skip to main content
PŠirů.1
Associate
March 26, 2020
Question

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

  • March 26, 2020
  • 10 replies
  • 9127 views

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

This topic has been closed for replies.

10 replies

Nesrine.JLASSI
Visitor II
March 27, 2020

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
PŠirů.1Author
Associate
March 27, 2020

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

Nesrine.JLASSI
Visitor II
March 27, 2020

Hi @Pavel Širů�?ek​ 

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

Best regards,

Nesrine

Nesrine.JLASSI
Visitor II
April 2, 2020

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

Tesla DeLorean
Guru
April 2, 2020

or Networked / Shared drive?

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
PŠirů.1
PŠirů.1Author
Associate
April 2, 2020

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

Nesrine.JLASSI
Visitor II
April 7, 2020

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
PŠirů.1Author
Associate
April 17, 2020

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
PŠirů.1Author
Associate
April 29, 2020

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

Loppi
Associate III
October 25, 2022

I finally found this answer. Thank you very much! I had this issue because I have derived my project from a TouchGFX example.

MGhah.1
Associate
August 8, 2023

It would be nice to mention how exactly did you solve the problem. Thanks in advance :)