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

samples/boards/nrf/battery does not build #23853

Closed
SebastianBoe opened this issue Mar 27, 2020 · 2 comments
Closed

samples/boards/nrf/battery does not build #23853

SebastianBoe opened this issue Mar 27, 2020 · 2 comments
Labels
area: Samples Samples bug The issue is a bug, or the PR is fixing a bug

Comments

@SebastianBoe
Copy link
Collaborator

SebastianBoe commented Mar 27, 2020

The sample samples/boards/nrf/battery does not build for platform nrf52_pca20020 on the latest master.

That platform is in the sample.yaml's whitelist, so it should be supported.

Perhaps there has been some backwards-incompatible change to DT voltage.

sebo@ubuntu:~/ncs/zephyr/samples/boards/nrf/battery$ cbm
cbm
-- Application: /home/sebo/ncs/zephyr/samples/boards/nrf/battery
-- Zephyr version: 2.2.99
-- Found PythonInterp: /usr/bin/python3.6 (found suitable version "3.6.9", minimum required is "3.6") 
-- Board: nrf52_pca10040
-- Found west: /home/sebo/.local/bin/west (found suitable version "0.7.2", minimum required is "0.7.1")
-- Found toolchain: zephyr (/home/sebo/zephyr-sdk-0.11.2)
-- Found BOARD.dts: /home/sebo/ncs/zephyr/boards/arm/nrf52_pca10040/nrf52_pca10040.dts
-- Generated zephyr.dts: /home/sebo/ncs/zephyr/samples/boards/nrf/battery/b/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /home/sebo/ncs/zephyr/samples/boards/nrf/battery/b/zephyr/include/generated/devicetree_unfixed.h
Parsing /home/sebo/ncs/zephyr/Kconfig
Loaded configuration '/home/sebo/ncs/zephyr/boards/arm/nrf52_pca10040/nrf52_pca10040_defconfig'
Merged configuration '/home/sebo/ncs/zephyr/samples/boards/nrf/battery/prj.conf'
Configuration saved to '/home/sebo/ncs/zephyr/samples/boards/nrf/battery/b/zephyr/.config'
Kconfig header saved to '/home/sebo/ncs/zephyr/samples/boards/nrf/battery/b/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 9.2.0
-- The CXX compiler identification is GNU 9.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/sebo/zephyr-sdk-0.11.2/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
-- Cache files will be written to: /home/sebo/.cache/zephyr
-- Configuring done
-- Generating done
-- Build files have been written to: /home/sebo/ncs/zephyr/samples/boards/nrf/battery/b
sebo@ubuntu:~/ncs/zephyr/samples/boards/nrf/battery$ cd b/
cd b/
sebo@ubuntu:~/ncs/zephyr/samples/boards/nrf/battery/b$ ninja app
ninja app
[1/11] Preparing syscall dependency handling

[2/11] Generating misc/generated/syscalls_subdirs.trigger
[3/11] Generating misc/generated/syscalls.json, misc/generated/subsystems.json
[4/11] Generating include/generated/syscall_dispatch.c, include/generated/syscall_list.h
[5/11] Generating include/generated/kobj-types-enum.h, include/generated/otype-to-str.h
[6/11] Generating include/generated/driver-validation.h
[7/11] Building C object zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
[8/11] Generating include/generated/offsets.h
[9/11] Building C object CMakeFiles/app.dir/src/main.c.obj
[10/11] Building C object CMakeFiles/app.dir/src/battery.c.obj
FAILED: CMakeFiles/app.dir/src/battery.c.obj 
ccache /home/sebo/zephyr-sdk-0.11.2/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DBUILD_VERSION=zephyr-v2.2.0-710-gfbd8cff09043 -DKERNEL -DNRF52832_XXAA -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -I/home/sebo/ncs/zephyr/include -Izephyr/include/generated -I/home/sebo/ncs/zephyr/soc/arm/nordic_nrf/nrf52 -I/home/sebo/ncs/modules/hal/cmsis/CMSIS/Core/Include -I/home/sebo/ncs/modules/hal/nordic/nrfx -I/home/sebo/ncs/modules/hal/nordic/nrfx/drivers/include -I/home/sebo/ncs/modules/hal/nordic/nrfx/mdk -I/home/sebo/ncs/modules/hal/nordic/. -I/home/sebo/ncs/modules/debug/segger/rtt -isystem /home/sebo/ncs/zephyr/lib/libc/minimal/include -isystem /home/sebo/zephyr-sdk-0.11.2/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/9.2.0/include -isystem /home/sebo/zephyr-sdk-0.11.2/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/9.2.0/include-fixed -Os -imacros/home/sebo/ncs/zephyr/samples/boards/nrf/battery/b/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -mcpu=cortex-m4 -mthumb -imacros/home/sebo/ncs/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-address-of-packed-member -Wno-pointer-sign -Wpointer-arith -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/home/sebo/ncs/zephyr/samples/boards/nrf/battery=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/sebo/ncs/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/home/sebo/ncs=WEST_TOPDIR -ffunction-sections -fdata-sections -mabi=aapcs -march=armv7e-m -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/src/battery.c.obj -MF CMakeFiles/app.dir/src/battery.c.obj.d -o CMakeFiles/app.dir/src/battery.c.obj   -c ../src/battery.c
../src/battery.c:54:16: error: 'DT_VOLTAGE_DIVIDER_VBATT_IO_CHANNELS' undeclared here (not in a function)
   54 |  .io_channel = DT_VOLTAGE_DIVIDER_VBATT_IO_CHANNELS,
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/battery.c:58:16: error: 'DT_VOLTAGE_DIVIDER_VBATT_OUTPUT_OHMS' undeclared here (not in a function)
   58 |  .output_ohm = DT_VOLTAGE_DIVIDER_VBATT_OUTPUT_OHMS,
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/battery.c:59:14: error: 'DT_VOLTAGE_DIVIDER_VBATT_FULL_OHMS' undeclared here (not in a function)
   59 |  .full_ohm = DT_VOLTAGE_DIVIDER_VBATT_FULL_OHMS,
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.
@SebastianBoe SebastianBoe added bug The issue is a bug, or the PR is fixing a bug area: Samples Samples labels Mar 27, 2020
@SebastianBoe
Copy link
Collaborator Author

@pabigot : FYI

@SebastianBoe
Copy link
Collaborator Author

User-error, I used the wrong board.

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

No branches or pull requests

1 participant