When users are configuring nRF applications they are given the option
to enable the DesignWare I2C driver. But they should not be given this
option because nRF SoCs do not have DesignWare I2C HW.
This commit hides the driver by default by introducing the config
option HAS_I2C_DW.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
The logical NOT operator has a higher precedence than bitwise
AND operator. Therefore to make the test in if statement
correct, add parenthesis around the operands of bitwise
AND operator.
Found using Coccinelle.
Semantic Patch Language (SmPL) used:
<smpl>
@@
expression x;
constant C;
@@
- !x & C
+ !(x & C)
</smpl>
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
The getting started guide says to run:
pip3 install -r --user zephyr/scripts/requirements.txt
but this is broken. It should be:
pip3 install --user -r zephyr/scripts/requirements.txt
This fixes#10817 and is a regression from:
0d811b9aee
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Heuristic for populating an alias string for a subnode
of an alias node was wrong as there was no check if
alias already existed and string created was not in line
with device tree specfication (allowed chars: [0-9],[a-z], '-').
Fix these two points.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
A few issues with the dts support for the SSD1306 display driver:
1. binding file mixed description & generation up together
- rename most uses of generation to description and add proper
generation field into yaml
2. Drop use of BASE_LABEL, this shouldn't be used by most bindings
3. dts defines that are being assumed in driver aren't correct. We
should be using a dts_fixup.h in the sample to map the generated
defines to those used in the driver. We remove the incorrect
defines that the driver assumes right now.
4. Fixup 'segment-remap' and 'com-invdir' properties that are booleans
in the binding file and associated code changes.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
log_strdup writes out of bounds of a strdup slab.
e.g: CONFIG_LOG_STRDUP_MAX_STRING=46 and
LOG_STRBUF_STR_SIZE=47 then in the line L:529
sdupl[LOG_STRBUF_STR_SIZE - 1] = '\0';
writes out of bounds because the available buffer space
is only 44 bytes (rounded up to 48 bytes and minus 4 bytes
for the allocated flag).
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
This commit contributes a Kconfig symbol hierarchy which allows
the user to build Zephyr Secure and Non-Secure images on ARMv8-M
MCUs with support for Trusted Execution. However, the high-level
configuration structure is generic, thus, can be potentially
used for any platform that supports Trusted Execution.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This is only a codestyle fix with no functional implications.
A few structures typedefs are removed. The structures are not in
use yet outside of the board code.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
When user was typing a new command and next pressed an up arrow
shell has displayed previously executed command. Next it was not
possible to display back currently edited command using a down arrow.
Fixes#10766.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
The net_buf log level Kconfig setting was using template from
networking, which might not be available for Bluetooth code.
This caused the log level to be ignored.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Some irrelevant errors were printed even if the tests passed.
Make sure that these obsolete errors at not printed so that
sanitychecker does not get confused about them.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The maximum log level was using wrong template which caused
the max value to be ignored.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
It might be that the test might access null pointer in some cases.
In practice this is not possible as the test is using pre-defined
data when running the test.
Fixes#10777
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Replace sample code, making it use newest USB API, reading code
directly from sources, and changing to the simplest sample - loopback.
CDC ACM is quite big and modifying sample would render line change
quite often.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Extended logger to support optional log message prepending with
function name.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Extended supported number of arguments in log message. Support for
messages consisting of more than 2 chunks had to be added. So far
messages could consist of one chunk (up to 3 args) or two chunks
(2 args in first chunk and 7 in second chunk). Once 2+ chunks
support is added number of arguments is techinically limited to
15 (4 bit field). log_core and log_output extended to suppor 10
arguments.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Prepend the btmgmt call with the tools/ subdirectory to line up with
the other BlueZ tool calls in the examples.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Fixed a typo in the warning message printed when the user does not
pass any parameters (and therefore does not connect to a BabbleSim
Phy)
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
We can replace the method get_node_label_string in DTDirective with the
global function get_node_label. This way we have a single place that
labels for defines are being generated.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Don't based the compat to get_node_label, we can just figure out based
on the node address we are passed.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The Adafruit Feather nRF52 does not have any RTS/CTS signal
connections between the nRF52832 and the on-board CP2104 USB/UART
bridge. Pins 5 and 7 are regular GPIOs.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
This commit extends the support of built-in thread stack
protection (i.e. based on the stack pointer limit registers)
in ARMv8-M, so that it works with user mode. The commit
does the following:
- enables and disables the stack limit checking on the
privileged stack, inside thread system calls, and upon
entering user mode,
- does not enable stack limit checking in context switch,
if the thread is in user mode.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Fixed a very unlikely NULL pointer dereference, which could occur
in an error condition, triggered if the test/fake HW timer model
was enabled but there was no registered handler for that timer tick.
The de-reference was in the error message printout.
Fixes#10778
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Initialize an otherwise unitialized array which was causing random
failures in tests/posix/common.
Fixes#10508
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
The "zperf udp download" optional port parameter was not properly
checked, the default port check branch was never reached.
Fix also the same issue in tcp download command.
Coverity-CID: 188881
Fixes#10758
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Normalize the path of ignored folders so that variations in paths
formats on Windows are detected correctly.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This enables I2C, SPI, PWM, RTC and USB.
RTC tested on samples/drivers/rtc
USB tested on samples/subsys/usb/cdc_acm
Signed-off-by: Christian Taedcke <hacking@taedcke.com>
Change the default behaviour of the host network interface
setup. Now user needs to execute net-setup.sh script from
net-tools project to setup host ethernet interface. The script
needs to be run as a root user. Then zephyr.exe can be started
as a normal user.
Example:
cd net-tools
sudo ./net-setup.sh
This will create zeth network interface and set IP address and
routes properly. See other command line options by typing
./net-setup.sh --help
Old behaviour is still there if one enables
CONFIG_ETH_NATIVE_POSIX_STARTUP_AUTOMATIC=y
in which case one needs to use the command
sudo --preserve-env zephyr.exe
to start the Zephyr process.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This patch reduces the size of ISRs by changing the script to generate
the dispatcher per level to, instead of generating an indirect call per
mask match, do that just once at the function end.
For ESP32, this provides ~380bytes of savings in a (very) hot path
(text, just for the matcher functions generated by xtensa_intgen.py,
drop from 2197 bytes to 1817 bytes).
The generated code also uses the BIT() macro, which shifts 1UL instead
of 1. Shifting a signed integer is UB in C.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
write() function is not supposed to change buffer passed to it, so
propagate const pointer param to all write-like functions used/defined
in this file.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
The CONFIG_NET_DEFAULT_LOG_LEVEL template entry was only partially
fixed earlier and some spaces were not there around "=".
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>