Undefined reference to 'HAL_RTC_Init' problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-01-20 2:46 AM
Hi, I want to use the RTC. ( Use STM32F429ZI Discovery board )
So, I set
1. RCC-> High Speed Clock Cystal/Ceramic Resonator
RCC-> Low Speed Clock Cystal/Ceramic Resonator
2. Clock Configuration -> RTC Clock Mux -> LSE
3. Pinout & Configuration -> Timers -> RTC -> Active Clock Source
4. Generate Code and Build project but, failed
Can you help me to solve this problem?
- Labels:
-
RTC
-
STM32CubeIDE
-
STM32CubeMX
-
STM32F4 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-01-20 9:11 AM
Hello @지용 한 ,
Thank you for reporting your issue, I will try to help you on it :) .
First on my side, I started a new project following the same steps as you and it works properly. You can try it on your side with my project attached. I am using STM32CubeIDE V1.7.0.
Now let's try to understand your issue, please provide me more details on your project.
- What's IDE do you use ? (STM32CubeIDE, EWARM ...)
- What's your version of STM32CubeMX ? Sometimes just by using the latest version can solve your issue.
- Are you using all the includes generated by STM32CubeMX ?
Thank you for your responses.
A.MVE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-01-20 5:43 PM
Hi,
- I used STM32CubeIDE ( Version 1.8.0 )
- Maybe STM32CubeMX version is 6.4.0.xxxxxx
- I generate code, STM32CubeIDE.
I think, the problem is importing from TouchGFX to STM32CubeIDE.
TouchGFX Desinger version is 4.18.1
The order of execution is as follows.
- In TouchGFX, Make project and generate code. ( ex. Project name is MyTemplate. )
- In STM32CubeIDE, File -> Open Proejct File system.
- In STM32CubeIDE, Import Project from File System or Archive -> Directory -> Find MyTemplate proejct and Finish
- In STM32CubeIDE, Click STM32F249I-DISCO( in STM32CubeIDE ) and success build
- In STM32CubeIDE, Click STM32F429I_DISCO_REV_E01.ioc and rename MyTemplate.ioc.
- In STM32CubeIDE, Open MyTemplate.ioc file and RCC setting. ( HSE -> Crystal/Ceramic Resonator, LSE -> Crystal/Ceramic Resonator )
- In STM32CubeIDE, RTC check Active Clock Source.
- In STM32CubeIDE, Save the MyTemplate.ioc file and Click STM32F249I-DISCO( in STM32CubeIDE ) icon build project.
- Undefined reference to 'HAL_RTC_Init'
I ran a few test( DAC, ADC, UART ..), but all failed with similar problem.
( Undefined reference to 'HAL_DAC_init' ...)
Can you help me, how to import from TouchGFX to STM32CubeIDE?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-01-21 1:24 AM
Hi @지용 한 ,
Thank you for your detailed description.
By following your steps I had the same issue, but I find a workaround that can help you :) . Before that please have you followed those installation steps.
Please can you try that on your side :
- In TouchGFX, Make project and generate code. ( ex. Project name is MyTemplate. )
- Do to the TouchGFXProject directory C:\TouchGFXProjects\MyTemplate\STM32CubeIDE
- Open the project .project, that will open STM32CubeIDE and your IDE should look like that.
- Go to C:\TouchGFXProjects\MyTemplate\ open the file STM32F429I_DISCO_REV_E01.ioc with STM32CubeMX. I am using the version 6.3.0.
- In STM32CubeMX, Open MyTemplate.ioc file and RCC setting. ( HSE -> Crystal/Ceramic Resonator, LSE -> Crystal/Ceramic Resonator )
- In STM32CubeMX, RTC check Active Clock Source.
- In STM32CubeMX, generate code.
- In STM32CubeIDE, your project should be updated, build it.
That should solve your issue for now.
I will check internally why we can't use STM32CubeIDE to update the project.
Best Regards
A.MVE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-01-21 10:50 PM
Thank you for your help.
But, I have another issue.
I finished downloading the firmware, but nothing displayed on the LCD.
My Steps:
- In TouchGFX, Make project and generate code. ( ex. Project name is MyTemplate. )
- Do to the TouchGFXProject directory C:\TouchGFXProjects\MyTemplate\STM32CubeIDE
- Open the project .project
- Go to C:\TouchGFXProjects\MyTemplate\ open the file STM32F429I_DISCO_REV_E01.ioc with STM32CubeMX( version 6.3.0.).
- In STM32CubeMX, Open MyTemplate.ioc file and RCC setting. ( HSE -> Crystal/Ceramic Resonator, LSE -> Crystal/Ceramic Resonator )
- In STM32CubeMX, RTC check Active Clock Source.
- In STM32CubeMX, generate code.
- In STM32CubeIDE, your project should be updated, build it.
- In STM32CubeIDE, I connected the STM32F429-Discovery board and Run.
- In STM32F429ZI-Discovery board LCD, I can't see nothing on the LCD.
In STM32F429ZI-Discovery board, the LD1 LED blinks during firmware download.
Go to C:\TouchGFXProjects\MyTemplate\ open the file MyTemplate.touchgfx, I can see icons.
In TouchGFX, I can run simulator and see icons.
Could you help me the problem what is?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-10-25 5:57 AM
I understand what's problem.
If you take look at the hierarchy under driver/stm32f4xx_HAL_Driver.
You will notice hal file related to rtc not present. You have to link this file path so that this file will be available.
And after that compile code.
