2017-09-13 07:58 AM
Hello,
I am preparing a project to test some USART and timers using a STM32F769 and a Discovery board.
I configured the Project to work with the STM32CubeF7 using the HAL modules (I didn't use the STM32CubeMX to generate the project, I selected the files manually inside the Keil options).
I also added the 'stm32f7xx_hal_conf.h' and uncommented the required lines of code to include all he .h files.
Also included the USE_HAL_DRIVER in the project configuration to use the 'hal_conf.h' file.
But I am experimenting some issues inside the 'smt32f7xx_hal_gpio.h' and the definitions of the int variables ar marked as unknown type (uitn32_t, uint_8, etc) so some of the structures inside the file are also marked as 'undefined' (GPIO_InitTypeDef) and also a few functions inside the module are marked as 'undefined'.
I tried to fix it adding some includes inside my code but I couln't so I am sutcked now.
Anyone can help with this?
Thanks in advanced,
Omar
#stm32cube #keil #stm32f7 #undefined-symbolSolved! Go to Solution.
2017-09-15 12:34 AM
I finally solved this issue.
It was an error inside the 'stm32f7xx_hal_conf.h', I was uncomment the USART define line but not the UART define line so it was my fault.
Despite this was my fault this error (and your answers) made me understand some compiler, linker and coding subtetlies.
Thanks all for your help!
Omar
2017-09-13 11:56 AM
Place
#include <stdint.h>
before the place you #include 'smt32f7xx_hal_gpio.h'
JW
2017-09-14 12:58 AM
That's a different problem. It's not enough #include the .h headers, you need compile and link all the related .c modules. This process is toolchain-dependent. I don't Keil.
JW
2017-09-14 01:45 AM
,
,
Thanks for the answer.
I have defined <,stdint.h>, inside the 'stm32f7xx_hal_conf.h' file before the ♯ include 'stm32f7xx_hal_gpio.h' but the error is still there:
.\Objects\uart_hal_cube_st_testing.axf: Error: L6218E: Undefined symbol HAL_UART_DeInit (referred from hal_communications.o).
.\Objects\uart_hal_cube_st_testing.axf: Error: L6218E: Undefined symbol HAL_UART_Init (referred from hal_communications.o).
.\Objects\uart_hal_cube_st_testing.axf: Error: L6218E: Undefined symbol HAL_UART_Receive_DMA (referred from hal_communications.o).
.\Objects\uart_hal_cube_st_testing.axf: Error: L6218E: Undefined symbol HAL_UART_Transmit_DMA (referred from hal_communications.o).
It is all a chain error in the includes.
The program compiles but fails during the linking phase.
2017-09-14 02:02 AM
There is something related to the 'HAL_StatusTypeDef' inside the 'stm32f7xx_hal_def.h' that goes wrong.
2017-09-14 02:05 AM
In the module I am preparing I am using the UART APIs from the STM32CubeF7 HAL and I am including those files:
&sharpinclude 'stm32f7xx_hal.h'
&sharpinclude 'stm32f7xx_hal_uart.h'
Could be something wrong there?
2017-09-14 03:32 AM
I think that my error is due to the use of some 'extern' variables inside my module.
I have declare them inside the 'my_module.h' as extern because I need to use them in the main.c file. Then I have defined them an initialized them inside the 'my_module.c' file (without the extern prefix).
Isn't the correct way to use extern variables?
2017-09-15 12:34 AM
I finally solved this issue.
It was an error inside the 'stm32f7xx_hal_conf.h', I was uncomment the USART define line but not the UART define line so it was my fault.
Despite this was my fault this error (and your answers) made me understand some compiler, linker and coding subtetlies.
Thanks all for your help!
Omar