skyyu.zhang's example code from https://github.com/skyyuzhang/UAVCAN_NODE_FreeRTOS reshaped as a PlatformIO STM32Cube project.
keywords: STM32F103C8, CAN bus, UAVCAN, libcanard, PlatformIO, STM32Cube, FreeRTOS
- tested on STM32F103C8 ("Blue Pill")
- CAN RX: pin A11
- CAN TX: pin A12
- bus speed: 250kbaud (you can change
CAN_SPEED
inuavcan.h
)
Build and upload using PlatformIO as usual.
After connecting to your PC's CAN bus hardware, you should see new
UAVCAN node named skyyu.node.demo
with id 50 in
UAVCAN GUI Tool.
The code uses original skyyu.zhang's FreeRTOS version because there's no
FreeRTOS for stm32cube
platform in PlatformIO. I have placed it in
lib/FreeRTOS-stm32cube
directory for better reuse but
FreeRTOSConfig.h
is placed here too which is not a good solution.
I could probably use some includedir black magic but it would not be much
better solution IMHO...