cancel
Showing results for 
Search instead for 
Did you mean: 

Ceedling test framework fails to compile mock HAL libraries when working with unit tests. I was wondering if there are any additional configurations to the project to make this work. I have attached the test file and the terminal output to this question.

JVarg.3
Associate

I am trying to set up an embedded test framework in STM32 Cube IDE. Ceedling framework works properly when there is no dependency on external libraries. However, when trying to mock any HAL library the compilation process fails.

Thank you

1 REPLY 1

The error is pretty self-explanatory: you need to insert a preprocessor symbol through command line (-D for gcc) defining the particular mcu you are targeting, see inside stm32f4xx.h.

Alternatively, you can provide that symbol directly by modifying stm32f4xx.h, by uncommenting one of the lines which are there for exactly that purpose.

JW