These were at most set, but never used. They appear to be artifacts
of importing code from the FNET stack.
Addresses: #9570
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
In addtion to zephyr/dts/bindings als scan the dts/bindings
directory within the application source directory for bindings.
Allows to have application specific bindings and drivers.
Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
The nvs sample assumed a 1 KB flash erase block size, which caused the
sample to fail on frdm_k64f because its erase block size is 4 KB. Get
the erase block size from dts instead.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
In TCP protocol, any packet is subject to retransmission if not
ACKed in expected time. Thus, any packet, including FIN (and SYN
for that matter) should be added to the retransmission queue.
In our case, despite its name, queue_fin() function didn't add
FIN packet to rexmit queue, so do that. Then, in
net_tcp_ack_received() which handles ACKs, make sure that we can
handle FIN packets: calculate its sequence number properly, don't
make adhoc adjustments to retransmission logic (it's handled
centrally in restart_timer() already), etc.
Fixes: #8188
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
If we run out of buffers and cannot create the TCP segment,
then handle it properly and do not access NULL pointer.
Coverity-CID: 187822
Fixes#9639
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If there is timeout when adding UDP data, then check this
condition and bail out by returning NULL as the packet is now
malformed.
Coverity-CID: 187825
Fixes#9636
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Use the correct pyOCD target type for the NRF52840.
This fixes b92436a13f.
Tested with: Atmel ICE Debugger
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Commit fixes two issues:
- Return correct value from gpiote_channel_alloc
- Check if pending event interrupt was not disabled
Jira:DESK-270
Fixes#9535
Signed-off-by: Pawel Dunaj <pawel.dunaj@nordicsemi.no>
The Cortex-M7 CPU included in the SAM e70 SoCs has instruction and data
caches that significantly boost the performances. Enable them during the
SoC initialization.
Fixes#8138
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
stacksize is an unsigned integer and hence there's no need to
check whether it is >= 0 since it is always true. This fixes
the Github issue #9637.
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
This fixes#8669, and is distressingly subtle for a one-line patch:
The list iteration code in _handle_expired_timeouts() would remove the
timeout from our (temporary -- the dlist header is on the stack of our
calling function) list of expired timeouts before invoking the
handler. But sys_dlist_remove() only fixes up the containing list
pointers, leaving garbage in the node. If the action of that handler
is to re-add the timeout (which is very common!) then that will then
try to remove it AGAIN from the same list.
Even then, the common case is that the expired list contains only one
item, so the result is a perfectly valid empty list that affects
nothing. But if you have more than one, you get a corrupt cycle in
the iteration list and things get weird.
As it happens, there's no value in trying to remove this timeout from
the temporary list at all. Just iterate over it naturally.
Really, this design is fragile: we shouldn't be reusing the list nodes
in struct _timeout for this purpose and should figure out some other
mechanism. But this fix should be good for now.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Update Kconfiglib and menuconfig to upstream revision a28bc4da9762e,
which adds include path information to menuconfig, showing how the
Kconfig file of the symbol got 'source'd in addition to showing the
definition location.
Add include path information to the auto-generated Kconfig documentation
too.
Some small Kconfiglib bugs are fixed to, like error reporting for
recursive 'source's being broken (crashing instead of printing the
error), a minor file descriptor leak, and syntax checking not catching
extra trailing tokens after 'if <expr>' and 'depends on <expr>'.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Replace an else-if case in osSemaphoreWait with
else to account for both EBUSY and EAGAIN return
values from k_sem_take. The return value would be
0 for osSemaphoreWait in both cases.
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
Added couple of negative tests for osSemaphoreWait
and osSemaphoreRelease to increase code coverage.
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
_k_syscall_table is an array of function pointers and is declared as
such in C sources, this makes it an STT_OBJECT[0] in the symbol
table. But when the same symbol is declared in assembly, it is
declared to be a function, which would make the symbol an STT_FUNC.
When linking with LTO this type inconsistency results in the warning:
real-ld: Warning: type of symbol `_k_syscall_table' changed from 2 to
1 in /tmp/cc84ofK0.ltrans8.ltrans.o
To fix this warning we declare the table with GDATA instead of GTEXT,
which will change the type from 'function' to 'object'.
[0]
https://docs.oracle.com/cd/E19455-01/816-0559/chapter6-79797/index.html
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
The previous code "optimized" and called both net_context_accept()
and net_context_recv() blindly to reset the corresponding callbacks.
But this leads to "wrong state" logging if debugging is enabled, so
clean that up.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Add additional test usecases in cmsis mutex to check
maximum number of mutexes allowed at a time. Also, add
couple of negative tests for invalid parameter check.
Signed-off-by: Praful Swarnakar <praful.swarnakar@intel.com>
1. Where we calculate max size, name variable (preprocessor define)
correspondingly.
2. Calling TCP/UDP an "app protocol" is original, use "next protocol"
terminology of IPv6.
3. As headers go as IP, then "next", order calculations that way too.
4. Add more comments.
Addresses: #8723
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
The Cortex-M7 CPU included in the STM32F7 SoCs has instruction and data
caches that significantly boost the performances. Enable them during the
SoC initialization. Note that the D-cache should only be enabled if it
is disabled, to workaround CMSIS issue #331.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Removes the platform whitelist, leaving just the depends_on/supported
pattern to select which platforms the sample can run on.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
When a mempool is created with a large number of maximum-size blocks,
the logic for initializing max_inline_level (i.e. when to union the
bitmask with the pointer and when to use the pointer directly) was
wrong. The default state was "zero", which implies that level 0
should be inlined, but that's wrong with >32 base blocks.
Additionally, the type was unsigned, making the "level zero is a
pointer" situation impossible to represent.
Fixes#6727
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Add support for using non-jlink programmers through pyOCD.
Tested with: Atmel ICE Debugger
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
The current code computes the block-aligned len by ANDing the len with
~write_block_size instead of ~(write_block_size - 1).
In addition the compute value can be 0 (for lengths that are less than
the block size), so the first flash write might have to be skipped.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Add support for using non-jlink programmers through pyOCD.
Tested with: Atmel ICE Debugger
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
The test errors on Arduino_101 due to
limitations in power management driver
on the platform. Hence excluding this.
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
The stack size was way too less. Increasing the size to minimum
of 512 for all platforms.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Replase magic numbers with HCI Error Code definitions in the
LE controller implementation.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Updated the implementation of Connection Update Procedure to
not assert when peer master violates the Bluetooth
Specification v5.0 Vol.6 Part B Section 5.3 Procedure
Collisions. Instead disconnect the link with reason
Different Transaction Collision (0x2A).
Certain phones in the market perform Connection Update
Procedure and do not correctly handle remote initiated
colliding PHY update procedures. They try to perform both
the transactions involving an instant simultaneously
violating the Bluetooth Specifications.
Implementation in Zephyr is updated to gracefully handle
the violating remote master device, and not fatally assert
in the local device.
Relates to commit 8b3fd6963c ("Bluetooth: controller: Fix
assert on different transaction collision")
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
When CONFIG_GPIO_SX1509B was not set, the related Kconfig options
were still showing up in .config. Let's make them depend on
GPIO_SX1509B so they can go away when not being used.
Signed-off-by: Michael Scott <mike@foundries.io>
This commit adds settings module to the peripheral_hids that makes
bonding persistent.
Now it is possible to connect with previously bonded device.
Fixes#9580
Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
Support using an alternate QEMU path for when we want to use a qemu
version not available in the SDK.
To use the alternate qemu version, export QEMU_BIN_PATH and point it
to the bin directory which contains the qemu executables.
For example:
export QEMU_BIN_PATH=/usr/local/bin
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Per: http://pubs.opengroup.org/onlinepubs/009695399/functions/socket.html
"Upon successful completion, socket() shall return a non-negative
integer, the socket file descriptor."
The test in prepare_fds() however fails if socket fd is
zero (non-negative), which should be a valid value.
This was found while testing the SimpleLink socket offload driver,
which can return a zero-valued socket fd, per the POSIX spec.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
Commit f6bf897780 ("kconfiglib: Add preprocessor and two warnings")
accidentally made the ordering of #define's in generated header files
random (dependent on Python's set() implementation). Minimal
configuration files (which can be saved from the menuconfig) were
affected too.
The intent is for the order to match .config files, which in turn match
symbol definition order. This doesn't affect behavior in any way, but
makes things more readable (and is handier if files are checked in).
Update Kconfiglib to upstream revision a3252f620fad9 to make the
ordering match again. Tests have been added upstream.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This patch changes clock initialization sequence to initialize external
cristal oscillators only if it was not done before. Initialization of
external cristal oscillators may be performed by the bootloader.
Tested on BRD4250B evaluation board.
Fixes#9471
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
Add support for OS managed Power Management framework for Zephyr
under 'subsys/power'. This framework takes care of implementing
the _sys_soc_suspend/_sys_soc_resume API's, a PM policy based on
SoC Low Power residencies and also provides necessary API's to
do devices suspend and resume.
Also add necessary changes to support the existing Application
managed Power Management framework.
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>