I’m writing a driver for TI INA234 power sensor, but can’t get it recognized by the build system. Last time I wrote a PX driver, the cmake config file looked very different… I did the following, but the build system still ignores my code:
Created code in a directory aligned with naming convention: drivers/power_monitor/ina234
Assigned a sensor ID in drv_sensors.h file
Updated the board config to include my code: “CONFIG_DRIVERS_POWER_MONITOR_INA234=y”
Updated CMakeFile in the driver directory:
px4_add_module(
MODULE drivers__ina234
MAIN ina234
COMPILE_FLAGS
-Wno-cast-align # TODO: fix and enable
SRCS
ina234_main.cpp
ina234.cpp
DEPENDS
battery
px4_work_queue
)
Thanks for the idea! Menuconfig was something that pointed me in the right direction. My sensor was missing, the reason being “Kconfig” file was named as “KConfig”. After fixing the capitalization, I am able to build the driver.