I only see one sample with an overlay using the now legacy sda-pin and
scl-pin properties. Move it to the new style.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Move the BOARD.dts files for Nordic-based boards to use the new I2C
devicetree properties for specifying the SDA and SCL pins.
This was done with a script.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Deprecate the scl-pin and sda-pin properties in the devicetree.
Provide new scl-gpios and sda-gpios properties instead.
This lets the user specify SCL and SDA like this:
&i2c0 {
scl-gpios = <&gpio0 1 0>;
sda-gpios = <&gpio1 4 0>;
};
Instead of having to use:
&i2c0 {
scl-pin = <1>;
sda-pin = <36>;
};
Provide error checking and understandable error messages for invalid
configurations.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Add some helper macros that will be convenient to use from device
drivers for accessing and error checking pin mux information in the
devicetree:
- NRF_DT_PSEL(): get a PSEL value out of the DT from either a
'foo-pin' or a 'foo-gpios' style property.
- NRF_DT_PSEL_CHECK_NOT_BOTH(), NRF_DT_PSEL_CHECK_EXACTLY_ONE():
helpers for checking that a given devicetree is OK according to
different criteria for setting PSEL properties (NAND or XOR on
whether the properties exist, respectively).
See comments in the patch for more details.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Enable CONFIG_TEST in the message_capture test suite.
This allows certain Kconfig configurations, depending
on TEST, to be enabled.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Modify an example by adding command that is using shell_getopt funtion.
Extent sample.yaml with getopt configuration.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
This functionality is is enabled by setting CONFIG_SHELL_GETOPT.
It is not active by default.
User can call following functions inside command handlers:
- shell_getopt - getopt function based on freebsd implementation
- shell_getopt_status_get - returns getopt status
Beware when getopt functionality is enabled shell will not parse
command handler to look for "-h" or "--help" options and print
help message automatically.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
This library is going to be used by the shell module. Some shell users
are not satisfied with subcommands alone and need to use the options
for commands as well.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
We expect to have more libraries with incopatible license. There must
be a common place for such software. It seems that lib/util is good
place for that.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
Shell will not "steal" by default "-h" and "--help" each time
help functions are enabled.
This change is necessary to implement and use the getopt library.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
The most common secure monitor firmware in the ARM world is TF-A. The
current release allows up to 8 64-bit values to be returned from a
SMC64 call from AArch64 state.
Extend the number of possible return values from 4 to 8.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Instead of relying on hardcoded offset in the assembly code, introduce
the offset macros to make the code more clear.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
The current code is assuming that the SMC/HVC helpers can only be used
by the PSCI driver. This is wrong because a mechanism to call into the
secure monitor should be made available regardless of using PSCI or not.
For example several SoCs relies on SMC calls to read/write e-fuses,
retrieve the chip ID, control power domains, etc...
This patch introduces a new CONFIG_HAS_ARM_SMCCC symbol to enable the
SMC/HVC helpers support and export that to drivers that require it.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Check NULL value when we are trying to print link address
because the link address can be null.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
As the input string can be allocated from stack, we need to use
log_strdup() in net_pkt_hexdump() to print the extra string.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add a dependency on TEST_ARM_CORTEX_M switch, so it
only gets switched on when building tests, not samples,
as originally intended.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Remove inclusion of vendor specific internal LLL include
files in ULL source code.
Prefix `lll/` include file path to correctly include vendor
defined types and function implementation.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Removed printk.h include from log_core.h.
Since LOG_PRINTK cannot be enabled with LOG_MINIMAL removed
support for both.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
We default to use the "label" properties of a devicetree node as the
name if it exists. If the "label" does not exist we than use the
node-name@unit-address for the node as the name.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Allow the test to run for non-secure firmware builds, by
removing the test-case for nonsense string, as this test-case
will likely produce a secure fault which will crash the kernel.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
usb_hid_descriptor struct is only used internally and
is not intended to be used by the USB HID device application.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Add common HID definitions header and move common macros
from USB HID header to common HID header.
The header can thus be used by Bluetooth HID profile or
others independently of USB subsystem.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
tests/kernel/interrupt tests interrupt trigger functionality,
however, the Non-Secure Cortex-M mode does not have full control
of the interrupt handling, so this test cannot be guaranteed to
pass when executing in Non-Secure mode. Filter the test out for
Non-Secure Cortex-M builds.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Exclude the test_null_dynamic_name test-suite from running the
test, in Non-Secure mode (Cortex-M), because passing a NULL
device name de-references memory at 0x0 which is likely to
cause a SecureFault and crash the kernel.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This is fundamental enough that it better be initialized ASAP.
Many other things get initialized soon afterwards assuming the MMU
is already operational.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Location of __kernel_ram_start is too far and _app_smem .bss areas
are not covered. Use _image_ram_start instead.
Location of __kernel_ram_end is also way too far. We should stop at
_image_ram_end where the expected unmapped area starts.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This is easier to cover multiple segments this way. Especially since
not all boundary symbols from the linker script come with a size
derrivative.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
The MT_OVERWRITE case is much more common. Redefine that flag as
MT_NO_OVERWRITE instead for those fewer cases where it is needed.
One such case is platform provided mappings. Apply them after the
common kernel mappings and use the MT_NO_OVERWRITE on them.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
There is no real reason for keeping page tables into separate pools.
Make it global which allows for more efficient memory usage and
simplifies the code.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Introduce a remove_map() to ... remove a mapping.
Add a use count to the page table pool so pages can be dynamically
allocated, deallocated and reused.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>