yoneken / rosserial_stm32

This is a part of [rosserial](https://github.com/ros-drivers/rosserial) repository to communicate with ROS system through a USART for STM32 embedded system.
BSD 2-Clause "Simplified" License
218 stars 72 forks source link

compile error on nucleo-stm32f466re #43

Open jaykorea opened 1 year ago

jaykorea commented 1 year ago

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

Robo-simon commented 1 year ago

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