cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE generates an empty (bin<1kb) binary when re-generating project from CubeMX

Zaher
Senior II

Hello everyone,

For some reason, STM32CubeIDE generates a small binary, almost less than 1kb, after re-generating the project from CubeMX at certain point. Clean and build project didn't work. Project compiles successfully without any issue, however, the same incomplete binary is being generated over and over again. The only way to solve it was to remove the entire project from workspace and from disk, create a new project, generate project from CubeMX, then add my own sources from scratch.

The problem is this workaround doesn't last long as I need to re-generate the project from CubeMX many times and at certain time re-generating project from CubeMX corrupts the entire build and results in that weird binary.

Hopefully someone has something to say about it!

Thanks,

Zaher

4 REPLIES 4
Pavel A.
Evangelist III

Seen this few times, IIRC because the startup .s file gets removed from the project for some reason.

Then linker cannot find the entry point...

If so, restore most recent .cproject, .project from backup and refresh.

-- pa

Zaher
Senior II

In my case, startup.s is still there and has not been altered/removed. I still need to verify whether copying  .cproject and .project files from backup could solve it!

> startup.s is still there and has not been altered/removed.

Yes, but do you see it in the eclipse project explorer tree?

-- pa

That's exactly what I meant. The file is sill available in the project and on disk.