cancel
Showing results for 
Search instead for 
Did you mean: 

Why do I have undefined references for ADC after add them from Cube MX?

JPiet.3
Associate II

Hi all,

I use STM32CubeIDE Version: 1.10.1 and Cube MX Version 6.6.1. On an STM32H745 Evalboard. The grafical interface was created under TouchGFX. In my project, I added a ADC module on port PC0 (ADC123_IN10).

The selected PIN is not used by the LCD. But I have a warning apart from the ADC1 (and also, if I would use other ADC2 or 3). With this selection, I am able to generate the code. My problem is, when I select the Channel 10 and choose IN10-Single ended, I cannot build my project anymore. If I have the selection in Cube MX, create a pair .c/.h, I get even more linker errors. Does sombody knows, what happen? How can I solve this? Is it a problem of the usage or from the tool?

Thanks,

Jan

0693W00000Unb9DQAR.png 

4 REPLIES 4

Hello @JPiet.3​ ,

First let me welcome you to the ST community and thank you for having reported :smiling_face_with_smiling_eyes:

Could you please attach your .ioc file to investigate the issue from our side, it will help find the root cause of the issue.

Thanks in advance.

Khouloud.

JPiet.3
Associate II

Yes, for sure. Here is my .ioc file for this project

With this settings, the ADC1 is selected, but no port pin. If you add, for instance IN10, it is not possible to build the project because of undefined refereneces (from ADC).

You see as well in my project structure, the link to the ADC files is not available.

As work around, I can create the link to the mising files when I copy them into the IDE-Project and select, "create link".

0693W00000UngkYQAR.png0693W00000Ungl2QAB.png 

Jan

Hi @JPiet.3​,

Please excuse the somewhat late reply.

Oddly I couldn't reproduce the issue even using your .ioc file: there is no build error with or without activating the ADC1.

Please find hereafter steps I followed to create the project from scratch:

1- Use TouchGFX 4.20.0 Designer to create project based on STM32H745I_DISCO and generate code.

2- Once generated, load the generated .ioc using STM32CubeMX. Configure ADC1 by selecting IN10 Single- Ended for IN10 channel.

3- Generate code using STM32CubeIDE toolchain and build it.

Proceeding as above, the build finished successfully with zero errors and warnings and all neede files are imported, please correct me if I've missed something.

Khouloud.

JPiet.3
Associate II

When I use just the pure .ioc file, I can create a running project. The failure occured, when I use my always created project, including the TouchGFX display driver.

Jan