Skip to content

New drivers out of device tree #27181

Closed
Closed
@thomasoggiersoprod

Description

@thomasoggiersoprod

Hello,
I try to add new customs drivers in my project out of the device tree but I can't do it.
I've add in my project folder/files:
1 the file prj.conf

  • add line
    CONFIG_GPIO_MCP23S08=y
    2 the file drivers/CMakeLists.txt
  • add line
    add_subdirectory_ifdef(CONFIG_MCP23S08 mcp23s08)
    3 the file drivers/KConfig
  • add line
    rsource "mcp23s08/Kconfig"
    4 the folder drivers/mcp23s08
    5 the file drivers/mcp23s08/CMakeLists.txt
  • add line
    zephyr_library_sources_ifdef(CONFIG_GPIO_MCP23S08 gpio_mcp23s08.c)
    6 the file drivers/mcp23s08/KConfig
  • add line
    menuconfig gpio_mcp23s08
    bool "gpio_mcp23s08 driver"
    default y
    select BLAH
    depends on MEH
    help
    Enable support for gpio_mcp23s08 driver
    if gpio_mcp23s08
    module = gpio_mcp23s08
    module-str = gpio_mcp23s08
    source "subsys/logging/Kconfig.template.log_config"
    endif
    7 the file module.yml
  • add line
    build:
    cmake: .
    kconfig: Kconfig
    8 the files gpio_mcp23s08.c/.h
    9 the folder dts/bindings/gpio
    10 the file dts/bindings/gpio/microchip,mcp23s08.yaml

But when I try to compile, I get the error:
-> warning: attempt to assign the value 'y' to the undefined symbol GPIO_MCP23S08

I've allready tried my driver in "driver in tree" and it works.
Maybe you can help me, I can't find any real documentation/sample.
thanks
Thomas Oggier

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions