cancel
Showing results for 
Search instead for 
Did you mean: 

Bug: Enabling new HAL feature USE_HAL_***_REGISTER_CALLBACKS breaks project build

Hrvoje Brezak
Associate II

Latest update to HAL library used to generate code with CubeMX brought among else assignable peripheral driver callback functions, a very nice feature. Per documentation, assignable callbacks are enabled by specifying 'USE_HAL_***_REGISTER_CALLBACKS' compiler symbol, where *** are replaced with selected peripheral.

However, when this is done project fails to build properly, with compiler outputting this cryptic error messages:

arm-atollic-eabi-gcc: error: 1: No such file or directory

arm-atollic-eabi-gcc: error: =: No such file or directory

arm-atollic-eabi-gcc: error: 1: No such file or directory

arm-atollic-eabi-gcc: error: =: No such file or directory

I'm using Atollic Truestudio with CubeMX 5.2.0. It happens both with STM32CubeF4 Firmware Package V1.24.0 and STM32CubeF7 Firmware Package V1.15.0.

2 REPLIES 2
S.Ma
Principal

Is the project building without this symbol?

If yes, how did you enable this symbol.

Please note that callbacks are within the ISR so additional granularity on the callbacks cost you more time in the ISR...

And to activate all possible callbacks, all interrupt sources maybe enabled by default.

Hrvoje Brezak
Associate II

Yes, without enabling this project builds fine.

In Atollic Truestudio under project settings there is an option to define symbols for compiler. For example, some of the default symbols within CubeMX generated projects are 'USE_HAL_DRIVER' and 'STM32F767xx', or respective STM32 version. This is where I specify callbacks flag.

It does not seem to me this adds much additional granularity, as all those callbacks exited in HAL before, defined as weak functions. This new feature enables you to divert the call from weak function to your desired function by means of user configurable function pointer.