apache / mynewt-newt

An OS to build, deploy and securely manage billions of devices
https://mynewt.apache.org/
Apache License 2.0
117 stars 96 forks source link

[restrictions] Not able to use a string comparison as a restriction #443

Open vrahane opened 3 years ago

vrahane commented 3 years ago

Currently this does not work, spi0 needs to be made a choice for it to work or a workaround is to use it as a value and use the # operator to convert it to a string.

syscfg.defs:
    CHIP_ONB:
        description: 'On board chip'
        value: 1
        restrictions:
            - 'CHIP_ONB_SPI_BUS == "spi0"'

    CHIP_ONB_SPI_BUS:
        value: 'spi0'