Since all in-tree users are good with 4 bytes of user data, reduce the
default to 4. Also fix the default and rage values where apparently
'0' and '8' had been swapped.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The HCI command buffers are the only ones with more than 4 bytes of
required user data. Move the user data into a separate array and do
the mapping with the help of net_buf_id(). After this, it will be
possible to reduce the default net_buf user data size from 8 to 4.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Fix incorrect radio timing for Tx chain delay for S2 and S8
coding. Regression introduced in commit 55d3ce111c
("Bluetooth: controller: Refactoring nRF5 radio driver").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Having these in the beginning of a switch statement without any case
statement makes no sense.
Fixes#6135
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
When generating coverage report:
* Also generate branch coverage
* If the report is properly generated tell user where to find it
* Handle case in which no ztests are run (it would crash before)
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
With 323e8cf069 applied and printf() working out of the box,
CONFIG_NET_BUF_LOG=y workarounds can be removed from configs of
all samples.
Also, print an intro message at the start of each server sample,
to give a user hint that the app didn't just hang and what to do
next. (The port waiting for connection is printed. We can't (easily)
print host address, because the samples should run on both Zephyr
and POSIX systems, and finding out local host address would require
hairy #ifdef's undermining the purpose of these samples (that is,
showing that the *same* code can be used on both types of systems)).
Fixes: #5379
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Make it safe to call net_buf_simple_init() even if the buffer was
created using the new macros. This is possible to detect since with
the new macros buf->__buf will be non-NULL and with the old
NET_BUF_SIMPLE() macro it will be NULL.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Remove spurious console code block to fix formatting of the following
zephyr-app-commands directive. While I am here, fix the indentation of
the two zephyr-app-commands directives.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Aligned sanitycheck command line options in doc
with the actual ones.
+
Minor fix in --coverage description.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Added guards to the toolchain/gcc.h and toolchain/common.h
Those files should never be included directly, but a guard is useful
regardless.
Fixes#5130
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Introduce two new "standard" data allocators to net_buf. There are now
three in total:
NET_BUF_POOL_FIXED_DEFINE: This is the closes to the old
implementation, i.e. fixed size chunks. It's also what the old
NET_BUF_POOL_DEFINE macro maps to.
NET_BUF_POOL_HEAP_DEFINE: uses the OS heap
NET_BUF_POOL_VAR_DEFINE: defines a variable sized allocator using
k_mem_pool (this is all that there was in my first draft of this
feature)
Currently the variable length allocators (HEAP & VAR) support
reference counted data payloads, i.e. cheap cloning. The FIXED
allocator does not currentlty support this to allow for the simplest
possible implementation, but the support can be added later if
desired.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Redesign of the net_buf_simple and net_buf structs, where the data
payload portion is split to a separately allocated chunk of memory. In
practice this means that buf->__buf becomes a pointer from having just
been a marker (empty array) for where the payload begins right after
the meta-data.
Fixes#3283
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The net_buf unit tests were doing some pretty hacky stuff with
defining a dummy _net_buf_pool_list variable to fulfil the linker
magic that happens with a real build. Until now the code got lucky in
that the simple net_buf_alloc() tests didn't depend on
_net_buf_pool_list being valid, however with the coming redesign even
net_buf_alloc will require proper setup of this.
Since the unit tests were extremely minimal, and not testing anything
beyond what tests/net/buf already tests, just remove them for now.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Commit messages now require a body summary (before it could be blank for
"trivial" changes).
Add mention of uncrustify to help format code to project standards.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Very brief documentation of the board as a placeholder, more info on
supported features will follow.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Sort the glob results when Kconfig sources do 'source
"/path/*/Kconfig"' to ensure that the resulting dotconfig file is the
same for all platforms.
This fixes#5743
Credit goes to @ulfalizer.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Atmel SAMD21 series was classified too broadly as SAMD.
This patch names it correctly to make room,
for other members of SAMD series
Signed-off-by: Sean Nyekjaer <sean@nyekjaer.dk>
Add a new build variant that builds for Nordic nRF52832 with the new
MCUboot CONFIG_BOOTLOADER_MCUBOOT Kconfig variable set.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
When the Kconfig BOOTLOADER_MCUBOOT is selected, an overlay to place the
image at the slot0 location is required. In order to avoid having to do
this manually for all samples when targetting MCUboot, include the logic
inside the dts.cmake script to prepend a new common.dts file that then
conditionally includes mcuboot.overlay.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
CMakeLists.txt @nashif @SebastianBoe
was supposed to reference only the root file, but was referencing all
files. This commit patches CODEOWNERS to behave as intended.
See https://help.github.com/articles/about-codeowners/
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Fix conditional compilation in nRF5 radio interface so that
when Coded PHY feature is not selected then it does not use
the PPIs required for supporting the feature.
This will allow pwm_nrf5_sw driver to use PPI channels 14 to
19 and support 3 PWM channels. Without the Coded PHY feature
disabled, only PPI 14, 15, 18 and 19 are available for PWM.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Added a new API to get net pkt based on dst address. Destination
address will be used to find correct net_context.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
When net_app_ctx has multiple net_contexts, selecting net_context
based on dst address has some glitches.
E.g. One net_app_ctx and two net_contexts (net_ctx1, net_ctx2).
Both net_contexts are mapped to net_app_ctx.
When a caller looking for net_ctx (e.g. net_ctx2) with
matching dst address. Loop goes through net_ctx1 and dst
doesn't match. But another if condition checks does this
net_context mapped to net_app_ctx, yes it matches.
So return net_ctx1, which is wrong.
So first go through all elements in array of net_contexts for
matching dst address, if it fails to find then go for matching
net_app_ctx.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Default network interface is the first interface if there are multiple
interfaces exist. But this creates an issue when different parts of
the network subsystem wants to choose particular default interface.
At-least with this Kconfig option user can select default network
interface.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
sanitycheck: Compile unit tests with coverage enabled always
+ run also first unit tests together with native_posix
shippable: also include unit_testing coverage into report to
codecov
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Prior to this commit, the old `FLASH_DRIVER_NAME` macro was being used
in the definition of the flash drivers array. This caused the array to
have a size of 0.
This commit changes the code to use the newer `FLASH_DEV_NAME` macro,
causing the configured flash device to be present in the table.
Signed-off-by: Christopher Collins <ccollins@apache.org>
Fix sys log compilation warnings by defining the
SYS_LOG_LEVEL to SYS_LOG_I2C_LEVEL in Nios-II i2c driver.
This commit fixes Issue #6062
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
To enable using application-defined sections in linker scripts, the
application source directory must be included in the search path when
running the preprocessor to generate linker scripts.
This prevents build failures when using any of the configuration options
CONFIG_CUSTOM_RODATA_LD, CONFIG_CUSTOM_RWDATA_LD and
CONFIG_CUSTOM_SECTIONS_LD.
Signed-off-by: Kristian Klomsten Skordal <kristian.skordal@nordicsemi.no>
Bugfix in the tickless mode part:
During _time_idle_exit it was not announcing to the kernel the
already passed silent ticks, but it was left for the tick interrupt
itself.
This did not cause any trouble so far as there was only the timer
interrupt in this board.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
- Make half float encode/decode conditional
- src/cborpretty.c, src/cbortojson.c and src/cborvalidation.c
conditionally include math.h and half float type support
- Conditionally include math.h in src/compilersupport_p.h to avoid
newlib libc from getting compiled in
- Conditionally compile src/cborparser_dup_string.c if newlib libc is
compiled in
Signed-off-by: Vipul Rahane <vipulrahane@apache.org>
The TinyCBOR library is a small Concise Binary Object
Representation (CBOR) encoder and decoder library, optimized for
very fast operation with very small footprint.
Origin: TinyCBOR
License: MIT
URL: https://github.com/intel/tinycbor
Version: 0.5.0-beta1
commit: 497066ee87dd54341adaa1195bf15ad11ee33b20
Purpose: Introduction of TinyCBOR
Maintained-by: External
Signed-off-by: Vipul Rahane <vipulrahane@apache.org>
Also pull out the SERCOM pads configuration to defines. Note that the
SAM0 has a two level configuration - a signal (like TX) is mapped to a
pad, and then a pad is mapped to a function on a pin.
Signed-off-by: Michael Hope <mlhx@google.com>
This commit updates the title and the description of the
ARMv6-M, ARMv7-M NVIC dts bindings, so that both the title
and the description reference the respective ARM architecture
and not the Cortex M cores.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit defines the Kconfig options for
ARM Cortex-M23 and Cortex-M33 CPUs. It also
udpates the generic memory map for M23 and M33
implementations.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>