There is no point having undocumented and local config options when
Kconfig can be used to expose these relevantly.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Previous way was cumbersome (based on an old way for cc2520 actually),
so moving towards the more recent and proper way.
This will enable anybody to actually provide gpio configuration for a
winc1500 out of any board specific location.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Adding support for WINC1500 WiFi chip.
It introduces the wifi drivers sub-directory.
It provides a Full-MAC for 802.11 and an offloaded network stack as
well. The driver uses Atmel's winc1500 HAL.
Signed-off-by: Dario Pennisi <dario@iptronix.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Massimiliano Agneni <massimiliano.agneni@iptronix.com>
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
TI's ADC108S102 is a sampling on 16 bits, and thus requires the
destination buffer to be made of an even number of bytes.
Fixes#7389
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Be more obvious about the entropy_native_posix driver
being only a test utility which does not generate real
entropy.
Fixes: #6388
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
To avoid another thread from modifying the spi_buf_set and spi_config
structures passed to the spi_transceive() syscall, copy those to the
kernel stack before validating.
Fixes#7378.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Use zephyr-app-commands for portability instead of assuming Make and
Unix, and add a missing "run" goal.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
Use zephyr-app-commands for portability instead of assuming Make on
Unix, also adding a missing "flash" invocation.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
This used to be done by hand but can easily be generated like
we do other switch statements based on object type.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Similar to what has been done with pipes and message queues,
user mode can't be trusted to provide a buffer for the kernel
to use. Remove k_stack_init() as a syscall and offer
k_stack_alloc_init() which allocates a buffer from the caller's
resource pool.
Fixes#7285
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
User mode can't be trusted to provide a memory buffer to
k_msgq_init(). Introduce k_msgq_alloc_init() which allocates
the buffer out of the calling thread's resource pool and expose
that as a system call instead.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
User mode can't be trusted to provide the kernel buffers for
internal use. The syscall for k_pipe_init() has been removed
in favor of a new API to draw the buffer memory from the
calling thread's resource pool.
K_PIPE_DEFINE() now properly locates the allocated buffer into
kernel memory.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Dynamic kernel objects no longer is hard-coded to use the kernel
heap. Instead, objects will now be drawn from the calling thread's
resource pool.
Since we now have a reference counting mechanism, if an object
loses all its references and it was dynamically allocated, it will
be automatically freed.
A parallel dlist is added for efficient iteration over the set of
all dynamic objects, allowing deletion during iteration.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Some kernel APIs may need to allocate memory in order to function
correctly, especially if they are exposed to userspace where
buffers provided by user code cannot be trusted.
Instead of simply drawing from the system heap, specific pools
may instead be assigned to threads, and any requests made on
behalf of the calling thread will draw heap memory from that pool.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
An object's set of permissions is now also used as a form
of reference counting. If an object's permission bitmap gets
completely cleared, it is now possible to specify object type
specific cleanup functions to be implicitly called.
Currently no objects are enabled yet. Forthcoming patches
will do this on a per object basis.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Forthcoming patches will dual-purpose an object's permission
bitfield as also reference tracking for kernel objects, used to
handle automatic freeing of resources.
We do not want to allow user thread A to revoke thread B's access
to some object O if B is in the middle of an API call using O.
However we do want to allow threads to revoke their own access to
an object, so introduce a new API and syscall for that.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This works like k_malloc() but allows the user to designate
a specific memory pool to use instead of the kernel heap.
Test coverage provided by existing tests for k_malloc(), which is
now derived from this API.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This slist variant allows flags to be stored in a node
without taking up any extra space by relying on 4-byte
pointer alignment; flags are stored in the two LSBs.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The new APIs added are used behind the scenes by list_gen.h
to abstract away details on how lists and nodes work.
Name them with z_ prefix as they are not intended for use
by applications.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
If a variable is declared extern first, the name and type
information is stored in a special DW_DIE_variable which
is then referenced by the actual instances via the
tag DW_AT_specification.
We now place extern variable instances in an extern environment
and use this data to fetch the name/type of the instances,
which do not have it (which is why they were being skipped).
As it turns out, the gross hack for the system workqueue was
due to this problem because of the extern declaration in
kernel.h.
Fixes: #6992
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Printing the output length for all encryption/decryption operation will
make it easier to know if a particular crypto driver shim provides this
information. TinyCript and mbedTLS were not providing this, making the
out_len field useless.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
pthread_attr_init() should not return EBUSY as per POSIX spec
so fixed this by return ENOMEM if the attr pointer is NULL.
Also fixed the attribute initialization logic by copying the
init_pthread_attrs to the attr.
Fixes Issue #7480
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
The interrupt stack area wasn't being set to a repeating
0xAA pattern at boot as it should be. This is now done in
kernel_arch_init(), which runs before interrupts are
enabled for the first time.
Fixes#7327
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Kconfig keyword GPIO_AS_PINRESET is common for whole nrf52 series.
This patch move it to the series Kconfig.soc file.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
It is possible to use NFCT pins as regular GPIOs.
This patch introduce option for enabling this feature.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Fix a somewhat rare race condition when the thread gets
preempted in the middle of sending a byte through UART.
If the other thread also sends another byte through UART
and "consumes" the EVENTS_TXDRDY value, the first thread
will get stuck in the while loop forever.
By moving the reset to the function start, we guarantee that
the baseline state of EVENTS_TXRDY is 1. Therefore, the first
thread will continue normally when it executes again.
Signed-off-by: Thiago Silveira <thiago@exati.com.br>
Enabling the driver on board level is sufficient. We need to find a
better way for selecting random drivers on SoC level, this is currently
not possible due to how Kconfig works.
Fixes#7097
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add use-prop-name to disconnect-gpios property in st,stm32-usb
yaml, in order to generate friendly name for the definitions.
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
Add a sample.yaml file for Nordic platforms (QEMU is not supported due
to the lack of flash partitions), both nRF51 and nRF52.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
In order to run the Simple Management Protocol (SMP) over UART, a DTS
symbol named uart-mcumgr needs to be defined on the board. Enable this
for all Nordic Development Kits.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
After introducing persistent storage, it's useful for an app to check
if the node has been provisioned or not.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
If the incoming packet fragments doesn't have any link layer
header then build_reply_pkt() will set reply packet fragment's link
layer header space to zero. Which is causing issue in case of IPv4.
ARP layer is trying to fill Ethernet headers, but fragments
ll header length is set to zero.
Just use net_pkt_copy_all() to copy payload. That should be enough.
Fixes#6564
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
The test checked if the change was reported as successful and it always
was. What needs to be done is comparing whether the mac address was
actually changed to the requested one.
This commit adds this check.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
Remove redundant declaration of youve_print. This probably
had been a review oversight and upstreamed.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This is required to test the server with ab (ApacheBench), which
itself is an important integration test for the IP stack.
Fixes: #7377
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Previously, there was a boolean CONFIG_NET_TCP_TIME_WAIT setting
("master switch") and numeric CONFIG_NET_TCP_2MSL_TIME setting,
both named not ideally (there were both NET_TCP_TIME_WAIT and
CONFIG_NET_TCP_TIME_WAIT symbols in the source, with very different
meaning; "2MSL_TIME" was also a roundabout way to refer to
TIME_WAIT state time). In addition to that, some code was defining
adhoc, hardcoded duplicates for these settings.
CONFIG_NET_TCP_2MSL_TIME was also measured in seconds, giving
poor precision control for this resource-tying setting.
Instead, replace them all with the single
CONFIG_NET_TCP_TIME_WAIT_DELAY setting, measured in milliseconds.
The value of 0 means that TIME_WAIT state is skipped.
Fixes: #7459
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
We only clear 3 of the 6 member variables of the coap_reply structure
in coap_reply_clear().
Let's make sure to reset all of them.
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
The base CoAP retry setting is quite fast for network technologies
such as LTE-M and LoRa. Let's add an option to delay retries
a bit longer depending on the need.
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>