Commit graph

18968 commits

Author SHA1 Message Date
Sebastian Bøe
a0b9129e85 cmake: Ninja: ld: Use the correct depfile in the second pass
When building for Ninja we were accidentally using the wrong depfile
in the second pass. This commit moves the LINKER_SCRIPT_DEP logic into
the custom command function so that it can be linker-pass-aware and
set the depfile appropriately.

This should fix an issue where Ninja reported:

ninja: error: expected depfile 'zephyr/linker.cmd.dep' to mention
'zephyr/linker_pass2.cmd', got 'zephyr/linker.cmd'

But this has not been reproduced. It has however been confirmed that a
dependency issue with linker_pass2.cmd has been fixed because ninja no
longer regenerates linker_pass2.cmd on every build like this:

$ ninja
[1/79] Generating always_rebuild
Building for board qemu_x86
[2/3] Generating linker_pass2.cmd
[3/3] Linking C executable zephyr/zephyr.elf

Now:

$ ninja
[1/78] Generating always_rebuild
Building for board qemu_x86

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-01-03 13:19:59 -05:00
Sebastian Bøe
b85dd3c238 cmake: ld: Refactor the linker script's cpp command construction
Construct the custom command for preprocessing the linker script with
a function to avoid copy-paste errors between linker passes.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-01-03 13:19:59 -05:00
Sebastian Bøe
270deade0e doc: checkpatch: Fix pre-commit hook
The pre-commit hook was or'ing with true and therefore never
triggering when there were checkpatch errors.

Also;

Documented that the file needs to be made executable.

Made it more clear that the file is located in the zephyr git
directory.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-01-03 13:15:14 -05:00
Anas Nashif
34aebad4b1 coverage: build with -O0 to get more information
per the gcov man page:

 You should compile your code without optimization if you plan to use
 gcov because the optimization, by combining some lines of code into one
 function, may not give you as much information .

Fixes #5548

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-03 13:12:03 -05:00
Anas Nashif
8a67369887 tests: coverage depends on native applications
Build with coverage enabled for any other boards or applications is
useless at least right now. Make sure we only enable coverage for native
applications.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-03 13:12:03 -05:00
Anas Nashif
8dc143591c ci: coverage: do not parse boards without coverage
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-03 13:12:03 -05:00
Anas Nashif
8ba32e9ef7 ci: add .codecov.yml for codecov.io configuration
This is the default config with the exclusion of tests/samples added for
Zephyr.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-03 13:12:03 -05:00
Dong Xiang
f60b2a6b0f doc: devices: correct devicetree specification path
Signed-off-by: Dong Xiang <dong.xiang@linaro.org>
2018-01-03 10:01:59 -05:00
Mariusz Skamra
813ec50838 Bluetooth: btp: Add event indicating expiration of incomp timer
This event indicates that segmented message incomplete timer
expired.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-01-03 10:48:13 +01:00
Mariusz Skamra
9977caefa1 Bluetooth: testing: Move bt_test_mesh_net_recv to internal API
This function is called only within mesh stack.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-01-03 10:48:13 +01:00
Mariusz Skamra
8274cbabf6 Bluetooth: btp: Add Mesh Clear Replay Protection List Cache command
This command is needed for Bluetooth Mesh testing against PTS.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-01-03 10:48:13 +01:00
Mariusz Skamra
a909aa3a0b Bluetooth: btp: Add LPN Subscribe/Unsubscribe commands
This adds commands to manage Friend node Subscription List.
Those will be used to add or remove and group/virtual address
from subscription list.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-01-03 10:48:13 +01:00
Mariusz Skamra
0bd3790d5b Bluetooth: btp: Add event indicating invalid provisioning BearerOpcode
This adds BTP event indicating reception of provisioning message
with invalid (RFU) BearerOpcode.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-01-03 10:48:13 +01:00
Mariusz Skamra
083937be32 Bluetooth: tester: Do not send BTP error if fault_update failed
This may fail, if model publication was not set by remote.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-01-03 10:48:13 +01:00
Mariusz Skamra
0d71cef1f2 Bluetooth: tester: Add BTP Mesh Model Send command implementation
This command will be used to test if model can properly send
segmented and unsegmented messages to a given destination address.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-01-03 10:48:13 +01:00
Sebastian Bøe
6f642a19fd cmake: Ported mbedTLS to use Zephyr interface libraries
mbedTLS include directories will now default to be in the 'app'
include path when mbedTLS has been enabled.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-01-02 22:09:01 -05:00
Sebastian Bøe
3c8331d390 cmake: Introduce Zephyr interface libraries
Introduce Zephyr interface libraries to fix #5351.

From the documentation:

A Zephyr interface library is a thin wrapper over a CMake INTERFACE
library. The most important responsibility of this abstraction is to
ensure that when a user KConfig-enables a library then the header
files of this library will be accessible to the 'app' library.

This is done because when a user uses Kconfig to enable a library he
expects to be able to include it's header files and call it's
functions out-of-the box.

A Zephyr interface library should be used when there exists some
build information (include directories, defines, compiler flags,
etc.) that should be applied to a set of Zephyr libraries and 'app'
might be one of these libraries.

Zephyr libraries must explicitly call
zephyr_library_link_libraries(<interface_library>) to use this build
information. 'app' is treated as a special case for usability
reasons; a Kconfig option (CONFIG_APP_LINK_WITH_<interface_library>)
should exist for each interface_library and will determine if 'app'
links with the interface_library.

This API has a constructor like the zephyr_library API has, but it

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-01-02 22:09:01 -05:00
Alberto Escolar Piedras
e04764dbc7 native: Handle gracefully SIGTERM and SIGINT
When SIGTERM or SIGINT are received handle them
by gracefully exiting the program.

Fixes #5477

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-01-02 15:26:34 -05:00
Jan Van Winkel
36e2efaf91 fs: nffs: Corrected types in OS specific functions
Corrected types in OS specific functions to be inline with NFFS
declarations.

Fixes #5467

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2018-01-02 13:34:02 -05:00
Vakul Garg
aded95b888 eth: mcux: Enable ETH_MCUX_0 conditionally
ETH_MCUX_0 needs to be turned on when CONFIG_NET_L2_ETHERNET is enabled.
If CONFIG_NET_L2_ETHERNET is disabled (e.g. when configured for 6loble),
then ETH_MCUX_0 should remain disabled.

Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
2018-01-02 13:33:18 -05:00
Anas Nashif
9b1b0fc838 ci: upload coverage data to codecov.io
Use codecov.io to track test coverage.

See https://codecov.io/gh/zephyrproject-rtos/zephyr

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-02 12:11:11 -05:00
Anas Nashif
712d34513e sanitycheck: encode logs correctly
We were encoding logs twice.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-02 11:54:02 -05:00
Anas Nashif
43e4127df0 sanitycheck: remove unused map
This map is not being used anymore.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-02 11:54:02 -05:00
Anas Nashif
a8a1388ae4 sanitycheck: support ninja builder
Add an option to support building with ninja instead of make.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-02 11:54:02 -05:00
Anas Nashif
4f02888b58 sanitycheck: use global command line options variable
Now use glabal options instead of passing them around as function
arguments.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-02 11:54:02 -05:00
Anas Nashif
e10b651e2d sanitycheck: declare command line options global
We have been passing around options from one function to the next making
it very difficult to add a new option easily and requiring changes to
man function prototypes.
This declated the parsed command line options global and renames args to
options. args is being used elsewhere and this was confusing.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-02 11:54:02 -05:00
Manivannan Sadhasivam
c4b24f87da boards: arm: 96b_neonkey: doc: Remove flash goal
This board doesn't support `make flash` way of programming.
So, remove that from documentation.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
2018-01-02 09:42:22 -05:00
Sebastian Bøe
d5fe808a09 cmake: net: qemu: Don't pass "-serial none" to qemu
I don't know why we have been passing "-serial none" to qemu but it
does not seem to be doing anything useful. So I propose we remove it.

According to the qemu documenation it should be disabling all serial
ports;

"-serial dev
Redirect the virtual serial port to host character device dev. The
default device is vc in graphical mode and stdio in non graphical
mode.

This option can be used several times to simulate up to 4 serial
ports.

Use -serial none to disable all serial ports."

But when we use "-serial none", we always combine it with "-serial
pipe", or "-serial unix", to redirect the serial port, so clearly it
is not disabling all serial ports as it attempting to do.

"-serial none" was first introduced to Zephyr in this commit:
0b54f984b8

As far I can tell, pinging an echo_server works fine without it, so I
suspect that our second -serial flag is overriding it and that it has
no effect.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-01-02 09:41:54 -05:00
Anas Nashif
13b08296e1 net: remove zoap library
We now have coap, all dependencies have been removed, so cleanup for the
next release.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-02 09:41:24 -05:00
Mariusz Skamra
1c4c6791bf Bluetooth: doc: Update ICS values for LE profiles
This updates GAP, GATT, SM, L2CAP ICS values according to following
documents:
GAP.ICS.5.0.2
SM.ICS.5.0.0
GATT.ICS.5.0.1
L2CAP.ICS.5.0.1

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-01-02 14:36:53 +01:00
Mariusz Skamra
b90f0bd1ac Bluetooth: doc: Widen column gaps in l2cap-pics.txt
The gap between 1st and 2nd column is only one character.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-01-02 14:36:53 +01:00
Ravi kumar Veeramally
1e277e0f20 net: app: Do not reset net_context information
Do not reset net_context information in net_app_close. In case of
TCP behind the curtains connection might wait for some timers to
expire and send some messages (e.g. ACK). If we set source port to
'0', unexpected behaviour might happen with peer connection.
Only reset net_app context related information on net_app_close.
Let net_context_put will take care of proper connection closure.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-12-31 11:58:27 -05:00
Ravi kumar Veeramally
a0371ae92f net: tcp: Add initial support for TIMEWAIT timer
Right now in FIN_WAIT1 state, if we receive FIN+ACK message, then
tcp state changed to FIN_WAIT2 on ACK flag and immediately on FIN
flag state changed to TIME_WAIT. Then final ACK is prepared and sent
(in queue at-least) to peer. Again immediately state changed to
TCP_CLOSED, where context is freed. net_context_put frees context
and releases tcp connection. Final ACK packet which is in queue
is dropped.

As a side effect of freed ACK packet, peer device keep on sending
FIN+ACK messages (that's why we see a lot of "TCP spurious
retransimission" messages in wireshark). As a result
of context free (respective connection handler also removed), we see
lot of packets dropped at connection input handler and replying with
ICMP error messages (destination unreachable).

To fix this issue, timewait timer support is required. When tcp
connection state changed to TIMEWAIT state, it should wait until
TIMEWAIT_TIMETOUT before changing state to TCP_CLOSED. It's
appropriate to close the tcp connection after timewait timer expiry.

Note: Right now timeout value is constant (250ms). But it should
be 2 * MSL (Maximum segment lifetime).

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-12-31 11:58:27 -05:00
Ravi kumar Veeramally
124c067027 net: tcp: Cancel the fin_timer on FIN message in FIN_WAIT1 state
fin_timer will be started after sending FIN to peer. After successful
reception of FIN+ACK message in FIN_WAIT1 state, fin_timer should be
cancelled.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-12-31 11:58:27 -05:00
Sebastian Bøe
dfe5cb731c cmake: qemu: Don't use the '\$' hack with Ninja
Using the '\$' technique to accept make variables corrupts Ninja build
systems, so avoid using it when generating Ninja files. Not using it
with Ninja means we need to come up with some other mechanism to
support build-time configuration of the QEMU CLI with Ninja.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2017-12-30 11:29:24 -05:00
Manivannan Sadhasivam
045d146d9f subsys: bluetooth: host: mesh: shell: Fix IVIndex parsing
Fix the parsing of IVIndex value from shell command line for
cmd_provision

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
2017-12-30 08:28:00 +01:00
Paul Sokolovsky
e25df54eae various: Update/fix some textual material and code comments.
Of these, only struct net_ipv6_nbr_data::send_ns is a descriptive
change:

send_ns is used for timing Neighbor Solicitations in general, not
just for DAD.

The rest are typo/grammar fixes.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-12-29 09:45:39 -05:00
Vinayak Kariappa Chettimada
891ba80087 Bluetooth: controller: Fix S2 coding Rx chain delay timing const
Fix the S2 coding Rx chain delay timing constant based on
manual observations.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-12-29 10:31:44 +01:00
Vinayak Kariappa Chettimada
d3585cd1d9 Bluetooth: controller: Add tIFS SW switching for Coded PHY
Add implementation to consider differing Rx chain delays for
S2 and S8 Coded PHY PDU reception. These changes are
required to meet tIFS timings for transmission after a
reception on S8 coding.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-12-29 10:31:44 +01:00
Anas Nashif
c263f2a208 tests: timer_api: remove build_only, exclude arches
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif
83fcd1cded tests: gdb server is build_only
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif
d4784555d0 tests: remove build_only option
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif
eba1bbd705 samples: remove more build_only tags
Remove build_only and add harness type needed for the sample/test to
allow running with sanitycheck and on devices once we have harness
support.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif
bca9c456d2 samples: remove build_only from various samples
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif
c6d2ba996f samples: drivers: remove build_only flag
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif
26ccc0bbcb samples: crypto: remove build_only and sample cleanup
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif
0d841cf0f2 samples: entropy: filter based on HW capabilities
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif
b5b8095749 samples: bluetooth and net samples need test setup
remove build_only and make them depend on test harness (bluetooth)

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif
2292d7881d tests: move gdb_server to test_build
No need for this to be a standalone test.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif
7bdf166bdb tests: benchmark: rename default .conf file
Have the default config be prj.conf

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00