Can't get new sensor driver to compile (or even fail to compile!)

Sorry if this is a dumb question, I am new to PX4 and cmake.

I am trying to add a driver for a propeller rpm sensor: I have modeled the code and makefile off another driver and placed them in src/drivers/rpm, but it seems like they are not being “seen” by the compiler. In the build folder, there is no build/src/drivers/rpm folder like there is for all the other drivers and the main function does not show up in build/src/firmware/nuttx/builtin_commands.c.

What am I missing? Thanks in advance.

Please paste the contents of your CMake file here.

Also, have you added your rpm module to the CMake compilation file for your board. I.e. have you added drivers/rpm to your nuttx_px4fmu-v2_default.cmake file? (Note you will have to change the correct board CMake file for the flight controller that you are using).

Adding it to nuttx_px4fmu-v2_default.cmake did the trick. Thanks so much!


What sensor you were using to measure the rpm ? If you don’t mind can you share the rpm driver code you have written for the sensor.

Abin Ephrem