694 views
in System Integration by
Hi everybodies...

I have a trouble when i do "make" to compile my code, the error that show me is the next: DeviceDriver.c:(.text+0xc4): undefined reference to `HAL_ADC_Init'
DeviceDriver.c:(.text+0xd4): undefined reference to `HAL_ADC_ConfigChannel'.
I want to controller a Gauge with an analog input, i achieved compile the code for use one analog input, for this i used the software MDK-ARM and when transfer the code to the DeviceDriver and compile it, the comand show the error previously mentioned. I think that the compiler don´t into the library stm32f4xx_hal_adc.h, and although i set the "include" of this library, the error show yet. If someone can i help me I would appreciate it very much.

P.D. Sorry for my english, i am not an expert.

1 Answer

+1 vote
by
Hello Jesus,

no worries, I am not a native English speaker as well :D

 

It sounds like a linker issue. Did you adapted the stm32f7xx_hal_conf.h for using the ADC Module?

Additionally you have to include the matching HAL ADC c file. The linker needs the stm32f7xx_hal_adc.c to find the body of the used ADC functions.

 

Let me know whether it works after you done this steps.

 

Kind regards

 

Tim
by
Thanks Tim for your answer, at first i think that i only needed to add the library in the head of the code of the file DeviceDriver with #include "stm32f4xx_hal_adc.h" but it did not recognized the library then when i compiled all codes with "make" i saw that it was compiling some libraries of the folder hal driver but the library of adc previosly mentioned was not compiled, and after i search how modify the file "make" and add this library it was when the error disappear.
by
Does it mean that your system is running now?

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...