Compilation error when adding vendor to vendor-lists.txt for sensor driver

I am trying to add this ultrasonic sesnor driver (inductivekickback/hc-sr04: Zephyr RTOS driver for HC-SR04 Ultrasonic Ranging Module (github.com)) and testing it with the app included. But i get a compilation error when i add the vendor prefix used for the sensor.

Traceback (most recent call last):
File "C:/ncs/v2.1.0/zephyr/scripts/dts/gen_defines.py", line 1032, in <module>
main()
File "C:/ncs/v2.1.0/zephyr/scripts/dts/gen_defines.py", line 62, in main
vendor_prefixes.update(edtlib.load_vendor_prefixes_txt(prefixes_file))
File "C:/ncs/v2.1.0/zephyr/scripts/dts\python-devicetree\src\devicetree\edtlib.py", line 2195, in load_vendor_prefixes_txt
assert len(vnd_vendor) == 2, line
AssertionError: elecfreaks Elecfreaks

I followed this blog post Adding an Out-of-Tree sensor driver to Zephyr - Goliothand (1) Tutorial: Mastering Zephyr Driver Development - Gerard Marull Paretas, Nordic Semiconductor ASA - YouTube to add the bindings and all the correct dependencies.

Parents Reply Children
  • thanks, but it is not the problem anymore since its not essential for the build to add the vendor prefix.

    but i get this build error 

    c:\ncs\myapps\ultrasonic\build\zephyr\include\generated\devicetree_unfixed.h:1194:46: error: 'DT_N_S_soc_S_peripheral_40000000_S_gpio_842500_P_label' undeclared here (not in a function); did you mean 'DT_N_S_soc_S_peripheral_40000000_S_gpio_842500_P_reg'?
    1194 | #define DT_N_S_hc_sr04_P_trig_gpios_IDX_0_PH DT_N_S_soc_S_peripheral_40000000_S_gpio_842500
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Related