Commit graph

41120 commits

Author SHA1 Message Date
Karl Palsson
79b15e374d boards: add stm32l1 discovery
Tested apps: hello_world, blinky
Tested peripherals: UART, SPI

Signed-off-by: Karl Palsson <karlp@etactica.com>
2019-10-16 14:42:54 -05:00
Karl Palsson
e3fdf47b85 pinmux: stm32l1: add spi2 pins
SPI1 pins were already included, add SPI2.

Signed-off-by: Karl Palsson <karlp@etactica.com>
2019-10-16 14:42:54 -05:00
Karl Palsson
d46c1a0c98 stm32/l1: enable spi peripherals
STM32L1 uses the same spi controller as STM32F1 so we can just set the
right addresses and enable them. We also need to add the fixup names and
to correctly include the header for ST LL HAL.

Signed-off-by: Karl Palsson <karlp@etactica.com>
2019-10-16 14:42:54 -05:00
Armando Visconti
1c9840c420 samples/96b_argonkey: microphone: (FIX) stop dmic trigger
Stop the trigger (DMIC_TRIGGER_STOP) after acquiring microphone data

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-10-16 13:05:55 -05:00
David B. Kinder
18e28c4e2a doc: use multi-column display for long lists
A style was recently added that will allow long narrow lists to display
as three columns across the page (with a responsive design that
self-adjusts based on screen width).  This looks much better than a long
list that runs down the page.

Adding this directive before a block (or nested under the directive)
will allow the content to be multi-column:

   .. rst-class:: rst-columns

as explained in
https://docs.zephyrproject.org/latest/guides/documentation/index.html
in the Multi-column lists section.

This PR tweaks a few remaining documents that have such long narrow
lists.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-10-16 13:02:35 -05:00
Krzysztof Chruscinski
7b981e7372 logging: Fix lack of logging after startup
Commit ad28c2d6 introduced semaphore on which logger thread
pends. It is possible that log messages are created before
any backend is attached. In that case, logger thread pends
on semaphore with pending log messages and is not waken up
unless new log messages comes.

Fixed by setting semaphore when first backend is attached.
This wakes up logger thread and log messages can be processed.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-10-16 10:43:31 -07:00
Vinayak Kariappa Chettimada
3d4aef8f99 Bluetooth: controller: split: Stop pre-empt timer
Add pre-empt timer stop when a prepare is executed so that
when the pipeline has another event queued, the firing of
the pre-empt timer does not pre-empt the just executed
prepare.

Relates to #19685.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-10-16 16:00:36 +02:00
Jukka Rissanen
25c8f60fc3 samples: net: dumb_http_server: Using code block when needed
The ab command example needs to be inside code-block.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-10-16 16:47:37 +03:00
Jukka Rissanen
41202ba928 samples: net: sockets: Do not reference default board in docs
Some of the socket samples had wrong information about what default
board to use. Currently there is no default board and user must
select the board when building the application.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-10-16 16:47:37 +03:00
Joakim Andersson
15f755a910 Bluetooth: samples: peripheral_dis: Failed to save with custom settings
The Peripheral Device Information Service (DIS) sample implements it's
own custom settings backend in order to load runtime settings.
This results in errors when the BT stack tries to save entries through
the custom handler since no save handler exists.
Error messages:
 - bt_settings: Failed to save ID (err -2)
 - bt_gatt: Failed to save Database Hash (err -2)

Since this is not a sample of how to do custom settings backend it is
best simply to remove using the custom backend, as it is not required
in order to load runtime settings.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-10-16 16:39:47 +03:00
Peter Bigot
336c90f87c Bluetooth: samples: Reduce the bbc_microbit RAM usage
Reduce the RAM usage in hci_uart to fit in the BBC Microbit's RAM.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-10-16 15:38:12 +03:00
Carles Cufi
b595087b33 manifest: Update the revision of tinycbor
Point to the current revision at the tip of the tinycbor repo after
merging https://github.com/zephyrproject-rtos/tinycbor/pull/7.

Fixes #19629.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-10-16 13:05:21 +02:00
Ulf Magnusson
711c4d8a48 doc: genrest: Support customizing the description on index pages
Extend the specifications passed to --modules to add the form

    <title>:<suffix>:<path>:<index description filename>

<index description filename> points to a file that contains RST that is
inserted at the top of the index page.

If no filename is passed, the old default description is used.

Also add three flags --top-index-desc, --non-module-index-desc, and
--all-index-desc for customizing the text at the top of non-module index
pages.

This functionality is currently unused in Zephyr, but will probably be
used later. It's being added for a downstream project.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-16 11:57:36 +02:00
Erwan Gouriou
35eb46cec3 samples/bluetooth: peripheral: Remove nucleo_f429zi from withelist
samples/bluetooth/peripheral couldn't build on nucleo_f429zi
since settings dependency on flash erase bock size.
On this series, flash erase are done per sector with sector
having varying size, so erase block size can't be used directly.
This has to be sorted, but for now nucleo_f429zi is removed from
sample withelist to unlock CI.


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-10-16 11:40:05 +02:00
Ioannis Glaropoulos
9375aaebe6 tests: kernel: fatal: add a test-case for arbitrary error reason
We add a test-case in kernel/fatal test suite, to test that
the application developer can induce a SW-generated exception
with any 'reason' value.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-10-16 11:22:48 +02:00
Ioannis Glaropoulos
c86073cf6b arch: arm: error: fix ARMv6-M assembly for Z_ARCH_EXCEPT
As we are allowed to pass any integer value as as software
fatal exception reason, we need to fix the inline assembly
for ARMv6-M, to accept large immediate offsets. We do this
by changing the way we write the exception reason to R0.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-10-16 11:22:48 +02:00
Luiz Augusto von Dentz
c736de05fa Bluetooth: GATT: Replace check for CONFIG_BT_SMP
Make use of bt_conn_get_security instead of accessing conn->sec_level
directly.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-10-16 12:08:25 +03:00
Erwan Gouriou
e1ae80c038 samples/bluetooth: peripheral: Support of x_nucleo_idb05a1 ble shield
Aim is to test x_nucleo_idb05a1 shield


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-10-15 18:15:55 -05:00
Erwan Gouriou
171718ef98 shields: x_nucleo_idb05a1: boards: add stm32mp157c_dk2 configuration
Add configuration file for the stm32mp157c_dk2.
Beacon, Central are working.
Peripheral is not compiling because of .elf exceeding FLASH region,
else should be working.

Signed-off-by: Yaël Boutreux <yael.boutreux@st.com>
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-10-15 18:15:55 -05:00
Yaël Boutreux
e48cb1a074 boards: shields: Add x_nucleo_idb05a1
Add shield x_nucleo_idb05a1.
Tested samples with the disco_l475_iot1 (SPI3 disabled to ensure
to test the shield on SPI1, and not the on-board BlueNRG-MS chip):
Beacon, Central and Peripheral have been tested and are working.

Signed-off-by: Yaël Boutreux <yael.boutreux@st.com>
Signed-off-by: Erwan Gouriou <erwang.gouriou@linaro.org>
2019-10-15 18:15:55 -05:00
Robert Lubos
399f213227 net: lwm2m: Cleanup special handling of DNS for offloading
With `CONFIG_NET_NATIVE`, offloaded drivers can specify capabilites with
`NET_IPV4/6` configs, so there is no longer need to handle socket
offloading separately.

Also, initialize hints structure with zeros, as according to man pages
unused fields should be set to 0:
`All the other fields in the structure pointed to by hints must contain
either 0 or a NULL pointer, as appropriate.`

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-10-15 23:31:08 +03:00
Robert Lubos
000226ff54 net: lwm2m: Add config to enable DNS support
Add new config option `LWM2M_DNS_SUPPORT` to the LWM2M library, instead
of relying on `DNS_RESOLVER` which is only compatible with native
network stack. This allows to use DNS with offloaded interfaces
seamlessly.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-10-15 23:31:08 +03:00
Jukka Rissanen
d70a854904 net: tls: Set accepting socket to LISTENING state
This is related to commit 1a6f4a6368 ("net: tcp: Accept
connections only in LISTENING state") which made the system
to only accept new connections if the application had called
accept(). Unfortunately the TLS accept was not fixed by that
commit so we were in wrong state when accepting TLS sockets.
This commit fixes that issue.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-10-15 23:30:34 +03:00
Lingao Meng
345b64f106 Bluetooth: Mesh: Fixed Provision Random buffer size
Fixed some minor issues, missing a byte for opcode.

Fixes: #19767

Signed-off-by: Lingao Meng <mengabc1086@gmail.com>
2019-10-15 23:22:04 +03:00
Paul Sokolovsky
3ea18692c6 sanitycheck: Use os.makedirs to create --report-dir.
os.mkdir() is not suitable to create arbitrary directory path (can
create only a subdir of an existing dir, will error out if already
exists), os.makedirs() should be always used in such cases.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-10-15 11:07:12 -07:00
Ioannis Glaropoulos
04c334ad1b tests: kernel: userspace: replace inline assembly with C code
We replace an inline assembly block of code with CMSIS
functions, to make it portable to ARMv6-M architecture.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-10-15 10:06:48 -07:00
Christoph Reiter
a92a35c2f3 doc: fix list formatting in ring_buffer
There is one level of spaces too much which leads to incorrect
formatting.

Signed-off-by: Christoph Reiter <christoph.reiter@infineon.com>
2019-10-15 09:54:39 -07:00
Andrew Boie
1aaa3d29ce riscv: properly pull in irq_offload logic
This is an optional feature and no logic for it should
be present unless CONFIG_IRQ_OFFLOAD is enabled.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-10-15 09:33:52 -07:00
Andrew Boie
9c76d28bee x86: intel64: fatal: minor formatting improvements
Line up everything nicely, add leading '0x' to hex
addresses, and remove redundant newlines. Add
whitespace between the register name and contents
so the contents can be easily selected from a terminal.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-10-15 09:00:49 -07:00
Andrew Boie
a41c0d2bf9 qemu_x86_long: enable early console
Useful for debugging.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-10-15 09:00:49 -07:00
Andrew Boie
24958f30d9 x86: move z_x86_early_serial_init()
This works with long mode as well, uplevel to
common kernel_arch_func.h.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-10-15 09:00:49 -07:00
Andrew Boie
3b9bcbb23f tests: x86_mmu_api: don't include 32bit cpu header
kernel.h already does the right thing.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-10-15 09:00:49 -07:00
Andrew Boie
fdd3ba896a x86: intel64: set the WP bit for paging
Otherwise, supervisor mode can write to read-only areas,
failing tests that check this.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-10-15 09:00:49 -07:00
Vinayak Kariappa Chettimada
4d4fb8e301 Bluetooth: controller: split: Fix ticks slot used on conn update
Fix incorrectly calculated ticks slots for a connection on
connection update. The reservation incorrectly included the
prepare offset.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-10-15 16:04:05 +02:00
Nick Ward
ef7a814179 samples: drivers: CAN: Remove legacy MCP2515 overlay
DFRobot CAN bus or link_board_can shields can now be used.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2019-10-15 15:48:43 +02:00
Nick Ward
025901df4f samples: drivers: CAN: Update to build cleanly for MCP2515 driver
Add alternate conf file for MCP2515 so it builds without warning.
Update documentation.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2019-10-15 15:48:43 +02:00
Nick Ward
cbaa75daff samples: drivers: CAN: Use common Zephyr bus-speed of 125kbit/s
Consistent use of 125000bit/s for Zephyr CAN code

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2019-10-15 15:48:43 +02:00
Nick Ward
04ab99cd54 boards: shields: Add DFRobot CAN bus Shield V2.0
Useful for prototyping designs for the MCP2515 CAN controller

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2019-10-15 15:48:43 +02:00
Nick Ward
e7ec1a501d boards: nrf52840_pca10056: When SPI is required enable SPI_3 by default
Required by Arduino Uno Rev3 shield connector

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2019-10-15 15:48:43 +02:00
Nick Ward
da3402de8f boards: nrf52_pca10040: When SPI is required enable SPI_2 by default
Required by Arduino Uno Rev3 shield connector

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2019-10-15 15:48:43 +02:00
Joakim Andersson
8ff183eb6c Bluetooth: GATT: Fix bug in bt_gatt_attr_next unable for static handles
Fix bug in bt_gatt_attr_next when given an attribute that has static
allocation. The handle is then 0 and the function would always return
the attribute with handle 1.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-10-15 14:53:03 +02:00
Joakim Andersson
23554b00b8 Bluetooth: host: Fix whitelist for non-central bluetooth applications
Fix compilation issue when wanting to use whitelist in bluetooth
applications that does not have CONFIG_BT_CENTRAL defined.
These functions are useful even for broadcaster and observer roles.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-10-15 15:26:43 +03:00
Joakim Andersson
5229276817 Bluetooth: GATT: Add function to check if attribute has been subscribed
Add public API function in GATT to check if a specific connection has
subscribed to the given attribute.
Without this function the application has to keep track of which
connections has subscribed using the callbacks from BT_GATT_CCC_MANAGED
since the cfg_changed callback of the CCC doesn't carry connection
context.
The other alternative is for the application to parse the information
in the struct _bt_gatt_ccc object. Although this object has structure
information available to the application the structure is marked as
internal, so the application shouldn't rely on this definition.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-10-15 15:08:56 +03:00
Vinayak Kariappa Chettimada
fca32e41e6 Bluetooth: controller: Fix DLE for remote unsupported Coded PHY
Fix Data Length Procedure to use Feature Exchange values to
send correct parameters based on whether Coded PHY is
supported by remote peer.

Relates to BT TS.5.1.1 tests:
LL/CON/MAS/BV-129-C
LL/CON/MAS/BV-130-C
LL/CON/SLA/BV-132-C
LL/CON/SLA/BV-133-C

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-10-15 13:26:29 +02:00
François Delawarde
1ce95de6ae bluetooth: host: Persist Service Changed data
Add support for persisted Service Changed data, to fix the case of a
paired device not reconnecting before a reboot and thus not receiving
SC indication. It also enables support for GATT database being changed
during a firmware update.

Move Service Changed data outside of the CCC struct and make it
persistent by adding support for a bt/sc/... setting.

Signed-off-by: François Delawarde <fnde@oticon.com>
2019-10-15 10:57:08 +02:00
François Delawarde
3a2d269bb4 bluetooth: host: Introduce a config option for Service Changed
The Service Changed characteristic support should also work when the
GATT database has been modified after reboot (firmware update scenario)

This commit introduces a BT_GATT_SERVICE_CHANGED config option that is
independent from BT_GATT_CACHING and BT_GATT_DYNAMIC_DB.

Signed-off-by: François Delawarde <fnde@oticon.com>
2019-10-15 10:57:08 +02:00
Kamil Piszczek
7cd1a1bd7b tests: settings: functional: nvs: adding posix targets
Added native_posix and native_posix_64 targets to the functional tests
of NVS.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2019-10-15 10:50:31 +02:00
Kamil Piszczek
ce413d1412 tests: settings: functional: nvs: removing duplicated config
Removed duplicated configuration for qemu_x86 which matches the default
one.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2019-10-15 10:50:31 +02:00
Ulf Magnusson
e311380584 scripts: edtlib: Forbid multiple bindings with the same compatible
Previously, if two bindings had the same 'compatible:'/'parent-bus:'
values, the binding that happened to be loaded last would get used.

Turn it into an error instead. This avoids tricking people into thinking
that bindings get loaded in a defined order.

Maybe overriding bindings could be allowed later, if we need it.

Fixes: #19536

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-15 10:34:44 +02:00
Ulf Magnusson
72bfa83670 scripts: edtlib: Turn Node.description into a @property
Simplifies the code a bit.

Looks like the description wasn't rstrip()ed when it came from a
'child-binding:' either. This also indirectly fixes that.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-15 10:34:44 +02:00