cancel
Showing results for 
Search instead for 
Did you mean: 

audio_playback_and_record example add uart2

dandantas88
Associate II
Posted on June 26, 2015 at 20:36

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 example

 

and 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
4 REPLIES 4
Posted on June 26, 2015 at 22:26

Make sure HAL_UART_MODULE_ENABLED is defined in your project

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
dandantas88
Associate II
Posted on June 26, 2015 at 22:47

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 future

Posted on June 26, 2015 at 23:20

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.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
dandantas88
Associate II
Posted on June 27, 2015 at 00:00

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