When merging files, make sure to remove header rows from each file and
just keep one header. This will stop us from parsing header rows as
tests.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add named exceptions instead of a generic one. Should help point to the
right issue when something goes wrong.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Convert the driver to use DT_INST_ defines, update all dependent dts,
soc and board files.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
This allows us to start using DT_NODELABEL() to access SPIMs that way,
instead of via an alias.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This doesn't sacrifice any readability when compiled for boards that
don't support this alias.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This is joint work with Kumar Gala (see signed-off-by).
Document the changes to the generated node macros in macros.bnf,
moving the old file to legacy-macros.bnf and putting it in its own
section.
The actual generated macros are now a low-level detail, so rewrite the
foregoing sections as examples in terms of the new <devicetree.h> APIs.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This is joint work with Kumar Gala (see signed-off-by).
Add helper macros which abstract the "true names" of each of the four
types of node identifier we intend to support (e.g. DT_ALIAS(),
DT_INST()).
These can be passed to a new DT_PROP() macro which can be used to read
the value of a devicetree property given a node identifier from one of
these four other macros, and the as-a-c-token name of the property.
Add other accessor macros and tests as well.
Add some convenience APIs for writing device drivers based on instance
numbers as well. Drivers can "#define DT_DRV_COMPAT driver_compatible"
at the top of the file, then utilize these DT_INST_* macros to access
various property defines.
For example, the uart_sifive driver can do:
#define DT_DRV_COMPAT sifive_uart0
Then use DT_INST macros like:
.port = DT_INST_REG_ADDR(0),
.sys_clk_freq = DT_INST_PROP(0, clock_frequency),
For convenience working with specific hardware, also add:
<devicetree/gpio.h>
<devicetree/adc.h>
<devicetree/spi.h>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This is joint work with Kumar Gala (see signed-off-by).
This supports a new devicetree macro syntax coming. It's not really
worth mixing up the old and the new generation scripts into one file,
because:
- we aim to remove support for the old macros at some point, so it
will be cleaner to start fresh with a new script based on the old one
that only generates the new syntax
- it will avoid regressions to leave the existing code alone while
we're moving users to the new names
Keep the existing script by moving it to gen_legacy_defines.py and
changing a few comments and strings around. It's responsible for
generating:
- devicetree.conf: only needed by deprecated kconfigfunctions
- devicetree_legacy_unfixed.h: "old" devicetree_unfixed.h macros
Put a new gen_defines.py in its place. It generates:
- zephyr.dts
- devicetree_unfixed.h in the new syntax
Include devicetree_legacy_unfixed.h from devicetree.h so no DT users
are affected by this change.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
If the #address-cells property for a register is 0 than we set the addr
value of the reg to None. Similar, if #size-cells is 0 than we set the
size value to None for the reg.
Fixup kconfigfunctions.py to handle reg.size and reg.addr being None.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This rename is mostly to easy git managment and review so any changes or
the addition of the new gen_defines.py doesn't look like a diff against
the old code if you look at just that commit.
We keep changes to a minimum to just keep things building with the
renamed gen_legacy_defines.py.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This returns the entire logical {name: Node} dictionary which is
currently being accessed element by element via chosen_node(name).
It will be used in a new gen_defines.py for moving the handling of
chosen nodes into C from Python.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This is useful for devicetree documentation, examples, and tests,
where we need to put something for the vendor but we can't use an
actual piece of hardware for some reason.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
The commit reduces default MCUMGR buffer size and introduces changes to
mcumgr that fix problem with mcumgr not being able to download file off
the Zephyr running device.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Remove use of k_cpu_idle in controller, and refactor the
implementation used to start, wait and stop clocks needed
by the controller.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
We used the column 'passed' as a boolean to signify pass or fail,
however we do have other states that need to be tracked.
Remove the boolean and use a text field instead that has the status as a
string.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
When running 1 specific test, counting was off. Combine functions adding
tests into one and optimize filtering.
Fixes#22270
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Update MCUboot SHA to take into account the
update of the nRF51 board target name.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Add a note in the board documentation with the nRF51 DK
board was named in earlier Zephyr releases (nrf51_pca10028).
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit introduces boards/deprecated.cmake to allow deprecation
of existing boards, when a board is renamed.
This allows users to still specify the old board name, and let Zephyr
build system to select the new board name.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
We rename the nRF51 Dev Kit board target (nrf51_pca10028)
to nrf51dk_nrf51422. We update all associated references
in the supportive documentation and all nRF51-related
cofigurations and overlay files in the samples and tests
in the tree.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
uart_configure verification handler was missing what would cause a crash
if called from a user thread.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
We update README file to correct the text for k_cpu_idle
testing, since now we cover the test for both tickless
and non-tickless kernel configuration.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
We fix the kernel.context test, so it tests the
implementation of k_cpu_idle for tickless kernel.
As most platforms now support tickless kernel by
default, this extension of the test is essential
to get coverage on k_cpu_idle() API.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Add the get_entropy_isr API function for the gecko entropy
driver. When the function is invoked without the ENTROPY_BUSYWAIT
flag, it returns whatever data is available in a non-blocking manner.
Signed-off-by: Pooja Karanjekar <pooja.karanjekar@lemonbeat.com>
Recently added test for pthread_getname_np()/pthread_setname_np()
functions used uninitialized array value. As we can't check behavior
for arbitrary uninitialized value, but at most NULL value, make the
test calls to explicitly use NULL, to make the test intent clear
(instead of for example initializing the original array with zeros).
Also, these test cases use variable names not consistent with Zephyr
codestyle, and named to generically to cause confuse when used in a
general context of the test_posix_pthread_execution() function, so
rename them to be specific. (And alternative would be to separate
pthread_getname_np()/pthread_setname_np() tests into a separate
function, but it was indeed practical to piggyback them on existing
test_posix_pthread_execution()).
Fixes: #23473
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Added a configuration option for enabling the nRF53 Network MCU.
Some applications will just run on the Application MCU, then
Network MCU should stay off. By deafult Network MCU
will be enabled when BLE or IEEE 802.15.4 are used.
Signed-off-by: Michał Grochala <michal.grochala@nordicsemi.no>
This page has a lot more information about APIs than just stability,
and I believe it's currently our only exhaustive list of APIs.
Rename it to API Overview.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
The documentation motivates this function by saying it is more
efficient than the core 64-bit version. This was untrue when
originally added, and is untrue now. Mark the function deprecated and
replace its sole in-tree use with the trivial equivalent.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Starting a SMI write operation without waiting for completion of the
preceding SMI read operation cause the write operation to fail if
the time between the 2 operations it too short. This leads to the
PHY being in an unusable state on the MIMRT1060-EVK eval board.
In addition the value of the register was not used, as consequence
some bits were not preserved.
The solution is to do a read/modify/write to set only the
ref clock bit, which sets the PHY into 50MHz clock mode,
and keep the value of the other bits.
Signed-off-by: Armand Ciejak <armand@riedonetworks.com>
Force PHY normal operation in eth_mcux_phy_setup in case strap-in
pins configure the PHY in factory test mode.
Signed-off-by: Armand Ciejak <armand@riedonetworks.com>
Don't use DT_INST_0_SOC_NV_FLASH_LABEL as device name.
Use DT_FLASH_DEV_NAME instead
Fixes#23678
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>