Skip to content

Commit

Permalink
fix: boilerplate.cmake was orphaned, so ZEPHYR_BASE's cmake extension…
Browse files Browse the repository at this point in the history
…s were not found. Fixed by adding to zephyr.cmake
  • Loading branch information
randomshinichi committed Apr 16, 2019
1 parent b08c10d commit dcffab5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmake/zephyr.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# https://github.com/zephyrproject-rtos/zephyr/blob/master/samples/application_development/external_lib/CMakeLists.txt#L17
set_property(GLOBAL PROPERTY CSTD c11)
include(ExternalProject)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)

zephyr_get_include_directories_for_lang_as_string( C includes)
zephyr_get_system_include_directories_for_lang_as_string(C system_includes)
Expand Down

4 comments on commit dcffab5

@lorepieri8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solves #166.

@lorepieri8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get this:

root@3e5b46fa1a8b:/zephyrproject/zephyr/samples/anyledger/anyledger-wallet/build# cmake -GNinja -DBOARD=nrf52840_pca10056 -DBUILD_XCOMPILE=1 ../
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.6.7", minimum required is "3") 
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.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
Zephyr version: 1.14.99
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.6.7", minimum required is "3.4") 
-- Selected BOARD nrf52840_pca10056
-- Loading /zephyrproject/zephyr/boards/arm/nrf52840_pca10056/nrf52840_pca10056.dts as base
-- Overlaying /zephyrproject/zephyr/dts/common/common.dts
nrf52840_pca10056.dts.pre.tmp:312.23-315.5: Warning (simple_bus_reg): /soc/virtualcom: missing or empty reg/ranges property
Parsing Kconfig tree in /zephyrproject/zephyr/Kconfig
Loading /zephyrproject/zephyr/boards/arm/nrf52840_pca10056/nrf52840_pca10056_defconfig as base
Merging /zephyrproject/zephyr/samples/anyledger/anyledger-wallet/prj.conf

/zephyrproject/zephyr/samples/anyledger/anyledger-wallet/prj.conf:6: warning: attempt to assign the value 'y' to the undefined symbol HTTP

/zephyrproject/zephyr/samples/anyledger/anyledger-wallet/prj.conf:7: warning: attempt to assign the value 'y' to the undefined symbol HTTP_CLIENT

/zephyrproject/zephyr/samples/anyledger/anyledger-wallet/prj.conf:8: warning: attempt to assign the value '20' to the undefined symbol HTTP_CLIENT_NETWORK_TIMEOUT

Error: Aborting due to non-whitelisted Kconfig warning
'/zephyrproject/zephyr/samples/anyledger/anyledger-wallet/prj.conf:6: warning: attempt to assign the
value 'y' to the undefined symbol HTTP'. Note: If this warning doesn't point to an actual problem,
you can add it to the whitelist at the top of /zephyrproject/zephyr/scripts/kconfig/kconfig.py.

CMake Error at /zephyrproject/zephyr/cmake/kconfig.cmake:193 (message):
  command failed with return code: 1
Call Stack (most recent call first):
  /zephyrproject/zephyr/cmake/app/boilerplate.cmake:400 (include)
  cmake/zephyr.cmake:6 (include)
  CMakeLists.txt:18 (include)


-- Configuring incomplete, errors occurred!
See also "/zephyrproject/zephyr/samples/anyledger/anyledger-wallet/build/CMakeFiles/CMakeOutput.log"

@lorepieri8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be related to zephyrproject-rtos/zephyr#9573

@lorepieri8
Copy link
Member

@lorepieri8 lorepieri8 commented on dcffab5 Apr 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get this:

root@3e5b46fa1a8b:/zephyrproject/zephyr/samples/anyledger/anyledger-wallet/build# cmake -GNinja -DBOARD=nrf52840_pca10056 -DBUILD_XCOMPILE=1 ../
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.6.7", minimum required is "3") 
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.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
Zephyr version: 1.14.99
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.6.7", minimum required is "3.4") 
-- Selected BOARD nrf52840_pca10056
-- Loading /zephyrproject/zephyr/boards/arm/nrf52840_pca10056/nrf52840_pca10056.dts as base
-- Overlaying /zephyrproject/zephyr/dts/common/common.dts
nrf52840_pca10056.dts.pre.tmp:312.23-315.5: Warning (simple_bus_reg): /soc/virtualcom: missing or empty reg/ranges property
Parsing Kconfig tree in /zephyrproject/zephyr/Kconfig
Loading /zephyrproject/zephyr/boards/arm/nrf52840_pca10056/nrf52840_pca10056_defconfig as base
Merging /zephyrproject/zephyr/samples/anyledger/anyledger-wallet/prj.conf

/zephyrproject/zephyr/samples/anyledger/anyledger-wallet/prj.conf:6: warning: attempt to assign the value 'y' to the undefined symbol HTTP

/zephyrproject/zephyr/samples/anyledger/anyledger-wallet/prj.conf:7: warning: attempt to assign the value 'y' to the undefined symbol HTTP_CLIENT

/zephyrproject/zephyr/samples/anyledger/anyledger-wallet/prj.conf:8: warning: attempt to assign the value '20' to the undefined symbol HTTP_CLIENT_NETWORK_TIMEOUT

Error: Aborting due to non-whitelisted Kconfig warning
'/zephyrproject/zephyr/samples/anyledger/anyledger-wallet/prj.conf:6: warning: attempt to assign the
value 'y' to the undefined symbol HTTP'. Note: If this warning doesn't point to an actual problem,
you can add it to the whitelist at the top of /zephyrproject/zephyr/scripts/kconfig/kconfig.py.

CMake Error at /zephyrproject/zephyr/cmake/kconfig.cmake:193 (message):
  command failed with return code: 1
Call Stack (most recent call first):
  /zephyrproject/zephyr/cmake/app/boilerplate.cmake:400 (include)
  cmake/zephyr.cmake:6 (include)
  CMakeLists.txt:18 (include)


-- Configuring incomplete, errors occurred!
See also "/zephyrproject/zephyr/samples/anyledger/anyledger-wallet/build/CMakeFiles/CMakeOutput.log"

I can get past this by commenting out the relevant lines in https://github.com/AnyLedger/anyledger-wallet/blob/master/prj.conf, but then I get a long list of these errors:

/Users/lorenzo/gitHubRepo/recentAnyLedgerRecentZephyr/zephyr/samples/anyledger/anyledger-wallet/build/zephyr/include/generated/syscalls/kernel.h:103: undefined reference to `z_impl_k_sem_take'
zephyr/subsys/net/ip/libsubsys__net__ip.a(net_mgmt.c.o): In function `k_sem_give':
/Users/lorenzo/gitHubRepo/recentAnyLedgerRecentZephyr/zephyr/samples/anyledger/anyledger-wallet/build/zephyr/include/generated/syscalls/kernel.h:105: undefined reference to `z_impl_k_sem_give'
zephyr/subsys/net/ip/libsubsys__net__ip.a(net_mgmt.c.o): In function `k_yield':
/Users/lorenzo/gitHubRepo/recentAnyLedgerRecentZephyr/zephyr/samples/anyledger/anyledger-wallet/build/zephyr/include/generated/syscalls/kernel.h:25: undefined reference to `z_impl_k_yield'
zephyr/subsys/net/ip/libsubsys__net__ip.a(net_mgmt.c.o): In function `k_sem_init':
/Users/lorenzo/gitHubRepo/recentAnyLedgerRecentZephyr/zephyr/samples/anyledger/anyledger-wallet/build/zephyr/include/generated/syscalls/kernel.h:101: undefined reference to `z_impl_k_sem_init'

Please sign in to comment.