Skip to main content
Senior
February 12, 2024
Solved

When I click on open declaration, .c file is not opened.

  • February 12, 2024
  • 5 replies
  • 3554 views

When I tried to open the declaration, to see how function works, STM32CUBE IDE does not automatically open the respective .c files in which function declarations exist.

Could you pls point me to the right direction ?

 

demir_0-1707750937819.png

 

Best answer by TDK

You can also try Project -> C/C++ Index -> Rebuild Index.

If your project doesn't build, fix that first. Your main.c is modified and not saved, could also be causing issues.

5 replies

mƎALLEm
Technical Moderator
February 12, 2024

Hello,

Click "Ctrl" key and click on the API you need to show the declaration. But you need to compile the project before.

"To give better visibility on the answered topics, please click on ""Accept as Solution"" on the reply which solved your issue or answered your question."
demirAuthor
Senior
February 12, 2024

Unfortunately, that didnt work. Maybe, it is due to scalability settings etc. The .c file I am trying to achieve via open declaration is too big, if thats the case, how can I change it ?

Bob S
Super User
February 12, 2024

> When I tried to open the declaration

What exactly did you do?

If you right-click on the function name then select "Open Declaration" from the pop-up menu, that should take you to the function.  Or function key F3 also does that (at least in the older CubeIDE version I am running at the moment).

TDK
TDKBest answer
Super User
February 12, 2024

You can also try Project -> C/C++ Index -> Rebuild Index.

If your project doesn't build, fix that first. Your main.c is modified and not saved, could also be causing issues.

"If you feel a post has answered your question, please click ""Accept as Solution""."
RDrum.1
Associate II
October 8, 2024

This normally works for me. But not today.

Restarted CubeIDE- started working again.

*shrugs*

Visitor II
November 13, 2024

WoodNymph_0-1731501030502.png

after build will product files that files can jump declaration.files is in color blue folder.