# Libuavcan interfacing with chibios

**URL:** <https://forum.opencyphal.org/t/libuavcan-interfacing-with-chibios/1776>\
**Category:** Development & Maintenance\
**Created:** [October 20, 2022, 10:13am UTC](https://forum.opencyphal.org/t/libuavcan-interfacing-with-chibios/1776 "2022-10-20T10:13:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pramod](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/p/71c47a/32.png) [@Pramod](https://forum.opencyphal.org/u/Pramod)\
**Post date:** [October 20, 2022, 10:13am UTC](https://forum.opencyphal.org/t/libuavcan-interfacing-with-chibios/1776/1 "2022-10-20T10:13:46Z")

</div>

Hi,

I’m trying to interface libuavcan with chibios. I’ve made changes to main make file by comparing with libuavcan\libuavcan\_drivers\stm32\test\_stm32f107\Makefile. But I’m getting below error which i’m unable to resolve.  
I’m new to uavcan, chibios and c++ as well. Please help me to resolve this problem.

```auto
                 from ..libuavcan/libuavcan/include/uavcan/build_config.hpp:32:6: warning: "__cplusplus" is not defined, evaluates to 0 [-Wundef]
   32 | # if __cplusplus > 201200
      | ^ ~~~~~~~~~~..libuavcan/libuavcan/include/uavcan/build_config.hpp:34:9: warning: "__cplusplus" is not defined, evaluates to 0 [-Wundef]
   34 | # elif (__cplusplus > 201100) || defined(__GXX_EXPERIMENTAL_CXX0X__)
      | ^ ~~~~~~~~~~../libuavcan/libuavcan/include/uavcan/build_config.hpp:210:1: error: unknown type name 'namespace'
  210 | namespace uavcan
      | ^ ~~~~~~~~../libuavcan/libuavcan/include/uavcan/build_config.hpp:211:1: error: expected '=', ',', ';', 'asm' or ' __attribute__' before '{' token
  211 | {
      | ^

```

---

<div class="post-metadata">

**Author:** ![pavel.kirienko](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/pavel.kirienko/32/9_2.png) [@pavel.kirienko](https://forum.opencyphal.org/u/pavel.kirienko)\
**Post date:** [October 20, 2022, 10:20am UTC](https://forum.opencyphal.org/t/libuavcan-interfacing-with-chibios/1776/2 "2022-10-20T10:20:07Z")

</div>

You are trying to include a C++ header file into a C file, this is not permitted, so don’t do that.

Also, UAVCAN has ceased to exist. There are two successor projects: DroneCAN for legacy systems, Cyphal for modern systems. More info:

- [UAVCAN v1 is now Cyphal](https://forum.opencyphal.org/t/uavcan-v1-is-now-cyphal/1622)
- [Yakut monitor with a Babel - #7 by pavel.kirienko](https://forum.opencyphal.org/t/yakut-monitor-with-a-babel/1514/7)

---

<div class="post-metadata">

**Author:** ![Pramod](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/p/71c47a/32.png) [@Pramod](https://forum.opencyphal.org/u/Pramod)\
**Post date:** [October 20, 2022, 10:44am UTC](https://forum.opencyphal.org/t/libuavcan-interfacing-with-chibios/1776/3 "2022-10-20T10:44:36Z")

</div>

Thankyou @pavel.kirienko.

Yes I’ve included header files in main.c file. And renaming it to main.cpp worked.

Yes I’ll note that and switch to DroneCAN.

Thankyou for your time:)
