# Fatal Error Occurs When Enabling CONFIG_CAN: "stm32_can.h: No Such File or Directory

Source: https://forum.modalai.com/topic/3177/fatal-error-occurs-when-enabling-config_can-stm32_can-h-no-such-file-or-directory
Category: Flight Core and Legacy VOXL (https://forum.modalai.com/category/9/flight-core-and-legacy-voxl)
Tags: flight-core-v2
Posted: 2024-03-07 13:20:08 UTC by Will
Replies: 1 · Views: 949

## Will · 2024-03-07 13:20:08 UTC

Hi,

I'm interested in activating the CAN bus to retrieve range sensor data from the J8 connector using the UAVCAN protocol. However, enabling the feature results in an error. Could you please provide guidance on how to enable the UAVCAN feature for the J8 CAN bus? Thank you.

#default.px4board
CONFIG_DRIVERS_UAVCAN=y
CONFIG_BOARD_UAVCAN_INTERFACES=1
#nuttx-config/nsh/defconfig
CONFIG_CAN=y

boards/modalai/fc-v2/src/can.c:52:10: fatal error: stm32_can.h: No such file or directory
   52 | #include "stm32_can.h"
      |          ^~~~~~~~~~~~~
compilation terminated.
[838/1072] Building CXX object src/modules/simulation/simulator_sih/CMakeFiles/modules__simulation__simulator_sih.dir/sih.cpp.obj
ninja: build stopped: subcommand failed.
make: *** [Makefile:232: modalai_fc-v2] Error 1

BR,
Will

## Reply by Eric Katzfey (ModalAI staff) · 2024-03-07 16:39:30 UTC

@Will said in [Fatal Error Occurs When Enabling CONFIG\_CAN: "stm32\_can\.h: No Such File or Directory](/post/15095):
> stm32_can.h

This has some more info: https://discuss.px4.io/t/nuttx-can-drivers-on-stm32h7x3/29828/2
