cancel
Showing results for 
Search instead for 
Did you mean: 

Hello, I am using the STM32CubeIDE and have a project where when I do a build using the build project icon I get no compiling errors. But, when I go to Project pulldown menu and select "Clean" I then get compiling errors? Why is there a difference?

JPapa.1
Associate II
 
1 ACCEPTED SOLUTION

Accepted Solutions
mattias norlander
ST Employee

Hi,

If you click "build" then the build system will perform an incremental build by comparing if any files have been updated since the last build invocation. If so, only re-build those files and link the elf-file.

So the question is then: Did you make a change to any of the files before taking the first screenshot? If not, the tool is doing the right thing.

If you click menu Project > Clean, then you are asked whether to clean (and build?) the selected project or all projects in your workspace. Quite useless option for STM32 developement. I think this menu is a heritage from Java development or some other domain...

In general I would use the build toolbar icon or right-click on the project for build/clean as better options.

But since you say that you only have this project open in your current workspace, the issue should not be related to multiple projects being built or other issues...

It is hard to make any conclusions given this information. The screenshot shows:

  • A couple of compilation warnings.
  • The linker step however fails, which is why there is no update to the elf-file.
    • The reason the linking fails is that because some required object-files does not seem to exist. The question is why?!

Attach the full build log if possible.

Maybe you could also try to disable parallel build to see if this fixes the issue?

  • Project Properties > C/C++ Build > Behavior > Enable Parallel build <-- Disable it!

View solution in original post

4 REPLIES 4
TDK
Guru

Do you have multiple projects open, perhaps? Show the error message screenshot as well as the successful build message screenshot.

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

Hello, thank-you for the response. I actually only have the one project opened. The files are being ported from another project so you know. The CubeIDE works fine if I build a generic project from scratch. It's the porting process somehow is doing it? I have attached some screen shots. I also noticed that the .elf file is not being updated maybe because it's not really compiling completely?

0693W00000Ly10QQAR.png 

0693W00000Ly119QAB.png

mattias norlander
ST Employee

Hi,

If you click "build" then the build system will perform an incremental build by comparing if any files have been updated since the last build invocation. If so, only re-build those files and link the elf-file.

So the question is then: Did you make a change to any of the files before taking the first screenshot? If not, the tool is doing the right thing.

If you click menu Project > Clean, then you are asked whether to clean (and build?) the selected project or all projects in your workspace. Quite useless option for STM32 developement. I think this menu is a heritage from Java development or some other domain...

In general I would use the build toolbar icon or right-click on the project for build/clean as better options.

But since you say that you only have this project open in your current workspace, the issue should not be related to multiple projects being built or other issues...

It is hard to make any conclusions given this information. The screenshot shows:

  • A couple of compilation warnings.
  • The linker step however fails, which is why there is no update to the elf-file.
    • The reason the linking fails is that because some required object-files does not seem to exist. The question is why?!

Attach the full build log if possible.

Maybe you could also try to disable parallel build to see if this fixes the issue?

  • Project Properties > C/C++ Build > Behavior > Enable Parallel build <-- Disable it!
JPapa.1
Associate II

Yes, that makes perfect sense.

I didn't make any changes and that's why it didn't show any problems on the second build but did show problems on the rebuild. Thanks for the help,

Jim....