Skip to main content
Senior
Feb 12, 2024 3:16 PM UTC
Solved

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

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

 

This topic has been closed for replies.
TDK
TDKBest answer
Feb 12, 2024 9:05 PM UTC

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""."

6 replies

mƎALLEm
ST Technical Moderator
Feb 12, 2024 3:20 PM UTC

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 "Best answer" on the reply which solved your issue or answered your question.
demirAuthor
Senior
Feb 12, 2024 3:23 PM UTC

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
Feb 12, 2024 3:24 PM UTC

> 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
Feb 12, 2024 9:05 PM UTC

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
Oct 8, 2024 6:27 AM UTC

This normally works for me. But not today.

Restarted CubeIDE- started working again.

*shrugs*

Visitor II
Nov 13, 2024 12:41 PM UTC

WoodNymph_0-1731501030502.png

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