cancel
Showing results for 
Search instead for 
Did you mean: 

Refresh files to compile after prebuild steps

DBrau.2
Associate III

I run my python script in C/C++ Build --> Settings --> Build Steps --> Pre-build steps by running command:

cd ${ProjDirPath}/menu_language_generator && python generate.py

This script generates header files to my project with langauge translations. Script works fine and generates these files but then they are not visible and compilator shows errors. After second compilation when files has been already generated the process end up successfully. 

How can I refresh files after pre-build and compile project on first time after generating files?

 

2 REPLIES 2
TDK
Guru

Two options here:

Automatically Refresh Eclipse Projects before Build | MCU on Eclipse

TDK_0-1740492886234.png

 

If you feel a post has answered your question, please click "Accept as Solution".
DBrau.2
Associate III

The solution presented in the article does not actually resolve the issue, and they contradict themselves. They state that the project refreshes after compilation, which is why files generated in the pre-build step are not visible. They suggest adding a new, empty program before compilation to trigger a project refresh. However, since this program runs before the actual build process, it will refresh the project before the generated files exist, making this approach ineffective.

The only reliable solution is to enable the global refresh option for the entire environment. However, this is not a satisfactory solution for me because I want to implement this within the project itself, ensuring that it works for all team members without requiring manual environment configuration.