Skip to content

nrf52_blenano2 tmp112 sensor sample build failed. #8391

@leodesigner

Description

@leodesigner

Hi,
Trying to build a samples/sensor/tmp112/ on the custom board (similar to the nrf52_blenano2).
But seems some definitions for i2c bus are missed :(

cmake -GNinja -DBOARD=nrf52_blenano2 ..
ninja
...
-- Generating zephyr/include/generated/generated_dts_board.h
-- Cache files will be written to: /home/axel/.cache/zephyr
-- Configuring done
-- Generating done
-- Build files have been written to: /home/axel/nrf52/tmp112/build
[100/133] Building C object zephyr/drivers/i2c/CMakeFiles/drivers__i2c.dir/i2c_nrf5.c.obj
FAILED: ccache /home/axel/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-gcc -DKERNEL -DNRF52832_XXAA -D_FORTIFY_SOURCE=2 -D__ZEPHYR_SUPERVISOR__ -D__ZEPHYR__=1 -I/home/axel/zephyr-current/kernel/include -I/home/axel/zephyr-current/arch/arm/include -I/home/axel/zephyr-current/arch/arm/soc/nordic_nrf/nrf52 -I/home/axel/zephyr-current/arch/arm/soc/nordic_nrf/nrf52/include -I/home/axel/zephyr-current/arch/arm/soc/nordic_nrf/include -I/home/axel/zephyr-current/boards/arm/nrf52_blenano2 -I/home/axel/zephyr-current/include -I/home/axel/zephyr-current/include/drivers -Izephyr/include/generated -isystem /home/axel/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/lib/arm-zephyr-eabi/gcc/arm-zephyr-eabi/6.2.0/include -isystem /home/axel/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/lib/arm-zephyr-eabi/gcc/arm-zephyr-eabi/6.2.0/include-fixed -I/home/axel/zephyr-current/lib/libc/minimal/include -I/home/axel/zephyr-current/ext/hal/cmsis/Include -I/home/axel/zephyr-current/ext/hal/nordic/nrfx -I/home/axel/zephyr-current/ext/hal/nordic/nrfx/drivers/include -I/home/axel/zephyr-current/ext/hal/nordic/nrfx/hal -I/home/axel/zephyr-current/ext/hal/nordic/nrfx/mdk -I/home/axel/zephyr-current/ext/hal/nordic/. -I/home/axel/zephyr-current/subsys/bluetooth -Os -g -Wall -Wformat -Wformat-security -Wno-format-zero-length -imacros /home/axel/nrf52/tmp112/build/zephyr/include/generated/autoconf.h -ffreestanding -Wno-main --sysroot /home/axel/zephyr-sdk/sysroots/armv5-zephyr-eabi/usr -mthumb -mcpu=cortex-m4 -std=c99 -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -Wno-pointer-sign -Wno-unused-but-set-variable -fno-reorder-functions -fno-defer-pop -Werror=implicit-int -ffunction-sections -fdata-sections -mabi=aapcs -march=armv7e-m -MD -MT zephyr/drivers/i2c/CMakeFiles/drivers__i2c.dir/i2c_nrf5.c.obj -MF zephyr/drivers/i2c/CMakeFiles/drivers__i2c.dir/i2c_nrf5.c.obj.d -o zephyr/drivers/i2c/CMakeFiles/drivers__i2c.dir/i2c_nrf5.c.obj   -c /home/axel/zephyr-current/drivers/i2c/i2c_nrf5.c
/home/axel/zephyr-current/drivers/i2c/i2c_nrf5.c:349:35: error: ‘NORDIC_NRF5_I2C_40003000_BASE_ADDRESS’ undeclared here (not in a function)
  .base = (volatile NRF_TWI_Type *)CONFIG_I2C_0_BASE_ADDR,
                                   ^~~~~~~~~~~~~~~~~~~~~~~              
/home/axel/zephyr-current/drivers/i2c/i2c_nrf5.c:351:13: error: ‘NORDIC_NRF5_I2C_40003000_CLOCK_FREQUENCY’ undeclared here (not in a function)
  .bitrate = CONFIG_I2C_0_BITRATE,
             ^~~~~~~~~~~~~~~~~~~~~                   
/home/axel/zephyr-current/drivers/i2c/i2c_nrf5.c:360:135: error: ‘NORDIC_NRF5_I2C_40003000_LABEL’ undeclared here (not in a function)
 DEVICE_AND_API_INIT(i2c_nrf5_0, CONFIG_I2C_0_NAME, i2c_nrf5_init,
                                                                                                                                       ^                             
/home/axel/zephyr-current/drivers/i2c/i2c_nrf5.c: In function ‘i2c_nrf5_config_func_0’:
/home/axel/zephyr-current/drivers/i2c/i2c_nrf5.c:367:130: error: ‘NORDIC_NRF5_I2C_40003000_IRQ_0’ undeclared (first use in this function)
  IRQ_CONNECT(CONFIG_I2C_0_IRQ, CONFIG_I2C_0_IRQ_PRI, i2c_nrf5_isr,
                                                                                                                                  ^                             
/home/axel/zephyr-current/drivers/i2c/i2c_nrf5.c:367:130: note: each undeclared identifier is reported only once for each function it appears in
/home/axel/zephyr-current/drivers/i2c/i2c_nrf5.c:367:265: error: ‘NORDIC_NRF5_I2C_40003000_IRQ_0_PRIORITY’ undeclared (first use in this function)
  IRQ_CONNECT(CONFIG_I2C_0_IRQ, CONFIG_I2C_0_IRQ_PRI, i2c_nrf5_isr,
                                                                                                                                                                                                                                                                         ^                                      
[100/133] Building C object zephyr/drivers/serial/CMakeFiles/drivers__serial.dir/uart_nrfx_uart.c.obj
ninja: build stopped: subcommand failed.
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThe issue is a bug, or the PR is fixing a bug

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions