The BOARD variable is not defined at the top of CmakeLists.txt on ncs2.8.0

I work test program on ncs2.8.0.

I put a reference to the BOARD variable at the top of my project's CMakeLists.txt.

When "west build -b nrf52833dk_nrf52833",  BOARD is not defined.

But,

When "cmake -GNinja -DBOARD=nrf52833dk_nrf52833 ..",  BOARD is nrf52833dk_nrf52833.

This was not a problem in ncs2.6.0.
Please tell me how to reference the BOARD in ncs2.8.0.

Parents Reply
  • Simply put,

    CMakeList.txt
    -----------------------------------------------------------------------------------------
    message("BOARD is ${BOARD}")
    ...
    find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
    project(my_project)
    ...
    -----------------------------------------------------------------------------------------
    When I run "west build -b nrf52833dk_nrf52833"

    on NCS2.6.0
    BOARD is nrf52833dk_nrf52833

    on NCS2.8.0
    BOARD is

Children
Related