Migrating to NCS v2.0.0 "error: NRFX_TWI (defined at C:\NCS\v2.0.0\zephyr\modules\hal_nordic\nrfx\Kconfig:277"

I've been working on porting a project to NCS using VS Code as my IDE. Now that NSC v2.0.0 is out, I wanted to move to that. I found the migration guide: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/migration/migration_guide_1.x_to_2.x.html. I re-targeted the toolchain, and I found the scripts to change the include paths and pin control setup. That made that change over pretty painless; however, it did not fix an issue I was having with a TWI definition: "error: NRFX_TWI (defined at C:\NCS\v2.0.0\zephyr\modules\hal_nordic\nrfx\Kconfig:277"

It went on the state that "\build\modules\hal_nordic\nrfx\Kconfig:277 is assigned in a configuration file, but is not directly user-
configurable (has no prompt). It gets its value indirectly from other symbols. See
docs.zephyrproject.org/.../kconfig.html and/or look up NRFX_TWI in the
menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration Values,
and Kconfig - Tips and Best Practices sections of the manual might be helpful too."

I read some about those Kconfig files and compared the ones in v1.9.1 versus my new one in v2.0.0.

In v2.0.0 it looks like

config NRFX_TWI
	bool

In v1.9.1 it looks like

config NRFX_TWI
	bool "Enable TWI driver"
	depends on HAS_HW_NRF_TWI0 || HAS_HW_NRF_TWI1

The term "bool" without any value after it looks odd to me, but I'm still just learning how to understand these Kconfig files.I noticed that NRFX_TWIM is that same way along with several other entries. I tried copying the ones from v1.9.1 to v2.0.0 and it now objected to the NRFX_TWIM entry. So then I deleted it and it claimed I was over the memory boundary. I don't think that's a good fix. I couldn't find anyone else with the same problem.

Also, the link provided in the error "http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_NRFX_TWI" does not lead to valid search term. But when you take a "$" character off the end it show the values in the Kconfig file except for the ones with the empty "boot" terms.

Back to the issue, at this point I'm not sure where to look next. I doubt the Kconfig has an issue, but I'm still learning the basics of how that works.

Parents
  • I think I understand what I am looking for now, but I don't see it. The code I was upgrade from v1.9.1 to v2.0.0 is still having a problem with the I2C (TWI) settings and the PWM settings. Those were both update in a script to migrate them to the newer pinctrl overlay. That seems to be the source of my latest issues. Before, this line of code would set a PWM going:

    		pwm_pin_set_usec(pwm_dev, DT_PROP(PWM_CTRL, ch1_pin), PWM_PER_US, OFF, flags);

    DT_PROP() is giving me trouble here and where it was used for the I2C. It talks about accessing properties from the device tree in the the docs here, but with the new pinctrl setup is does not seem to address the change and the device tree does not seem to work the same. The macro seems to not work for this case. 'ch1_pin' doesn't exist. 'clock_frequency' does seem to for the I2C, but the pin and channel numbers do not seem accessible through the 'DT_PROP()' macro. Unfortunately, the documentation does not seem to address the change in how I2C, PWM and SPI properties are accessed as far as I can tell.

  • Hi

    in NCS1.9.99-,  get note pin number from follow line:

    #define I2S_MCK_PIN      DT_PROP(DT_NODELABEL(i2s0), mck_pin)
      
    how to get pin number in NCS2.0.2?
      
    Best regards
Reply Children
No Data
Related