Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nrf52_blenano2 tmp112 sensor sample build failed. #8391

Closed
leodesigner opened this issue Jun 14, 2018 · 1 comment
Closed

nrf52_blenano2 tmp112 sensor sample build failed. #8391

leodesigner opened this issue Jun 14, 2018 · 1 comment
Labels
bug The issue is a bug, or the PR is fixing a bug

Comments

@leodesigner
Copy link

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.
...
@nashif nashif added the bug The issue is a bug, or the PR is fixing a bug label Jun 14, 2018
mandarcthorat1 added a commit to mandarcthorat1/zephyr that referenced this issue Jun 15, 2018
Fixes zephyrproject-rtos#8391

Enables the i2c drivers for these boards.
Required to enable i2c with these boards.
Tested samples/sensor/tmp112 for nrf52_blenano2
with i2c enabled.

Signed-off-by: Mandar Chandrakant Thorat <mandar.chandrakant.thorat@intel.com>
nashif pushed a commit that referenced this issue Jun 21, 2018
Fixes #8391

Enables the i2c drivers for these boards.
Required to enable i2c with these boards.
Tested samples/sensor/tmp112 for nrf52_blenano2
with i2c enabled.

Signed-off-by: Mandar Chandrakant Thorat <mandar.chandrakant.thorat@intel.com>
@leodesigner
Copy link
Author

Just tested again,
Now we have a double definitions :(

[2/114] Building C object zephyr/CMakeFiles/zephyr.dir/ext/hal/nordic/nrfx/drivers/src/nrfx_twim.c.obj
[3/114] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/random/rand32_entropy_device.c.obj
[4/114] Building C object zephyr/CMakeFiles/zephyr.dir/drivers/clock_control/nrf5_power_clock.c.obj
[5/114] Building C object zephyr/CMakeFiles/zephyr.dir/drivers/console/uart_console.c.obj
[6/114] Building C object zephyr/CMakeFiles/zephyr.dir/drivers/timer/sys_clock_init.c.obj
In file included from /home/axel/zephyr-current/include/arch/arm/arch.h:20:0,
                 from /home/axel/zephyr-current/include/arch/cpu.h:15,
                 from /home/axel/zephyr-current/include/kernel.h:36,
                 from /home/axel/zephyr-current/subsys/random/rand32_entropy_device.c:8:
zephyr/include/generated/generated_dts_board.h:127:0: warning: "CONFIG_I2C_0_NAME" redefined
 #define CONFIG_I2C_0_NAME  NORDIC_NRF5_I2C_40003000_LABEL
 
In file included from <command-line>:0:0:
/home/axel/nrf52/tmp112/build/zephyr/include/generated/autoconf.h:187:0: note: this is the location of the previous defin
ition
 #define CONFIG_I2C_0_NAME "I2C_0"
 
In file included from /home/axel/zephyr-current/include/arch/arm/arch.h:20:0,
                 from /home/axel/zephyr-current/include/arch/cpu.h:15,
                 from /home/axel/zephyr-current/include/kernel.h:36,
                 from /home/axel/zephyr-current/subsys/random/rand32_entropy_device.c:8:
zephyr/include/generated/generated_dts_board.h:129:0: warning: "CONFIG_I2C_0_IRQ_PRI" redefined
 #define CONFIG_I2C_0_IRQ_PRI  NORDIC_NRF5_I2C_40003000_IRQ_0_PRIORITY
 
In file included from <command-line>:0:0:
/home/axel/nrf52/tmp112/build/zephyr/include/generated/autoconf.h:189:0: note: this is the location of the previous defin
ition
 #define CONFIG_I2C_0_IRQ_PRI
 
[7/114] Building C object zephyr/CMakeFiles/zephyr.dir/drivers/timer/nrf_rtc_timer.c.obj
In file included from /home/axel/zephyr-current/include/arch/arm/arch.h:20:0,
                 from /home/axel/zephyr-current/include/arch/cpu.h:15,
                 from /home/axel/zephyr-current/include/kernel.h:36,
                 from /home/axel/zephyr-current/drivers/console/uart_console.c:16:
zephyr/include/generated/generated_dts_board.h:127:0: warning: "CONFIG_I2C_0_NAME" redefined
 #define CONFIG_I2C_0_NAME  NORDIC_NRF5_I2C_40003000_LABEL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

No branches or pull requests

2 participants