Replace npcx register base address type, uint32_t, with uintptr_t.
It is easier to know what type of base address and for linear
addresses treated as integral values.
This CL also modified IS_BIT_SET() macro function to fit MISRA code
guidelines.
Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
In NPCX7M6FB, it uses some the IRQs at the end of the vector table,
for example, the irq 60 and 61 used for Multi-Input Wake-Up Unit (MIWU)
device by default, and conflicts with isr used for testing. Moving IRQs
for this test suite to solve the issue.
Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
This CL configures the UART wake-up event triggered from a falling edge
(START condition) on CR_SIN pin. It also includes:
1. Introduce wui_maps property in yaml file to present relationship
between Wake-Up Input (WUI) and UART device.
2. Implement wake-up mechanism by MIWU api functions.
Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
Add gpio support for Nuvoton NPCX series. This CL includes:
1. Add GPIO device tree declarations.
2. Introduce wui_maps property in yaml file to present relationship
between Wake-Up
Input (WUI) and 8 IOs belong to the device.
3. Zephyr GPIO api implementation.
4. GPIO callback functions implementation with MIWU api functions.
5. Overlay file for gpio basic tests
Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
The device Multi-Input Wake-Up Unit (MIWU) supports the embedded
controller (EC) to exit 'Sleep' or 'Deep Sleep' power state which allows
chip has better power consumption. Also, it provides signal conditioning
such as 'Level' and 'Edge' trigger type and grouping of external
interrupt sources of NVIC. The NPCX series has three identical MIWU
modules: MIWU0, MIWU1, MIWU2. Together, they support a total of over 140
internal and/or external wake-up sources.
In this CL, we use device tree files to present the relationship bewteen
MIWU and the other devices in different npcx series. For npcx7 series,
it include:
1. npcx7-miwus-int-map.dtsi: it presents relationship between MIWU group
and NVIC interrupt in npcx7. Please notice it isn't 1-to-1 mapping.
2. npcx7-miwus-wui-map.dtsi: it presents relationship between input of
MIWU and its source device such as gpio, timer, eSPI VWs and so on.
This CL also includes:
1. Add MIWU device tree declarations.
2. MIWU api function declarations and implementation to configure signal
conditions and callback function mechanism. They can be be classified
into two types. One is for GPIO which connects original gpio callback
implemetation and the other is for generic devices such as timer,
eSPI, and so on.
Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
Added a callback that lets an application get write error
(if any) when subscribing to a gatt characteristic.
Signed-off-by: Emil Gydesen <emil_gydesen@bose.com>
In certain application configuration the networking log backend must not
be started, when the application starts. Starting it must be delayed
until routes to the logging server are established.
This commit introduces a new Kconfig setting to be able to control that
behaviour.
Fixes#27464
Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
Add new Kconfig options which depend on CONFIG_BOOTLOADER_MCUBOOT:
- CONFIG_MCUBOOT_SIGNATURE_KEY_FILE: the path to the key pair which
should be used to sign the image, in PEM format. This is sent to
imgtool via 'west sign' when set to produce zephyr.signed.bin and
zephyr.signed.hex files as needed.
- CONFIG_MCUBOOT_EXTRA_IMGTOOL_ARGS: additional arguments to pass to
imgtool.
- CONFIG_MCUBOOT_GENERATE_CONFIRMED_IMAGE: also generate
zephyr.signed.confirmed.{bin,hex}
Add build system support for these options.
This makes a separate 'west sign' step unnecessary when using MCUboot,
if the application image is properly configured with the location of
the key file.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This will be used in subsequent patches to integrate imgtool into the
build when the user has set CONFIG_BOOTLOADER_MCUBOOT=y.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Starting with west 0.8, we will have a stable way to run west as a
python module. In west 0.7, we have an undocumented way.
Handle these two cases to override the WEST variable used by the build
system to run west inside the same python interpreter as the rest of
the build system. This makes it intuitive to shell out to west from
elsewhere in the build, without making people reimplement existing
commands in the west API when it is not necessary.
Do so for the 'west topdir' invocation in west.cmake as an example.
The check that looks for whether PYTHON_EXECUTABLE and WEST_PYTHON
match is also not working properly when symbolic links are in use.
Fix it by using REALPATH instead of ABSOLUTE in the
get_filename_component() calls.
Finally, print the error on a failed import that we expect to work.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
The define for USB_DEVICE_CONFIG_ENDPOINTS erroneously divided
the DTS value for number of USB endpoints by 2.
Signed-off-by: David Leach <david.leach@nxp.com>
The commit fixes the problem where the SMP over shell responses have
been sent with use of k_str_out(), which is configured to use console
UART directly. This caused problem when user decided to attach
shell to a different UART then the one that has been used by
the console driver, because the SMP responses would still be sent
to the console UART rather than the shell UART.
The updated code uses, for shell SMP responses, the UART that has been
selected for the shell.
Fixes#26939
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Shield overlay file has to be taken into account after board overlay
file.
ex: When a new node need to be created for a specific board (in
boards/shields/shield_name/boards/board_name/*.overlay) and used by the
shield (in boards/shields/*.overlay), the order of the overlay files is
important
Signed-off-by: Ismael Fillonneau <ismael.fillonneau@stimio.fr>
This patch removes the hard-coded number of transfer buffers and allows
you to increase the number of transfer buffers when multiple USB
devices are used.
Signed-off-by: Pavel Král <pavel.kral@omsquare.com>
Zephyr doesn't use CFLAGS, CXXFLAGS, and CPPFLAGS if they are defined
in environment.
In case user defines CFLAGS or CXXFLAGS in environment, then a warning
message is printed, however CPPFLAGS does not raise a warning.
CPPFLAGS is updated to follow the principle of CFLAGS and CXXFLAGS.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Fix option USE_IDENTITY for bt_le_ext_adv_* API.
The random static identity address that was set in bt_le_ext_adv_create
was overwritten in bt_le_ext_adv_start in the call to
le_adv_set_private_addr.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Remove paragraph in documentation of GATT write callback which is
clearly wrong and was meant for the read callback.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Unit tests may include C++ code, so ensure the compiler flags are
consistent to avoid link errors.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Remove old known issues files and update with issues that still need to
be fixed in Sphinx>=3.2.0 and or Doxygen, including anonymous
union/struct parsing and duplicated symbols (eg struct and functions
having the same name).
Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
Some macros were using :c:func: and :cpp:func: which forbids Breathe
from resolving those symbols. Update to :c:macro: for proper resolution.
Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
Following the change to use the C domain for parsing, update all
existing :cpp:enumerator: references to :c:enumerator:.
Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
`NULL` is not defined in the Zephyr sources, but rather a C definition
which is not resolved when building the documentation and generates a
warning. Fall back to using just emphasis.
Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
Fix some C macros that are currently just emphasized in the
documentation with proper symbol resulition using :c:macro:
Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
Sphinx>=3.0 includes the `struct` role in the C domain, which provides a
specific way to link to structs, while the old :c:type: role should be
primary used to typedefs. Update existing references, using :c:type:,
:cpp:type: or emphasized symbols that point to structs to use the new
role.
Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
Following the change to use the C domain for parsing, update all
existing :cpp:func: references to :c:func:. Remove the parentheses as
well, if used, because they are not needed, this is already known to be
a function, and how it is displayed in the documentation later is a
semantic decision done by the output builder.
Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
Add __subsystem to list of attributes for the parser, and make the c
parser accept the same attributes than the cpp parser, after the change
to use the c parser for ".c" files.
Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
Older Breathe versions didn't work correctly with the C domain, so there
was a mismatch when refering to functions and #defines, using :cpp: or
:c: depending on the origin of the refered symbol. With Breathe >=4.19
the C domain works correctly so all symbols can be refered to with the
:c: role.
Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
Update methods used to include JS/CSS files, avoiding deprecated
versions the don't work on Sphinx>=3.x. The new methods work on both
Sphinx==3.x and Sphinx>=2.4.x.
Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
add argument --pre-script to specify a pre script. This will be
executed before device handler open serial port and invoke runner.
Currently, pre_script can only get from hardware.map file. just like:
./scripts/sanitycheck --hardware-map xxx.map
and set pre_script in xxx.map file.
Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
In some cases it might be a good idea to reset the board for real to
make sure it is completely recovered from some failed state (simple
re-loading of the application binary or even Elf file contents doesn't
affect most of internal CPU states so doesn't help in recovery,
see https://github.com/zephyrproject-rtos/zephyr/issues/25022 &
https://github.com/zephyrproject-rtos/zephyr/issues/26665).
And so we may want to utilize some external utility which triggers the
hard reset (in case of ARC boards it is
https://github.com/foss-for-synopsys-dwc-arc-processors/rff-ftdi-reset).
So we need to have a way to execute an external command before each and
every test.
Now given we already have quite some call-backs we try to use them
before re-inventing the wheel. And pre_script seem to be a good option
with just on minor note - it is called after serial port gets open.
And while in some cases it might be OK if serial port on the board is
not affected by the board's reset, if it is affected we'll be losing
connection on reset (and that's the case with ARC boards BTW as the
FTDI USB-to-Serial IC is also wired to the reset signal on most of
the boards). That said we just move invocation of pre_script before
opening the serial port and everything should be good now.
Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
Transient network errors may cause west update to fail. Retry it in
case that happens. Updates for projects which are already up to date
won't hit the network.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Add the nRF52805-specific file with radio related defintions.
Use also specific configurations for certain PPI channels used by
the controller, as this SoC has limited number of programmable PPI
channels.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Change hard-coded (D)PPI channel bitfield values to the BIT() macro
calls with the corresponding channel base value supplied as parameter,
to make it possible to actually change this base value if needed.
Remove unused *_EXCLUDE macros.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
By default show reports based on last release. Fix a few other issues
where we had 0 values and were dividing by zero.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The value of adv_type shall be 0x07 for extended advertising, it will
be converted to 0x05 inside ll_adv_params_set after some checks.
This did not cause any issues with tests since input parameters in
already implemented test cases do not test any code that was skipped
by invalid parameter, however obvious one side-effect is that phy_p
would be always set to 1M regardless of input parameter so any test
case using Coded on primary would fail.
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>