2015-06-26 11:36 AM
audio_playback_and_record example add uart2
hello everyone. this week i start to dev in stm32f4discovery install cubeMX and get examples STM32Cube_FW_F4_v1.6.0 edditing audio_playback_and_record exampleand add uart interface 1) at this point i want to add an uart to send the ''song'' name to be played i added the library stm32f4xx_hal_usart.c and stm32f4xx_hal_uart.c and header files(in any case ) and when i try to build it generate the error ''STM32F4-DISCO\STM32F4-DISCO.axf: Error: L6218E: Undefined symbol HAL_UART_Init (referred from main.o).'' because of the line 677 - see print atach there is any point i'm missing? i'm block at this, so i'll apreciate any help =) there is a link to the project https://www.dropbox.com/sh/yfdixj9nnmo7q4u/AACFoq5s_Gqy8vbY8VISjb98a?dl=0 thanks in advance grettings from Portugal
2015-06-26 01:26 PM
Make sure HAL_UART_MODULE_ENABLED is defined in your project
2015-06-26 01:47 PM
i added a line to my main
#define HAL_UART_MODULE_ENABLED still didnt get results... if i right click on HAL_UART_Init(&huart2); in void USART2Init(void) called from main and do ''go to definition of HAL_UART_Init'' it show up ''source browser: ' HAL_UART_Init' - undefined Definition/Reference! but if i do a search in current project it found on the stm32f4xx_hal_uart.c line 240 PS: clive1, i had read a lot of your answers...great job in helping and discuting around! hope to be alike in future2015-06-26 02:20 PM
I think it needs to be in the project's stm32f4xx_hal_conf.h , not main.c as it does no help there.
Not a HAL/Cube user.2015-06-26 03:00 PM
great it work
wasnt stm32f4xx_hal_conf.h ! i put it in stm32f4xx_hal_uart.c (i describe for someone with similar error) but analizing the files in stm32f4xx_hal_conf.h the code line /* #define HAL_UART_MODULE_ENABLED */ is comented now i'll migrate my code to the main project. Thanks a lot! how can i thank you? see around