cancel
Showing results for 
Search instead for 
Did you mean: 

STM32Cube generated project, adding to HAL driver

kartik
Associate II
Posted on April 29, 2014 at 22:22

I'm having trouble during the Link stage after adding a component to the HAL driver in my project. I'm using IAR. I generated a project using STM32CubeMX. I then manually added use of the RTC component, by including stm32f4xx_hal_rtc.c and stm32f4xx_hal_rtc.h to the STM32F4xx_HAL_Driver group in my IAR Project. I can see the files being compiled but during the Link stage its not able to find a definition for HAL_RTC_Init() ( a function defined in stm32f4xx_hal_rtc.c). Do I have to do anything extra to HAL driver when I add some source files to it ? 

Thanks

Kartik

#stm32f439-iar
4 REPLIES 4
Breukers.Ron
Associate II
Posted on April 30, 2014 at 01:44

Hi Aiyer,

I had once the same observation, but once you add a new function you have to rebuild all target files. After that step all works out.

Good luck,

Ron

kartik
Associate II
Posted on April 30, 2014 at 01:51

Hi Ron,

Thanks a lot for the help. I did try a complete rebuild but it still complained. Not sure if I'm missing some #define or something.

Regards

Kartik

remi
Associate II
Posted on April 30, 2014 at 10:08

Hello Kartik

 

 

Do you have see the ''stm32f'xx_hal_conf.h'' file in the $(PROJ)/inc directory ?

 

 

uncomment the line for RTC.... (line 70)

 

 

Rémi

 

kartik
Associate II
Posted on April 30, 2014 at 18:54

Hi Remi,

Thank you very much for the answer... that was golden. :)

Regards

Kartik