Commit graph

41120 commits

Author SHA1 Message Date
Maureen Helm
89513eb0f6 ext: mcux: Update imx rt clock drivers
Updates all imx rt clock drivers to fix building C++ with Zephyr SDK
0.10.0-rc3 (GCC 8.2)

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-02-21 16:55:05 -06:00
Ravi kumar Veeramally
37b8ec6acb doc: Add CoAP high-level description
Add high-level documentation for CoAP library.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2019-02-21 17:49:07 -05:00
Jukka Rissanen
edb01e229f doc: net: context: Add comment to use BSD socket API instead
The net_context API is being phased out.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-21 16:59:24 -05:00
Jukka Rissanen
9146237fa3 doc: net: Enhance net_timeout API documentation
Add overview to net_timeout API documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-21 16:39:20 -05:00
Jukka Rissanen
b364cf4b12 doc: net: Enhance promiscuous mode documentation
Added overview and sample usage for promiscuous mode documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-21 16:38:13 -05:00
Jukka Rissanen
8b7057c918 samples: net: promiscuous_mode: Add missing README.rst file
The promiscuous mode sample was missing documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-21 16:38:13 -05:00
Jukka Rissanen
efff3c68fe net: stats: Add missing doxygen comments
Various net_stats structs were missing doxygen comments.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-21 16:37:56 -05:00
Jukka Rissanen
9191bf3a0b doc: net: Enhance network statistics documentation
Add information how to collect network statistics in the system.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-21 16:37:56 -05:00
Jukka Rissanen
db45ed716f doc: net: Hide UDP API documentation
The UDP API functions are for Zephyr internal use only so do
not generate documentation for them.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-21 16:37:43 -05:00
Jukka Rissanen
8c9bff57a0 doc: net: Enhance network offloading API documentation
Add small overview what network offloading means.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-21 16:37:26 -05:00
Kumar Gala
ee3f7d629b boards: arm: mimxrt10*_evk: Enable MPU
The MPU should have been enabled on all these boards since they have
Cortex-M7 and need mpu for caching support.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-21 15:37:01 -06:00
Kumar Gala
830ec0285c cmake: toolchain: zephyr-0.10.0: Fix setting of SYSROOT_DIR on xtensa
We need to set SYSROOT_DIR as the last thing we do on target.cmake so
we reset how its set for xtensa.  Otherwise when we build with newlib
we will not get the proper path to newlib headers in the toolchain.

This matches the behavior of 0.9.5/target.cmake

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-21 15:06:19 -05:00
Marc Herbert
2270f4b116 Instant doc/ gratification: do not re-run doxygen when not needed
Use file(GLOB_RECURSE ...) to generate a superset of doxygen input
files. Use this list as a dependency for a new empty file
doc/_build/last_doxy_run_tstamp.

The incremental build time to re-run "make htmldocs-fast" after a small
.rst doc change is brought down from from ~8s to ~4s on my Linux system
and from ~30s to less than 10s on my MacBook.

(Doxygen changes are still slow for a couple reasons recently isolated
and documented in doc/CMakeLists.txt)

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-02-21 19:49:14 +01:00
Marc Herbert
fc64481bdf doc/CMakeLists.txt: trivial comments and logging enhancements
Clearly shows where time is spent. More specifically helps work on the
next commit while removing noise from it.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-02-21 19:49:14 +01:00
Ioannis Glaropoulos
7c09f82b43 arch: arm: enhance built-time rule to check for start addr alignment
Slightly enhance the build-time ASSERT rule for memory
partitions sanity on ARMv8-M platforms, to check,
additionally, for proper (32-byte) alignment of the start
address.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-02-21 10:03:23 -08:00
Andrew Boie
42d1481fb0 gen_mmu_x86: fix overlapping region detection
Fixes: #13515

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-02-21 09:49:19 -08:00
Ioannis Glaropoulos
60bae5de38 arch: arm: mpu: fix start of stack guard for builds with no USERSPACE
This commit fixes a bug for ARM builds with no USERSPACE support
where the MPU stack guard had been erroneously placed, i.e. not
at the beginning of the stack object. This was eating 32-bytes
off of the thread stack. In addition to that, the commit adds a
usefull ASSERT statement for builds with USERSPACE, which checks
that the start of the guard matches the beginning of the entire
stack object.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-02-21 09:38:29 -08:00
david leach
b08afdb348 net: sockets: Clean up socket shutdown on listen() socket
When closing the socket, zsock_close_ctx() would call
net_context_accept() when the socket was in "LISTEN" state.
This would result in an error log message for "Identical
connection handler already found" because the connection
context was already created because the initial
zsock_listen_ctx() called net_context_accept() to set up
the socket at the beginning. This change adds a test to
check if the callback is NULL which indicates this
close state and avoids the error message.

Signed-off-by: david leach <david.leach@nxp.com>
2019-02-21 11:58:46 -05:00
david leach
45df09c010 net: tcp: Clean up FIN send on socket shutdown
The sending of the final FIN message was being put on the sent_list
to be handled by the retry logic and being sent directly. But in
the case of a socket that never had a connection, the logic after
the direct send would decrement the reference on the packet which
would cause the retry logic to eventually have a situation where
the pkt is on the sent_list queue but the buffer associated with
the packet is freed back to slab. The code would then get a null
pointer to the tcp header and would fault when setting the crc to
zero on frdm-k64f platform.

Fixes #13489, #13301

Signed-off-by: david leach <david.leach@nxp.com>
2019-02-21 11:58:46 -05:00
Jukka Rissanen
fbb2bcaf87 net: Remove the TODO file
The TODO file contained some random nice to have features.
The file does not mention use cases for these and also currently
the new features are managed and discussed in github.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-21 11:56:54 -05:00
Ramakrishna Pallala
c69ee89018 tests: posix: Fix array overrun issue
Fix array overrun issue by limiting the array
index to the maximum possible string length.

Coverity CID: 190624

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2019-02-21 11:53:38 -05:00
Tomasz Bursztyka
78b644ea3a drivers/net: Switch slip driver to new net_pkt api
Replace "frag" keyword to "buf", as frag is reserved for packet
fragmentation now.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-02-21 09:34:30 -05:00
Tomasz Bursztyka
f01f278179 drivers/ethernet: Fix net API usage in smsc911x driver
Fixes #13484

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-02-21 09:34:30 -05:00
Tomasz Bursztyka
236c5fa48d drivers/ethernet: Removing unused variables in stellaris driver
In was generating these warnings:
eth_stellaris.c:66:8: warning: unused variable ‘eth_hdr’
eth_stellaris.c:65:8: warning: unused variable ‘head_len_left’

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-02-21 09:34:30 -05:00
Tomasz Bursztyka
12b1381fa1 drivers/ethernet: Switch stellaris driver to new net_pkt API
Allocating all the necessary buffer at once.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-02-21 09:34:30 -05:00
Laczen JMS
68ea30c123 fs/nvs: Improve init speed and remove fs->locked
This patch removes the free space calculation from nvs initialization.
The available space can be calculated if required using the routine
nvs_calc_free_space.

This patch also removes the locked state of nvs, it is not possible to
get in a locked state.

This patch adds an extra check on the sector_size configuration and only
allows operation on nvs when nvs has been initialized.

This patch also solves issue #13369, the usage of FLASH_ERASE_BLOCK_SIZE
has been replaced with the flash page api.

Changes:

Removed locked state and free_space from the nvs structure.

nvs_reinit(): has been replaced with by an internal only function
_nvs_startup().

nvs_write(): removed the possibility to place the file system in a
locked state, if to many gc operations are required it will return
-ENOSPC.

ssize_t nvs_calc_free_space(): introduced, calculates the free space
that is available in the nvs file system.

Removed define LOG_LEVEL.

Rebased to current master.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2019-02-21 09:32:52 -05:00
Laczen JMS
7989801966 fs/nvs: Improve init speed and remove fs->locked
This patch removes the free space calculation from nvs initialization.
The available space can be calculated if required using the routine
nvs_calc_free_space.

This patch also removes the locked state of nvs, it is not possible to
get in a locked state.

Changes:

Removed locked state and free_space from the nvs structure.

nvs_reinit(): has been replaced with by an internal only function
_nvs_startup().

nvs_write(): removed the possibility to place the file system in a
locked state, if to many gc operations are required it will return
-ENOSPC.

ssize_t nvs_calc_free_space(): introduced, calculates the free space
that is available in the nvs file system.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2019-02-21 09:32:52 -05:00
Kumar Gala
9d3bc5e936 arm: cortex_m: prep_c: Fix compile warning with relocate_vector_table
Its possible that memcpy is marked to check that a NULL value is passed
to it.  The instance of memcpy in relocate_vector_table its valid that
we're are copying to 0/NULL.  So supress the possible warning generated
by gcc -Wnonnull.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-21 09:32:07 -05:00
Tomasz Bursztyka
6fabbb7d14 drivers/wifi: Switch eswifi driver to new net_pkt API
Brings tiny simplifications.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-02-21 09:30:57 -05:00
Tomasz Bursztyka
854045c14d drivers/modem: Switch wncm14a2a driver to new net_pkt API
It is a bit awkward that ip/proto headers have to be rebuilt (with fake
data in it though). Let's see in future if that's really needed,
offload device handles already ip/proto headers by themselves so we
should not care.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-02-21 09:30:57 -05:00
Tomasz Bursztyka
e8b0e1f35b drivers/wifi: Switch winc1500 driver to new net_pkt API
Use tx and rx pools relevantly.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-02-21 09:30:57 -05:00
Tomasz Bursztyka
d086f50243 net/l2: Switch OpenThread L2 to new net_pkt allocator
Maybe there is an easier way to fill in the buffer in one call from an
otMessage.

Switch "frag" keyword to "buf", as "frag" is now reserved for actual
packet fragmentation and not buffer.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-02-21 09:30:20 -05:00
Tomasz Bursztyka
9d68f94d0e net/l2: Switch bluetooth L2 to new net_pkt allocator
Not much changes here as the buffer comes from BT stack already.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-02-21 09:30:20 -05:00
Tomasz Gorochowik
f0db8772f5 eth: eth_mcux: wait in send for the packet to be sent [REVERT ME]
Wait in the send callback for the packet to be actually sent.
After this change, only one TX packet will be handled at once.
This is needed because of the way the TX packets are currently handled
in L2 after this PR: #12563

This is similar to what #13167 did for the SAM GMAC on SAM E-70.

Without this, packet time-stamping does not work with the current stack.

This commit is minimalistic on purpose to make it easily revertible when
the network stack is able to properly handle DMA drivers for TX packets
again.

Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
2019-02-21 09:27:47 -05:00
Filip Kubicz
e44011b6e3 Bluetooth: host: Use log_strdup() for stack strings
Prevent temporary strings from being printed incorrectly if they go out
of scope before being processed by logger.

Signed-off-by: Filip Kubicz <filip.kubicz@nordicsemi.no>
2019-02-21 09:25:50 -05:00
Filip Kubicz
f1a2295088 Bluetooth: settings: Always initialize key when storing Client Features
Fixes #13572.

Initialize key used to store Client Features even when config was not
found.

Signed-off-by: Filip Kubicz <filip.kubicz@nordicsemi.no>
2019-02-21 09:25:50 -05:00
Jukka Rissanen
18f9db5381 net: route: Do not access null neighbor
Possible null pointer dereference when looking up the nexthop
neighbor.

Coverity-CID: 190639
Fixes #12294

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-21 09:23:53 -05:00
Jukka Rissanen
5e83e919e3 doc: net: Enhance DHCPv4 documentation
Add short overview for DHCPv4. Do not add dhcpv4 library internal
state in the documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-21 08:01:51 -05:00
Ioannis Glaropoulos
a7f1c10371 arch: arm: clear BFSR bits after error handling for all architectures
With this commit we clear the BusFault Status Register error
bits, after processing the fault, for all ARM architecture
variants and implementations (not only for ARMv8-M mainline).
That is a fix, since the bits are sticky in the ARMv7-M
variants, as well. The commit fixes, additionally, a typo
in the spelling of BFSR.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-02-21 07:59:30 -05:00
Ioannis Glaropoulos
a5466156c8 arch: arm: minor typo fix in fault.c
Minor typo fix in the abbreviation of
UsageFault Status Register (UFSR).

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-02-21 07:59:30 -05:00
Ioannis Glaropoulos
5e4a02da6d arch: arm: clear MMFSR status bits after fault handling
Clear the (sticky) MMFSR bits after handling the MPU fault.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-02-21 07:59:30 -05:00
Flavio Ceolin
06d0b6a694 ext: tinycrypt: Update tinycrypt revision
Bump tincyrypt library revision.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-02-21 07:48:24 -05:00
Adithya Baglody
b8ad89ebad arch: arm: arm_core_mpu: Fixed the build when coverage was enabled.
The build was broken when CONFIG_COVERAGE was enabled.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2019-02-21 07:47:48 -05:00
Kumar Gala
5a0fec4c26 cmake: toolchain: zephyr-0.9.5: Fix setting of TOOLCHAIN_HAS_NEWLIB
There was an oversight and the Zephyr SDK 0.9.5 toolchain should report
itself as supporting newlib.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-21 07:44:46 -05:00
Johan Hedberg
16311e2285 Bluetooth: settings: Fix missing log_strdup() call
The bt_settings_encode_key() cannot know if the given path pointer is
on the stack or not, so the only safe way to pass it to the logger is
by using a log_strdup() call. Not doing this will likely cause
corrupted strings to show up in the log output.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2019-02-21 13:25:06 +02:00
Michael Scott
1350de9a00 boards: nrf52_blenano2: standardize scratch and storage partitions
Most of the other nRF52832 boards have the following settings for
scratch and storage partitions:

scratch_partition: partition@70000 {
	label = "image-scratch";
	reg = <0x00070000 0xa000>;
};

storage_partition: partition@7a000 {
	label = "storage";
	reg = <0x0007a000 0x00006000>;
};

Let's remove the snowflake settings in BLENano2 which coincidentally
are incorrect: storage overruns the flash area by 0x1000 and causes
a crash when enabling FCB storage.

Signed-off-by: Michael Scott <mike@foundries.io>
2019-02-21 11:54:35 +01:00
Carles Cufi
997ef85ea9 doc: Clean up build instructions and use of variables
Remove most unnecessary instances of `export` and `cmake` use that can
instead be replaced with `zephyr-app-commands` or similar. This is to
avoid documentation using different mechanisms to describe the same
actions and in preparation for documenting `west build` everywhere.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-02-21 11:46:45 +01:00
Andrew Boie
794d382bb9 userspace: increase gperf text areas
128 already gets exceeded in a lot of cases, and the binaries
with the new SDK are very slightly larger. Just kick this up
to 256 and get rid of all the exceptions.

Fixes: #13594

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-02-20 22:17:48 -05:00
Andrzej Puzdrowski
662b44e357 sample/subsys/usb/dfu: correction to documentation
Reverted unwanted documentation change on usb dfu sample.
Changes was introduce accidentally within PR #13475

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-02-20 19:43:43 -05:00
Jukka Rissanen
b1bfb636ef net: if: Add documentation for NET_DEVICE_INIT() macros
Add missing documentation for network interface creation macros.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-20 19:42:30 -05:00