Add device tree binding for the NXP Kinetis Low Power Timer (LPTMR)
module. This module can either act as a 16 bit counter or a 16 bit
pulse counter.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Convert older DT_INST_ macro use in atmel sam0 drivers to the new
include/devicetree.h DT_INST macro APIs.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit changes the current boilerplate include description and
instead describes the use of find_package(Zephyr)
It also add a section covering additional possibilities when using
find_package(Zephyr).
- Search order
- Zephyr repository application description
- Zephyr workspace application description
- Zephyr freestanding application description
- Environment ZEPHYR_BASE setting
- Multiple Zephyr and preference setting
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit includes the following fixes in order to remove environment
setting of ZEPHYR_BASE is west extension commands.
- Build command
west build --pristine will now use the ZEPHYR_BASE variable found
in CMakeCache.txt in the build folder.
This ensures that the pristine command is executed from the same
Zephyr that was used for compilation.
- Board command
The west boards command no longer sets Zephyr base before invoking
cmake -P cmake/boards.cmake
Instead boards.cmake uses find_package(Zephyr) to ensure consistent
behavior with Zephyr samples, so that the detection of Zephyr base is
uniform across CMake commands.
It also changes BOARD_ROOT_SPACE_SEPARATED to BOARD_ROOT in order to
be consistent with existing user documentation.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit introduces ZEPHYR_PREFER which is a list that user can
specify when compiling an application.
This allows a user who has multiple Zephyr installations in the same
work-tree to provide a list of which Zephyr to prefer.
This is an extension to CMake VERSION field, as a user who is working
with multiple Zephyr installations could face a situation where multiple
Zephyr's is having same version, as example 2.2.99, in which case CMake
version is not sufficient.
Example, workspace looking as:
/projects/workspace/zephyr
/projects/workspace/zephyr-alternate
/projects/workspace/zephyr-wip
/projects/workspace/my_app
To prefer zephyr-alternate, then zephyr-wip the my_app/CMakeLists.txt
should look as:
set(ZEPHYR_PREFER "zephyr-alternate" "zephyr-wip")
find_package(Zephyr)
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This command make it possible to use west for first time registration
of a Zephyr config package in CMake.
To register Zephyr as a CMake config package, invoke:
west zephyr-export
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
West utilizes Zephyr base when invoked out-of-tree in order to determine
west topdir.
This commit ensures that zephyr base when invoking west from CMake is
set to current zephyr base.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
With the introduction of ZephyrConfig.cmake all parts of CMake code
should rely on the CMake ZEPHYR_BASE variable instead of the environment
setting.
This ensures that after the first CMake invocation, then all subsequent
invocation in same build folder will use same zephyr base.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Fixed usage build target.
Previously, `ninja usage` would print:
Build flags:
ninja VERBOSE=1 [targets] verbose build
This is clearly wrong, as VERBOSE=1 is for make targets.
To support both ninja based builds and make based build systems, the
CMAKE_MAKE_PROGRAM is now exported from the calling CMake / build
instance, and the verbose flag is set depending on whether ninja or
make is used as build program.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Changing ZEPHYR_BASE throughout Zephyr tests and samples revealed that
intel s1000 crb cache test case could not be run on CI.
This has now been fixed by moving the tests file located in
tests/board/intel_s1000_crb folder into tests/board/intel_s1000_crb/main
instead so there is now main and cache folders with test projects.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Using find_package to locate Zephyr.
Old behavior was to use $ENV{ZEPHYR_BASE} for inclusion of boiler plate
code.
Whenever an automatic run of CMake happend by the build system / IDE
then it was required that ZEPHYR_BASE was defined.
Using ZEPHYR_BASE only to locate the Zephyr package allows CMake to
cache the base variable and thus allowing subsequent invocation even
if ZEPHYR_BASE is not set in the environment.
It also removes the risk of strange build results if a user switchs
between different Zephyr based project folders and forgetting to reset
ZEPHYR_BASE before running ninja / make.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Adding ZephyrUnittestConfig.cmake and ZephyrUnittestConfigVersion.cmake
to allow unittest projects to use find_package to locate ZephyrUnittest.
This means that it will be possible to allow users to run CMake without
the need to source zephyr-env.sh or run zephyr-env.cmd.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit introduces ZEPHYR_BASE as a cached variable, ensures that
once ZEPHYR_BASE has been set in a project, it is sticky.
Using cached variable also allows users to reconfigure ZEPHYR_BASE if
they so wish.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit adds the possibility of using a Zephyr repository package
base even when it has not been exported to CMake package registry.
It also introduces the possibility of locating and using Zephyr
CMake config package correctly when invoking CMake on an out-of-tree
project.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
When ZephyrConfig package is being version checked, then
ZephyrConfigVersion.cmake loads version.cmake.
This causes a print message, such as the following to happen:
-- Zephyr version: 2.2.0
Now, in case a user has multiple Zephyr installations, this could
result in something similar to:
-- Zephyr version: 2.2.0
-- Zephyr version: 2.x.0
-- Zephyr version: 3.x.0
being printed.
This commit add the possibility to disable version printing.
With new Zephyr base find_package, printing of ZEPHYR_BASE is added
after the version, in order to make it easy for users to see which
Zephyr is used.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
suggested change: print ZEPHYR_BASE
Adding ZephyrConfig.cmake and ZephyrConfigVersion.cmake allows projects
to use find_package to locate Zephyr.
This means that it will be possible to allow users to run CMake without
the need to source zephyr-env.sh or run zephyr-env.cmd.
This is especially useful for IDEs such as Eclipse or SES, where it will
no longer be required to source the above files before launching the
IDE.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Add shield definition for the MikroElektronika ADC Click. The ADC
Click carries a MCP3204 12-bit Analog-to-Digital converter in a
mikroBUS form factor.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Update introduces changes to TinyCBOR CMakeList.txt that removes
it from Zephyr interface libraries.
This also fixes problem with TinyCBOR include paths not being added into
compilation, unless MCUMGR has also been selected.
Addresses GH issue: #23324
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
This updates the Xtensa HAL revision to latest master,
which includes updating the HAL to version 12.08, and
making it a named module.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
There is no need to force add system include by adding
${SYSROOT_DIR}/include. Let GCC tell us what include paths
are needed with --print-file-name and feed them via -isystem.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Just to get something to test for PM, via frdm_k64f board. So only this
board will get PM enabled.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
SIM core system clock is being used, but more importantly this will
enable to get the SIM clock controller in use for power management
purposes in MCUX ethernet driver.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Such state needs to be set _from_ the PM API functions and not the other
way round. So if a network device driver does not support such API, it
will not be able to set the core net_if on PM state, obviously.
Currently, these functions only set/unset NET_IF_SUSPENDED flag.
More logic will be added later, to decide whether the net_if can be
actually set to suspend mode or not and also to take care of all timers
related to the interface.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This function can be used for example by network power management
to check if the network interface can be suspended or not.
If there are network packets in transmit queue, then the network
interface cannot be suspended yet.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
We need to know whether the net_pkt was successfully placed
to transmit queue. It is possible in TX side, that the net_pkt
is already in TX queue when for example TCP packet is
re-transmitted, in which case the queue submit will fail.
This cannot happen in RX side as there are no timers involved.
It is required to check about such pending flag before trying to submit
it into the queue. Indeed, the work queue could be scheduled right after
such queuing, thus checking for the pending flag afterwards would
provide a false information.
It is unfortunate k_work_submit_to_queue() does not return anything as
it would simplify the code then.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
By changing the various *NET_DEVICE* macros. It is up to the device
drivers to either set a proper PM function or, if not supported or PM
disabled, to use device_pm_control_nop relevantly.
All existing macro calls are updated. Since no PM support was added so
far, device_pm_control_nop is used as the default everywhere.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Minor optimization to use a local variable instead of a
deferencing of a struct member.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Convert older DT_INST_ macro use in openisa drivers to the new
include/devicetree.h DT_INST macro APIs.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>