cancel
Showing results for 
Search instead for 
Did you mean: 

Can't override a '__weak' function

diverger
Senior

Hi,

I write my own 'void HAL_SPI_TxRxCpltCallback(SPI_HandleTypeDef *hspi)', intend to override the default weak one. But when debug, my version is never called, it always steps into the 'weak' one. I'm new to CubeIDE, the version is 1.16.0, any suggestions?

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions

Using .cpp ?

Double check spelling/capitalization

Perhaps use objdump to inspect generated object from your source file.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

2 REPLIES 2

Using .cpp ?

Double check spelling/capitalization

Perhaps use objdump to inspect generated object from your source file.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Hi,

My project is created as C++ project indeed. But my 'strong' version is defined in a ".c" file. Even I convert the project to 'C' project, my strong version won't be called. And I'm sure they have same signatures.

BTW: does CubeIDE support 'objdump'? I'm on Windows system, not Linux.