rosserial_stm32
rosserial_stm32 copied to clipboard
compile error on nucleo-stm32f466re
Hello.
Recently, I'm on a project using stm32 with ros
I should use this library to communicate with ros node, but compile error occurs like below
Plz let me know what would cause this issue...
entire error message is below
cannot convert 'uint8_t (*)[1024] {aka unsigned char (*)[1024]}' to 'const uint8_t* {aka const unsigned char*}' for argument '2' to 'HAL_StatusTypeDef HAL_UART_Transmit_DMA(UART_HandleTypeDef*, const uint8_t*, uint16_t)'
Sincerely looking forward to your answer
Thanks
I had exactly the same error. I used this setup in a project for a STM32F767ZI, for this, I think it is following hardware - independent reason for the bug of the current commit of this repo: original: HAL_UART_Transmit_DMA(huart, &(tbuf), twind); fix: HAL_UART_Transmit_DMA(huart, (uint8_t*)&(tbuf), twind);
-> typecast (uint8_t*) for tbuf was missing, HAL_UART_Transmit_DMA seems to require everytime a const uint8_t *