a-smiggle / ruuvitag_fw_zephyr

Ruuvitag FW using Zephyr OS
MIT License
10 stars 5 forks source link

No board named 'nrf52_ruuvi' found #2

Closed beikeland closed 4 years ago

beikeland commented 4 years ago

I've tried following this, both the existing install and fresh install and end up with No board named 'nrf52_ruuvi' found in both cases, so it seems I'm missing something.

(also pip3 install -r /zephyr/scripts/requirements.txt I guess should be pip3 install -r zephyr/scripts/requirements.txt without the leading / ?)

user@hostname:~/ruuvi_zephyr$ west build -b nrf52_ruuvi zephyr/samples/basic/blinky
-- west build: generating a build system
Including boilerplate (Zephyr base): /home/user/ruuvi_zephyr/zephyr/cmake/app/boilerplate.cmake
-- Application: /home/user/ruuvi_zephyr/zephyr/samples/basic/blinky
-- Zephyr version: 2.2.99 (/home/user/ruuvi_zephyr/zephyr)
CMake Warning (dev) at /home/user/.local/lib/python3.6/site-packages/cmake/data/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args`
  (PythonInterp) does not match the name of the calling package (Zephyr).
  This can lead to problems in calling code that expects `find_package`
  result variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /home/user/ruuvi_zephyr/zephyr/cmake/backports/FindPythonInterp.cmake:174 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  /home/user/ruuvi_zephyr/zephyr/cmake/python.cmake:22 (include)
  /home/user/ruuvi_zephyr/zephyr/cmake/app/boilerplate.cmake:115 (include)
  /home/user/ruuvi_zephyr/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
  /home/user/ruuvi_zephyr/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
  CMakeLists.txt:4 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found PythonInterp: /usr/bin/python3.6 (found suitable version "3.6.8", minimum required is "3.6")
-- Board: nrf52_ruuvi
No board named 'nrf52_ruuvi' found
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
see usage:
Cleaning targets:
  clean     - Remove most generated files but keep configuration and backup files
  pristine  - Remove all files in the build directory

Configuration targets:

  menuconfig - Update configuration using an interactive configuration interface

Other generic targets:
  all          - Build a zephyr application
  run          - Build a zephyr application and run it if the board supports emulation
  flash        - Build and flash an application
  debug        - Build and debug an application using GDB
  debugserver  - Build and start a GDB server (port 1234 for Qemu targets)
  ram_report   - Build and create RAM usage report
  rom_report   - Build and create ROM usage report
  usage        - Display this text

Supported Boards:

  To generate project files for one of the supported boards below, run:

  $ cmake -DBOARD=<BOARD NAME> [-DSHIELD=<SHIELD NAME>] -Bpath/to/build_dir -Hpath/to/source_dir

  or

  $ export BOARD=<BOARD NAME>
  $ export SHIELD=<SHIELD NAME> #optional
  $ cmake -Bpath/to/build_dir -Hpath/to/source_dir

  arc:
    em_starterkit
    em_starterkit_em11d
    em_starterkit_em7d
    em_starterkit_em7d_normal
    em_starterkit_em7d_v22
    emsdp
    emsdp_em4
    emsdp_em5d
    emsdp_em6
    emsdp_em7d
    emsdp_em7d_esp
    emsdp_em9d
    hsdk
    iotdk
    nsim_em
    nsim_em_mpu_stack_guard
    nsim_hs
    nsim_hs_smp
    nsim_sem
    nsim_sem_mpu_stack_guard
    nsim_sem_normal
  arm:
    96b_argonkey
    96b_avenger96
    96b_carbon
    96b_carbon_nrf51
    96b_meerkat96
    96b_neonkey
    96b_nitrogen
    96b_stm32_sensor_mez
    96b_wistrio
    actinius_icarus
    actinius_icarus_ns
    adafruit_feather_m0_basic_proto
    adafruit_feather_nrf52840
    adafruit_feather_stm32f405
    adafruit_trinket_m0
    arduino_due
    arduino_zero
    atsamd20_xpro
    atsamd21_xpro
    atsame54_xpro
    atsamr21_xpro
    b_l072z_lrwan1
    bbc_microbit
    bcm958401m2
    bl652_dvk
    bl654_dvk
    black_f407ve
    cc1352r1_launchxl
    cc26x2r1_launchxl
    cc3220sf_launchxl
    cc3235sf_launchxl
    colibri_imx7d_m4
    cy8ckit_062_wifi_bt_m0
    cy8ckit_062_wifi_bt_m4
    decawave_dwm1001_dev
    degu_evk
    disco_l475_iot1
    dragino_lsn50
    efm32gg_stk3701a
    efm32hg_slstk3400a
    efm32pg_stk3402a
    efm32pg_stk3402a_jg
    efm32wg_stk3800
    efr32_radio_brd4104a
    efr32_radio_brd4250b
    efr32_slwstk6061a
    efr32mg_sltb004a
    frdm_k22f
    frdm_k64f
    frdm_k82f
    frdm_kl25z
    frdm_kw41z
    google_kukui
    hexiwear_k64
    hexiwear_kw40z
    holyiot_yj16019
    ip_k66f
    lpcxpresso54114_m0
    lpcxpresso54114_m4
    lpcxpresso55s69_cpu0
    lpcxpresso55s69_cpu1
    lpcxpresso55s69_ns
    mec1501modular_assy6885
    mec15xxevb_assy6853
    mec2016evb_assy6797
    mikroe_mini_m4_for_stm32
    mimxrt1010_evk
    mimxrt1015_evk
    mimxrt1020_evk
    mimxrt1050_evk
    mimxrt1050_evk_qspi
    mimxrt1060_evk
    mimxrt1060_evk_hyperflash
    mimxrt1064_evk
    mm_swiftio
    mps2_an385
    mps2_an521
    mps2_an521_nonsecure
    msp_exp432p401r_launchxl
    nrf51_ble400
    nrf51_blenano
    nrf51_vbluno51
    nrf51dk_nrf51422
    nrf51dongle_nrf51422
    nrf52832_mdk
    nrf52833dk_nrf52833
    nrf52840_blip
    nrf52840_mdk
    nrf52840_papyr
    nrf52840dk_nrf52811
    nrf52840dk_nrf52840
    nrf52840dongle_nrf52840
    nrf52_adafruit_feather
    nrf52_blenano2
    nrf52_sparkfun
    nrf52_vbluno52
    nrf52dk_nrf52810
    nrf52dk_nrf52832
    nrf5340pdk_nrf5340_cpuapp
    nrf5340pdk_nrf5340_cpuappns
    nrf5340pdk_nrf5340_cpunet
    nrf9160dk_nrf52840
    nrf9160dk_nrf9160
    nrf9160dk_nrf9160ns
    nucleo_f030r8
    nucleo_f070rb
    nucleo_f091rc
    nucleo_f103rb
    nucleo_f207zg
    nucleo_f302r8
    nucleo_f303re
    nucleo_f334r8
    nucleo_f401re
    nucleo_f411re
    nucleo_f412zg
    nucleo_f413zh
    nucleo_f429zi
    nucleo_f446re
    nucleo_f746zg
    nucleo_f756zg
    nucleo_f767zi
    nucleo_g071rb
    nucleo_g431rb
    nucleo_g474re
    nucleo_h743zi
    nucleo_l053r8
    nucleo_l073rz
    nucleo_l152re
    nucleo_l432kc
    nucleo_l452re
    nucleo_l476rg
    nucleo_l496zg
    nucleo_l4r5zi
    nucleo_wb55rg
    olimex_stm32_e407
    olimex_stm32_h407
    olimex_stm32_p405
    olimexino_stm32
    particle_argon
    particle_boron
    particle_xenon
    pico_pi_m4
    qemu_cortex_a53
    qemu_cortex_m0
    qemu_cortex_m3
    qemu_cortex_r5
    reel_board
    reel_board_v2
    sam4e_xpro
    sam4s_xplained
    sam_e70_xplained
    sam_e70b_xplained
    sam_v71_xult
    sam_v71b_xult
    sensortile_box
    steval_fcu001v1
    stm3210c_eval
    stm32373c_eval
    stm32_min_dev_black
    stm32_min_dev_blue
    stm32f030_demo
    stm32f072_eval
    stm32f072b_disco
    stm32f0_disco
    stm32f3_disco
    stm32f411e_disco
    stm32f412g_disco
    stm32f429i_disc1
    stm32f469i_disco
    stm32f4_disco
    stm32f723e_disco
    stm32f746g_disco
    stm32f769i_disco
    stm32g0316_disco
    stm32h747i_disco_m4
    stm32h747i_disco_m7
    stm32l1_disco
    stm32l476g_disco
    stm32l496g_disco
    stm32mp157c_dk2
    stm32vl_disco
    thingy52_nrf52832
    twr_ke18f
    twr_kv58f220m
    udoo_neo_full_m4
    usb_kw24d512
    v2m_beetle
    v2m_musca
    v2m_musca_nonsecure
    v2m_musca_b1
    v2m_musca_b1_nonsecure
    warp7_m4
  nios2:
    altera_max10
    qemu_nios2
  posix:
    native_posix_64
    native_posix
    nrf52_bsim
  riscv:
    hifive1
    hifive1_revb
    litex_vexriscv
    m2gl025_miv
    qemu_riscv32
    qemu_riscv64
    rv32m1_vega_ri5cy
    rv32m1_vega_zero_riscy
  x86:
    acrn
    gpmrb
    minnowboard
    qemu_x86_64
    qemu_x86_coverage
    qemu_x86
    qemu_x86_nommu
    up_squared
  xtensa:
    esp32
    intel_s1000_crb
    odroid_go
    qemu_xtensa
    up_squared_adsp
    xt-sim
    xt-sim_intel_s1000

Supported Shields:

 adafruit_2_8_tft_touch_v2
 boostxl_ulpsense
 dfrobot_can_bus_v2_0
 frdm_cr20a
 frdm_kw41z
 link_board_eth
 lmp90100_evb
 mikroe_adc_click
 nrf52840dk_nrf52840
 sparkfun_sara_r4
 reel_board
 sh1106_128x64
 ssd1306_128x32
 ssd1306_128x64
 st7789v_tl019fqv01
 st7789v_waveshare_240x240
 waveshare_epaper_gdeh0213b1
 waveshare_epaper_gdeh0213b72
 waveshare_epaper_gdeh029a1
 waveshare_epaper_gdew075t7
 frdm_k64f
 nrf52840dk_nrf52840
 wnc_m14a2a
 stm32mp157c_dk2
 x_nucleo_idb05a1
 x_nucleo_iks01a1
 stm32mp157c_dk2
 x_nucleo_iks01a2
 stm32mp157c_dk2
 stm32mp157c_dk2
 x_nucleo_iks01a3
 x_nucleo_iks01a3_shub

Build flags:

  ninja -v [targets] verbose build
  cmake -DW=n   Enable extra gcc checks, n=1,2,3 where
   1: warnings which may be relevant and do not occur too often
   2: warnings which occur quite often but may still be relevant
   3: more obscure warnings, can most likely be ignored
   Multiple levels can be combined with W=12 or W=123
CMake Error at /home/user/ruuvi_zephyr/zephyr/cmake/app/boilerplate.cmake:409 (message):
  Invalid usage
Call Stack (most recent call first):
  /home/user/ruuvi_zephyr/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
  /home/user/ruuvi_zephyr/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
  CMakeLists.txt:4 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/user/ruuvi_zephyr/build/CMakeFiles/CMakeOutput.log".
FATAL ERROR: command exited with status 1: /home/user/.local/bin/cmake -B/home/user/ruuvi_zephyr/build -S/home/user/ruuvi_zephyr/zephyr/samples/basic/blinky -GNinja -DBOARD=nrf52_ruuvi
user@hostname:~/ruuvi_zephyr$
beikeland commented 4 years ago

\ maybe this is cleaner into an existing install?

git clone https://github.com/theBASTI0N/zephyr-ruuvi.git ~/zephyr-ruuvi
ln -s ~/zephyr-ruuvi/boards/arm/nrf52_ruuvi ~/zephyrproject/zephyr/boards/arm

\

made some progress by copying from ~/ruuvi_zephyr/ruuvitag to ~/ruuvi_zephyr/zephyr which is missing in instructions. will keep poking at the UART failure.

user@hostname:~/ruuvi_zephyr$ ls
bootloader  build  modules  ruuvitag  tools  zephyr
user@hostname:~/ruuvi_zephyr$ ls ruuvitag/boards/arm/
nrf52_ruuvi
user@hostname:~/ruuvi_zephyr$ cp -r ruuvitag/boards/arm/nrf52_ruuvi zephyr/boards/arm
cd zephyr
user@hostname:~/ruuvi_zephyr/zephyr$ west build -p auto -b nrf52_ruuvi samples/basic/blinky/
-- west build: making build dir /home/user/ruuvi_zephyr/zephyr/build pristine
-- west build: generating a build system
Including boilerplate (Zephyr base): /home/user/ruuvi_zephyr/zephyr/cmake/app/boilerplate.cmake
-- Application: /home/user/ruuvi_zephyr/zephyr/samples/basic/blinky
-- Zephyr version: 2.2.99 (/home/user/ruuvi_zephyr/zephyr)
CMake Warning (dev) at /home/user/.local/lib/python3.6/site-packages/cmake/data/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args`
  (PythonInterp) does not match the name of the calling package (Zephyr).
  This can lead to problems in calling code that expects `find_package`
  result variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /home/user/ruuvi_zephyr/zephyr/cmake/backports/FindPythonInterp.cmake:174 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  /home/user/ruuvi_zephyr/zephyr/cmake/python.cmake:22 (include)
  /home/user/ruuvi_zephyr/zephyr/cmake/app/boilerplate.cmake:115 (include)
  /home/user/ruuvi_zephyr/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
  /home/user/ruuvi_zephyr/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
  CMakeLists.txt:4 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found PythonInterp: /usr/bin/python3.6 (found suitable version "3.6.8", minimum required is "3.6")
-- Board: nrf52_ruuvi
-- Found west: /home/user/.local/bin/west (found suitable version "0.7.2", minimum required is "0.7.1")
-- Found toolchain: zephyr (/home/user/zephyr-sdk-0.11.2)
-- Found BOARD.dts: /home/user/ruuvi_zephyr/zephyr/boards/arm/nrf52_ruuvi/nrf52_ruuvi.dts
nrf52_ruuvi.dts.pre.tmp:122.22-130.5: Warning (unique_unit_address_if_enabled): /soc/i2c@40003000: duplicate unit-address (also used in node /soc/spi@40003000)
  also defined at nrf52_ruuvi.dts.pre.tmp:363.7-369.3
-- Generated zephyr.dts: /home/user/ruuvi_zephyr/zephyr/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /home/user/ruuvi_zephyr/zephyr/build/zephyr/include/generated/devicetree_unfixed.h
Parsing /home/user/ruuvi_zephyr/zephyr/Kconfig
Loaded configuration '/home/user/ruuvi_zephyr/zephyr/boards/arm/nrf52_ruuvi/nrf52_ruuvi_defconfig'
Merged configuration '/home/user/ruuvi_zephyr/zephyr/samples/basic/blinky/prj.conf'

error: UART_0_NRF_UART (defined at drivers/serial/Kconfig.nrfx:25) is assigned in a configuration
file, but is not directly user-configurable (has no prompt). It gets its value indirectly from other
symbols. See http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_UART_0_NRF_UART.html
and/or look up UART_0_NRF_UART 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.

CMake Error at /home/user/ruuvi_zephyr/zephyr/cmake/kconfig.cmake:217 (message):
  command failed with return code: 1
Call Stack (most recent call first):
  /home/user/ruuvi_zephyr/zephyr/cmake/app/boilerplate.cmake:504 (include)
  /home/user/ruuvi_zephyr/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
  /home/user/ruuvi_zephyr/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
  CMakeLists.txt:4 (find_package)

-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: /home/user/.local/bin/cmake -B/home/user/ruuvi_zephyr/zephyr/build -S/home/user/ruuvi_zephyr/zephyr/samples/basic/blinky -GNinja -DBOARD=nrf52_ruuvi
user@hostname:~/ruuvi_zephyr/zephyr$
theBASTI0N commented 4 years ago

Hey,

Thanks for noticing the mistake in the instructions.

I have updated them and your should be able to build it now.

just run west build && west flash

when in the ruuvi folder

beikeland commented 4 years ago

Seems there is another issue, possibly relating to this being made for 2.2.0 and the current is 2.2.9

diff --git a/boards/arm/nrf52_ruuvi/nrf52_ruuvi_defconfig b/boards/arm/nrf52_ruuvi/nrf52_ruuvi_defconfig
index 2424555..16836ae 100644
--- a/boards/arm/nrf52_ruuvi/nrf52_ruuvi_defconfig
+++ b/boards/arm/nrf52_ruuvi/nrf52_ruuvi_defconfig
@@ -14,7 +14,7 @@ CONFIG_GPIO=y

 # enable uart driver
 CONFIG_SERIAL=y
-CONFIG_UART_0_NRF_UART=y
+#CONFIG_UART_0_NRF_UART=y

 # enable console
 CONFIG_CONSOLE=y

enables me to build west build -p auto -b nrf52_ruuvi samples/bluetooth/hci_uart, now I just need to flash it somehow.

thanks for doing the ground work!

theBASTI0N commented 4 years ago

Hey Try the last commit.

If you copy the nrf52_ruuvi to zephyr/boards/arm you will be able to build the hci_uart example with build -b nrf52_ruuvi. My included example needs some work to be able to build again against this new version of Zephyr.

beikeland commented 4 years ago

Thank you so much!