rosserial_stm32 icon indicating copy to clipboard operation
rosserial_stm32 copied to clipboard

compile error on nucleo-stm32f466re

Open jaykorea opened this issue 2 years ago • 1 comments

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

image

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

jaykorea avatar Sep 27 '22 14:09 jaykorea

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 *

Robo-simon avatar Mar 06 '23 15:03 Robo-simon