Commit graph

99049 commits

Author SHA1 Message Date
Erwan Gouriou
3f71772555 ext/hal/st: stm32f7: Fix README
READM was not updated following last STM32Cube update.
Fix this.


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-10-29 10:30:48 +00:00
Erwan Gouriou
60d96600b4 ext/hal/st: update stm32l4 stm32cube package from v1.12.0 to v1.13.0
Update STM32L4 series stm32cube package from V1.12.0 to V1.13.0.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-10-29 10:30:48 +00:00
Mariusz Skamra
45411bc08d Bluetooth: Update advertising data without advertising restart
This adds new API fuction to update running advertising data.
It will remove the need of advertising restarting.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-10-29 12:30:34 +02:00
Kumar Gala
54bdd7aee0 Revert "libc: minimal: Add error codes for key management"
This reverts commit 25fb2302f1.

The bluetooth l2cap code was using these errno values but changed to
using more standard EPERM instead, so lets remove the defines since
nothing uses them.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-29 10:12:23 +00:00
Jakub Rzeszutko
3aaf280108 shell: fix assert in wildcard plugin
Fixing a variable name in assert check in a function subcmd_get.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-10-29 09:58:08 +00:00
Vikrant More
358329c7e9 samples: mesh: nrf52: unsolicitedly publishing the states
With this commit, some prime Servers would unsolicitedly
publishes thier states values.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2018-10-29 10:51:17 +02:00
Vikrant More
0f86ba3dfd samples: mesh: nrf52: defined common publisher for Gen. Level
Defined common publisher i.e. gen_level_publisher() for
all three gen. level related messahe handlers.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2018-10-29 10:51:17 +02:00
Vikrant More
c38f178257 samples: mesh: nrf52: enum redefined
Redefined & relocate enums to improve code readability.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2018-10-29 10:51:17 +02:00
Anas Nashif
203948e156 sensors: move grove sensors under drivers/sensor
Grove devices are sensors, so no need to have them under their own
category.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-28 11:46:36 -04:00
Anas Nashif
d2c8d52336 grove: lcd: move grove lcd driver to drivers/display
Move to display drivers where it belongs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-28 11:46:36 -04:00
Jakub Rzeszutko
7e3a6e85d3 doc: shell: add information about dummy backend
Shell documentation has been updated with information about new
backend called DUMMY.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-10-28 11:45:41 -04:00
Jakub Rzeszutko
c3bc7180b0 subsys: shell: add dummy backend to simplify commands testing
Added dummy backend which can be enabled with Kconfig. By default it is
disabled because it needs the same amount of memory as other phisical
backends. It shall be use only for commands testing purposes.

Improved shell_execute_cmd function, now it clears command context
before new command will be executed.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-10-28 11:45:41 -04:00
Ramakrishna Pallala
359341203f power: Add OS Power Management debug hooks
Add the necessary PM hooks like Low Power state entry
count and residencies for logging and debugging purposes.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-10-28 11:44:22 -04:00
Adithya Baglody
24b89f12eb tests: sched: schedule_api: Increase the minimum ram needed.
This test was failing on nrf52810_pca10040 due to lack of RAM.
It was a side effect of increasing the privilege stack size.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2018-10-28 11:43:32 -04:00
Himanshu Jha
1e7a70c082 doc: application: coccinelle: Miscellaneous cleanups
Update documentation with spell fixes and refactoring
changes.

Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
2018-10-28 11:42:43 -04:00
Henrik Brix Andersen
8d56730b00 samples: hci_uart: add note about reduced baudrate on the BBC micro:bit
The BBC micro:bit uses a baudrate of 115200 for the hci_uart
sample. Add a note about this to avoid any confusion.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2018-10-28 07:29:05 +00:00
Ioannis Glaropoulos
c5da2e08c6 arch: increase priv stack with built-in stack-overflow checking
This commit increases the privilege stack size to 512 bytes,
when building with support for built-in stack-overflow checking.
This is in alignment with #10729, which increases the privilege
stack size when MPU-based stack guarding is enabled.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-10-27 21:54:05 -04:00
Ioannis Glaropoulos
dbbed1d1db arch: arm: API to allow Non-Secure FPU Access
This commit introduces and implements an internal ARM
TrustZone-M API to allow the Non-Secure firmware to use
the Floating Point Unit (FPU).

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-10-27 21:39:51 -04:00
Alberto Escolar Piedras
025c106061 posix arch: Improve description of posix_halt_cpu
Improved the description of posix_halt_cpu().

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-10-27 21:35:51 -04:00
Reto Schneider
7eabab2f5d samples, tests: Use semi-accurate project names
When using an IDE (e.g. Eclipse, Qt Creator), the project name gets
displayed. This greatly simplifies the navigation between projects when
having many of them open at the same time. Naming every project "NONE"
defeats this functionality.

This patch tries to use sensible project names while not duplicating
too much of what is already represented in the path. This is done by
using the name of the directory the relevant CMakeLists.txt file is
stored in. To ensure unique project names in the samples (and again, in
the tests folder) folder, small manual adjustments have been done.

Signed-off-by: Reto Schneider <code@reto-schneider.ch>
2018-10-27 21:31:25 -04:00
Leandro Pereira
d3528cf001 soc: esp32: Update auto-generated _soc_inthandlers.h
Remove the auto-generated `handle_irq` label for the unneeded cases
to get rid of a compile warning.

Fixes #10801.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-10-27 21:25:57 -04:00
Leandro Pereira
aa442d13e7 arch: xtensa: Do not generate unused handle_irq label unless needed
This was causing a `label handle_irq defined but not used` warning
during build.

Fixes #10801.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-10-27 21:25:57 -04:00
Ulf Magnusson
85f8c0d4eb menuconfig: Add jump-to for choices, menus, and comments
Update menuconfig (and Kconfiglib, just to sync) to upstream revision
bf1701b36634b, to add this commit:

    menuconfig: Add jump-to for choices, menus, and comments

    For choices, search the name and the prompt. This is the same as for
    symbols, except names are optional (and rare) for choices.

    For menus and comments, search the prompt (title text).

    When jumping to a non-empty choice or menu, jump into it instead of
    jumping to its menu node. If show-all mode is off and there are
    visible items in the choice/menu, then jump to the first visible
    node. Otherwise, enable show-all and jump to the first node.

Previously, only symbols could be jumped to.

Various other small fixes/improvements are included too:

 - The "no range constraints" text was dropped from the input dialog
   when settings int/hex symbols without an active 'range'. It might be
   more confusing than helpful.

 - A crash when pressing Ctrl-F (the view-help shortcut) with no matches
   in the jump-to dialog was fixed

 - Some gnome-terminal shoddiness was worked around to remove minor
   jumpiness when reducing the height of the terminal

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-10-27 15:56:36 -04:00
Jan Van Winkel
8bf31eb2fb CODEOWNERS: Assign maintainer for display API & drivers
Assign vanwinkeljan as maintainer for display API and display drivers.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2018-10-27 15:47:43 -04:00
Johan Hedberg
b0ad17d0a4 samples: reel_board/mesh_badge: Add statistics and new message
Add a new "heartbeat" message so that number of hops between nodes can
be discovered. Also add a statistics page which can be toggled using a
long key press, showing local information and the top message senders.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-10-27 11:16:30 +01:00
Johan Hedberg
ab615d305d Bluetooth: Mesh: Add macros to encoded model publication periods
These macros are helpful for using the configuration client API with
periodic model publication.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-10-27 11:16:30 +01:00
qianfan Zhao
7ac2ade110 arch: sam: Enable SEGGER RTT on all sam0 and same70 SoCs
All chip from Atmel's sam series can support SEGGER RTT.

Signed-off-by: qianfan Zhao <qianfanguijin@163.com>
2018-10-27 07:54:28 +01:00
Björn Stenberg
01ff384f10 net: ipv6: Remove incorrect length assignment in MLDv2
This assignment causes the later code to overwrite part of the
packet, making it malformed.

Signed-off-by: Björn Stenberg <bjorn@haxx.se>
2018-10-26 22:28:43 +03:00
Carles Cufi
9fd4c3a70d doc: Remove quotes from Windows env var
Windows requires that there are no quotes around environment variables,
remove the ones in the documentation.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-10-26 18:27:01 +01:00
Mariusz Skamra
74318e61ca Bluetooth: Change l2cap accept callback return error
This changes EKEYREJECTED to EPERM due to newlib dependencies
errors.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-10-26 16:56:01 +01:00
Aurelien Jarno
8d204f85af drivers: entropy nRF5x: hide the driver on non-nRF boards
The nRF5x entropy driver does not depends on SOC_FAMILY_NRF is therefore
visible and selectable non-nRF5x SoCs. Fix that.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-10-26 16:26:37 +01:00
Sebastian Bøe
5e23278bab Bluetooth: Controller: Use a different flag for speed optimization
The bluetooth controller has been using the flag '-Ofast' to keep
within a real-time limit. There are two problems with this; firstly,
when a project should be optimized for size it is standard to use -O2,
not -Ofast.

Secondly, optimization flags have been deemed to be non-portable, so
instead of directly using "-Ofast" we should use the intent-macro
OPTIMIZE_FOR_SPEED_FLAG to ensure toolchain portability.

Testing has shown that we are still within the real-time limit when
changing from -Ofast to -O2. -Ofast is about 1us and 1% faster, but
increases the code size by 13kB (5% of the available flash on a
nRF51).

Since the slowdown is comparatively small compared to the code size
increase we have decided to use -O2 in place of -Ofast.

Other optimization combinations were also measured and their results
can be seen below:

-Ofast in BLE Controller and in #pragma in entropy driver.

        Memory region         Used Size  Region Size  %age Used
                   FLASH:      138920 B       256 KB     52.99%

        [bt] [INF] encode_control: l: 6, 6, 7; t: 75, 45, 132.

-O2 in BLE Controller and in #pragma in entropy driver.

        Memory region         Used Size  Region Size  %age Used
                   FLASH:      125840 B       256 KB     48.00%

        [bt] [INF] encode_control: l: 6, 6, 7; t: 75, 51, 133

-O3 in BLE Controller and in #pragma in entropy driver.

        Memory region         Used Size  Region Size  %age Used
                   FLASH:      138920 B       256 KB     52.99%

        [bt] [INF] encode_control: l: 6, 6, 7; t: 75, 50, 132.

No extra CFLAGS for BLE and entropy driver (pragmas removed), using
CONFIG_SIZE_OPTIMIZATIONS=y

        Memory region         Used Size  Region Size  %age Used
                   FLASH:      120124 B       256 KB     45.82%

        [bt] [ERR] isr_rx_conn: assert: '!radio_is_ready()' failed

No extra CFLAGS for BLE and entropy driver (pragmas removed), using
CONFIG_SPEED_OPTIMIZATIONS=y

        Memory region         Used Size  Region Size  %age Used
                   FLASH:      138004 B       256 KB     52.64%

        [bt] [INF] encode_control: l: 6, 6, 7; t: 61, 51, 130.

NB: RAM usage differences were insignificant.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-10-26 15:55:49 +01:00
Vikrant More
5a341f5590 samples: mesh: nrf52: upgrade bound states publish mechanism
If user aggresively vary the state then previous mechanism
failed to publish status of other bounded states since it
has to publish multiple things back to back.
This PR repair the things.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2018-10-26 15:26:35 +01:00
Martin Benda
f119ffedd5 boards: atsamd20_xpro: Add led/button info to DTS
Add on-board yellow LED and user button to the device tree.

Signed-off-by: Martin Benda <martin.benda@omsquare.com>
2018-10-26 14:52:06 +01:00
Jukka Rissanen
b34da1ad62 net: Drop IPv4 packet if source address is broadcast one
Source address cannot be broadcast one so check it properly.

Fixes #10782

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-26 15:37:21 +03:00
Jukka Rissanen
7d83543379 net: Properly handle pkt IPv4 broadcast destination address
If we receive an IPv4 that has broadcast destination address, then
properly handle it.
This means that for
  * ICMPv4, if CONFIG_NET_ICMPV4_ACCEPT_BROADCAST is set (this is the
    default value) and we receive echo-request then accept the packet.
    Drop other ICMPv4 packets.
  * TCP, drop the packet
  * UDP, accept the packet if the destination address is the broadcast
    address 255.255.255.255 or the subnet broadcast address.
    Drop the packet if the packets broadcast address is not in our
    configured subnet.

In sending side, make sure that we do not route broadcast address
IPv4 packets back to us. Also set Ethernet MAC destination address
properly if destination IPv4 address is broadcast one.

Fixes #10780

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-26 15:37:21 +03:00
Jukka Rissanen
a85a123477 tests: net: ip-addr: Add checks for IPv4 broadcast addresses
Make sure that IPv4 broadcast address checks work as expected.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-26 15:37:21 +03:00
Jukka Rissanen
aa2240a444 net: ip: Add function to check if IPv4 address is broadcast one
Add utility function that returns true if given IPv4 address is
a broadcast address. This will be used in later commits to check
received packet IPv4 source and destination addresses.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-26 15:37:21 +03:00
Jukka Rissanen
5f66852f62 net: ipv4: Fix network byte ordering for netmask related computing
Remove extra ntohl() calls when checking IPv4 address against
a subnet address.

Convert also the IPv4 address to be const as the netmask related
functions do not change its value.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-26 15:37:21 +03:00
Jukka Rissanen
601426866a net: Set used transport protocol to net_pkt
Cache the used transport protocol in net_pkt. This way we can
avoid traversing IP header to get the last protocol in network
packet. This is mostly an issue in IPv6 which can have a long
list of extension headers after IPv6 header and before the
transport protocol header.

Fixes #10853

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-26 14:08:43 +03:00
Vikrant More
87f5fc63fc samples: mesh: nrf52: follow the standard while naming variables
Change variable names to follow standard.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2018-10-26 10:21:04 +01:00
Vikrant More
ee6e55ed33 samples: mesh: nrf52: removed unnecessary Models
Generic OnOff Server & Client has removed from Second
element which is redundant.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2018-10-26 10:21:04 +01:00
Vikrant More
acbaaed31a samples: mesh: nrf52: improvement in status responses details
If transition is in process, then as per current implementation bound
states only respond with Present value. But with this commit, now
bound states too would respond with present, target & remaining time
values in status response.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2018-10-26 10:21:04 +01:00
Vikrant More
ceab98f825 samples: mesh: nrf52: Vendor Model opcodes redefine
Redefine opcode values for Vendor Model to mimic like
Generic OnOff Server opcode values for sake of convenience.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2018-10-26 10:21:04 +01:00
Vikrant More
06862268aa samples: mesh: nrf52: coding style improvements
Removed unwanted lines of codes. In transition.c
define Timers just before they get utilised.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2018-10-26 10:21:04 +01:00
Vikrant More
0a11c958fe samples: mesh: nrf52: improvements in gen. delta message handler
Now in case of Generic Delta handler, if message with same TID
received after 6 seconds with same source address would consider
as new transaction instead of ignoring it.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2018-10-26 10:21:04 +01:00
Vikrant More
7e40faa37f samples: mesh: nrf52: storing of some Prime states on SoC flash
With this commit it is now possible to save some Mesh Model
Servers State on SoC flash. This impacts initialization &
state binding after NODE reset & that is why some additional
modification has done as per requirements & removed some
code & comments which are redundant as per current
implementation.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2018-10-26 10:21:04 +01:00
Vikrant More
c0f893480a samples: mesh: nrf52: short time multireset bt-mesh unprovisioning
In general, Bluetooth Mesh provisioning process could be failed
because of any reason. Using some h/w interrupt we can call
bt_mesh_reset() or something which will push device into factory
reset mode.

But with some actual products it is not always possible or feasible
to add extra h/w to achieve this goal.

This commit adds facility to push device into factory reset mode
using power reset. As per current implementation user have to
do 5 times reset so that gap between two consecutive reset
should not exceed 7 seconds.

Co-authored-by: Laczen JMS <laczenjms@gmail.com>

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2018-10-26 10:21:04 +01:00
Vikrant More
0030aa9e0a samples: mesh: nrf52: support for extra status responses
With this commit, IUT will send additional status responses
whenever required as per PTS requirements.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2018-10-26 10:21:04 +01:00
Vikrant More
9d5697f50a samples: mesh: nrf52: added separate Server's Publisher functions
Separately defined functions for Servers. This would help
to send extra status responses whenever required.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2018-10-26 10:21:04 +01:00