cancel
Showing results for 
Search instead for 
Did you mean: 

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

demir
Senior

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

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

View solution in original post

4 REPLIES 4
SofLit
ST Employee

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.
demir
Senior

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
Principal

> 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
Guru

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