Hello,
I am trying to run https://github.com/sigurdnev/fw-nrfconnect-nrf/tree/master/samples/nrf9160/i2c_scanner exampl. It is not compiling with the zephyr right now.
I am trying to use i2c3 as configured in the example, but it says that somehow this is not available.
Is there a way to fix this?
Thank you.
2> Compiling ‘i2c_nrfx_twim.c’ 2> In file included from C:/Nord/ncs/zephyr/include/toolchain.h:39:0, 2> from C:/Nord/ncs/zephyr/include/kernel_includes.h:19, 2> from C:/Nord/ncs/zephyr/include/kernel.h:17, 2> from C:/Nord/ncs/zephyr/include/device.h:11, 2> from C:/Nord/ncs/zephyr/include/drivers/i2c.h:23, 2> from C:/Nord/ncs/zephyr/drivers/i2c/i2c_nrfx_twim.c:8: 2> C:/Nord/ncs/zephyr/drivers/i2c/i2c_nrfx_twim.c:221:4: error: 'DT_NORDIC_NRF_TWIM_I2C_3_CLOCK_FREQUENCY' undeclared here (not in a function); did you mean 'DT_NORDIC_NRF_TWIM_I2C_2_CLOCK_FREQUENCY'? 2> C:/Nord/ncs/zephyr/include/toolchain/gcc.h:63:52: note: in definition of macro 'BUILD_ASSERT_MSG' 2> C:/Nord/ncs/zephyr/drivers/i2c/i2c_nrfx_twim.c:220:3: note: in expansion of macro 'I2C_NRFX_TWIM_FREQUENCY' 2> C:/Nord/ncs/zephyr/drivers/i2c/i2c_nrfx_twim.c:269:1: note: in expansion of macro 'I2C_NRFX_TWIM_DEVICE' 2> C:/Nord/ncs/zephyr/drivers/i2c/i2c_nrfx_twim.c:213:3: error: expression in static assertion is not an integer 2> C:/Nord/ncs/zephyr/include/toolchain/gcc.h:63:52: note: in definition of macro 'BUILD_ASSERT_MSG' 2> C:/Nord/ncs/zephyr/drivers/i2c/i2c_nrfx_twim.c:220:3: note: in expansion of macro 'I2C_NRFX_TWIM_FREQUENCY' 2> C:/Nord/ncs/zephyr/drivers/i2c/i2c_nrfx_twim.c:269:1: note: in expansion of macro 'I2C_NRFX_TWIM_DEVICE' 2> In file included from C:/Nord/ncs/zephyr/include/arch/arm/irq.h:18:0, 2> from C:/Nord/ncs/zephyr/include/arch/arm/arch.h:26, 2> from C:/Nord/ncs/zephyr/include/arch/cpu.h:17, 2> from C:/Nord/ncs/zephyr/include/kernel_includes.h:34, 2> from C:/Nord/ncs/zephyr/include/kernel.h:17, 2> from C:/Nord/ncs/zephyr/include/device.h:11, 2> from C:/Nord/ncs/zephyr/include/drivers/i2c.h:23, 2> from C:/Nord/ncs/zephyr/drivers/i2c/i2c_nrfx_twim.c:8: 2> C:/Nord/ncs/zephyr/drivers/i2c/i2c_nrfx_twim.c:226:15: error: 'DT_NORDIC_NRF_TWIM_I2C_3_IRQ_0' undeclared (first use in this function); did you mean 'DT_NORDIC_NRF_TWIM_I2C_2_IRQ_0'? 2> C:/Nord/ncs/zephyr/include/sw_isr_table.h:70:5: note: in definition of macro 'Z_ISR_DECLARE' 2> C:/Nord/ncs/zephyr/include/irq.h:51:2: note: in expansion of macro 'Z_ARCH_IRQ_CONNECT' 2> C:/Nord/ncs/zephyr/drivers/i2c/i2c_nrfx_twim.c:226:3: note: in expansion of macro 'IRQ_CONNECT' 2> C:/Nord/ncs/zephyr/drivers/i2c/i2c_nrfx_twim.c:269:1: note: in expansion of macro 'I2C_NRFX_TWIM_DEVICE' 2> C:/Nord/ncs/zephyr/drivers/i2c/i2c_nrfx_twim.c:226:15: note: each undeclared identifier is reported only once for each function it appears in 2> C:/Nord/ncs/zephyr/include/sw_isr_table.h:70:5: note: in definition of macro 'Z_ISR_DECLARE' 2> C:/Nord/ncs/zephyr/include/irq.h:51:2: note: in expansion of macro 'Z_ARCH_IRQ_CONNECT' 2> C:/Nord/ncs/zephyr/drivers/i2c/i2c_nrfx_twim.c:226:3: note: in expansion of macro 'IRQ_CONNECT' 2> C:/Nord/ncs/zephyr/drivers/i2c/i2c_nrfx_twim.c:269:1: note: in expansion of macro 'I2C_NRFX_TWIM_DEVICE' 2> In file included from C:/Nord/ncs/zephyr/include/arch/arm/arch.h:26:0, 2> from C:/Nord/ncs/zephyr/include/arch/cpu.h:17, 2> from C:/Nord/ncs/zephyr/include/kernel_includes.h:34, 2> from C:/Nord/ncs/zephyr/include/kernel.h:17, 2> from C:/Nord/ncs/zephyr/include/device.h:11, 2> from C:/Nord/ncs/zephyr/include/drivers/i2c.h:23, 2> from C:/Nord/ncs/zephyr/drivers/i2c/i2c_nrfx_twim.c:8: 2> C:/Nord/ncs/zephyr/drivers/i2c/i2c_nrfx_twim.c:227:8: error: 'DT_NORDIC_NRF_TWIM_I2C_3_IRQ_0_PRIORITY' undeclared (first use in this function); did you mean 'DT_NORDIC_NRF_TWIM_I2C_2_IRQ_0_PRIORITY'? 2> C:/Nord/ncs/zephyr/include/arch/arm/irq.h:82:32: note: in definition of macro 'Z_ARCH_IRQ_CONNECT' 2> C:/Nord/ncs/zephyr/drivers/i2c/i2c_nrfx_twim.c:226:3: note: in expansion of macro 'IRQ_CONNECT' 2> C:/Nord/ncs/zephyr/drivers/i2c/i2c_nrfx_twim.c:269:1: note: in expansion of macro 'I2C_NRFX_TWIM_DEVICE' 2> C:/Nord/ncs/zephyr/drivers/i2c/i2c_nrfx_twim.c:240:17: error: 'DT_NORDIC_NRF_TWIM_I2C_3_SCL_PIN' undeclared here (not in a function); did you mean 'DT_NORDIC_NRF_TWIM_I2C_2_SCL_PIN'? 2> C:/Nord/ncs/zephyr/drivers/i2c/i2c_nrfx_twim.c:269:1: note: in expansion of macro 'I2C_NRFX_TWIM_DEVICE' 2> C:/Nord/ncs/zephyr/drivers/i2c/i2c_nrfx_twim.c:241:17: error: 'DT_NORDIC_NRF_TWIM_I2C_3_SDA_PIN' undeclared here (not in a function); did you mean 'DT_NORDIC_NRF_TWIM_I2C_2_SDA_PIN'? 2> C:/Nord/ncs/zephyr/drivers/i2c/i2c_nrfx_twim.c:269:1: note: in expansion of macro 'I2C_NRFX_TWIM_DEVICE' 2> In file included from C:/Nord/ncs/zephyr/include/drivers/i2c.h:23:0, 2> from C:/Nord/ncs/zephyr/drivers/i2c/i2c_nrfx_twim.c:8: 2> C:/Nord/ncs/zephyr/drivers/i2c/i2c_nrfx_twim.c:247:9: error: 'DT_NORDIC_NRF_TWIM_I2C_3_LABEL' undeclared here (not in a function); did you mean 'DT_NORDIC_NRF_TWIM_I2C_2_LABEL'? 2> C:/Nord/ncs/zephyr/include/device.h:107:11: note: in definition of macro 'DEVICE_AND_API_INIT' 2> C:/Nord/ncs/zephyr/drivers/i2c/i2c_nrfx_twim.c:246:2: note: in expansion of macro 'DEVICE_DEFINE' 2> C:/Nord/ncs/zephyr/drivers/i2c/i2c_nrfx_twim.c:269:1: note: in expansion of macro 'I2C_NRFX_TWIM_DEVICE' Build failed