cancel
Showing results for 
Search instead for 
Did you mean: 

CubeIDE strange build behaviour

Peterb
Associate

I know, it's not easy to get this answer this way. I have a working F446RE code with CubeMX generated base in CubeIDE. I use the LL drivers and just simple int and string variables, not any dynamic memory handling. In some cases if I insert a new code line to a function or to the main(), an other completely unrelated part of the program go wrong. For example if I insert a simple "while (USART1_rx_counter == 0){}" line to my USART1_getchar() function, the initialization of one type of the I2C sensors go wrong. No error or warning messages, the build settings are the defaults. If I put this source to Embitz IDE, it can also build, but this problem does not appear there.

So, help me please, what (tipical) kind of errors, mistakes or settings can make this problem and this difference between the two IDE? Or perhaps should it be a (known) bug? CubeIDE is up to date.

Thanks,

Peter

5 REPLIES 5
MM..1
Chief II

Optimizing levels , or for understanding when you write bad code , you see it in src, but in compilation is nop.

Nikita91
Lead II

Dangling pointer or badly initialized pointer...

Maybe you don't write where you want to.

Peterb
Associate

Thank you,

The main question is, why this problem of the same code with CubeIDE, but not with Embitz? "Usual" pointer fault should appear similar way with the similar gcc bases. Optimization level is the same -O0 and the buid type is the default "debug". Not any warning with -Wall.

Nikita91
Lead II

Are you sure that the 2 IDE generate exactly the same binary?

Similar is not enough...

TDK
Guru

Just because it works with Embitz doesn't mean it is bug free. Similarly, just because it doesn't produce compilation warnings or errors doesn't mean it is bug free.

Focus on debugging the problem code, be objective. Definitely sounds like a write out of bounds or other memory access issue.

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