Commit graph

95513 commits

Author SHA1 Message Date
Kumar Gala e860775873 Revert "arch: arm: stm32: correct include issue"
This reverts commit 30529da0e4.

We should include SoC headers from HALs before we include
kernel_includes.h.  On ARM this is needed because we tend to get CMSIS
related defines setup by the HAL headers.

Fixes: #8593

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-06-28 10:54:38 -05:00
Krzysztof Chruściński e892ca08f1 ext: debug: segger: Updating Segger RTT to 6.32d
Segger RTT update includes alignment of SEGGER_RTT_Conf.h to use
KConfig configuration.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2018-06-28 09:36:58 -05:00
Krzysztof Chruściński e1ff7cef12 ext: debug: segger: Move RTT configuration to KConfig
Extended KConfig to be able to control configuration present in
SEGGER_RTT_Conf.h file.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2018-06-28 09:36:58 -05:00
Krzysztof Chruściński 5a1313f804 drivers: console: rtt: RTT session awareness
In order to avoid bytes dropping when RTT output buffer is full,
RTT session detection algorithm is introduced to the RTT console.
If host session is detected console retries after wait state
expecting host to empty the buffer. If host session is not detected
console drops the byte without retrying.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2018-06-28 09:36:58 -05:00
Kumar Gala 6c6a66623a toolchain: gcc: check if __weak is defined
Avoid build conflict when __weak is defined by someone else.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-06-28 09:13:17 -05:00
Jukka Rissanen 8c5c111c97 doc: net: Add information about gPTP
Add gPTP information to documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Julien Chevrier <julien.chevrier@intel.com>
2018-06-28 16:50:50 +03:00
Jukka Rissanen 066edbb233 net: shell: Add gptp command
This "net gptp [port id]" command will give some extra info about
gPTP status if gPTP is enabled in config file.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-06-28 16:50:50 +03:00
Jukka Rissanen 67b4c5d5d4 samples: net: gptp: Sample application for gPTP support
The application does not do much, it just registers to a callback
in order to get information about gPTP.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-06-28 16:50:50 +03:00
Jukka Rissanen 45b06a252f net: gptp: Initial core IEEE 802.1AS support
Core IEEE 802.1AS-2011 (gPTP) support and application interface.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Julien Chevrier <julien.chevrier@intel.com>
2018-06-28 16:50:50 +03:00
Yurii Hamann e69c058958 boards: arm: stm32: Basic support for STM32F746G-DISCO board
The patch contains basic code support, documentation, dts
file and openocd configuration for STM32F746G discovery board.
This patch related to the issue #6982.

Signed-off-by: Yurii Hamann <yurii@hamann.site>
2018-06-28 08:29:32 -05:00
Yurii Hamann 58643f3d86 arm: stm32: STM32F7 family device tree
This patch includes:
STM32F7 family device tree file with basic and UART definitions.
STM32F746 subfamily device tree file.
Memory definitions for STM32F746xG subfamily.

Signed-off-by: Yurii Hamann <yurii@hamann.site>
2018-06-28 08:29:32 -05:00
Yurii Hamann 75d3d94c90 drivers: interrupt_controller: stm32: STM32F7 EXTI support
This patch adds EXTI support for STM32F7 family
microcontrollers.

Signed-off-by: Yurii Hamann <yurii@hamann.site>
2018-06-28 08:29:32 -05:00
Yurii Hamann 1fdc790ca2 serial: stm32: STM32F7 UART support
The patch adds serial driver support for STM32F7 family
microcontrollers, includes pinmux definitions and DTS fixup file.

Signed-off-by: Yurii Hamann <yurii@hamann.site>
2018-06-28 08:29:32 -05:00
Yurii Hamann 7482969da6 drivers: pinmux: stm32: STM32F7 pinmux support
This patch adds pinmux header file for STM32F7 famlily
microcontrollers

Signed-off-by: Yurii Hamann <yurii@hamann.site>
2018-06-28 08:29:32 -05:00
Yurii Hamann a229500d23 drivers: gpio: stm32: STM32F7 GPIO support
This patch adds GPIO support for STM32F7 family microcontrollers.

Signed-off-by: Yurii Hamann <yurii@hamann.site>
2018-06-28 08:29:32 -05:00
Yurii Hamann cfb25c74a0 drivers: flash: stm32: STM32F7 flash memory suport
Added flash memory support for STM32F7 family microcontrollers

Signed-off-by: Yurii Hamann <yurii@hamann.site>
2018-06-28 08:29:32 -05:00
Yurii Hamann 4df673f3fc drivers: clock_control: STM32F7 family clock control
This patch adds clock control support for STM32F7 family
microcontrollers.

Signed-off-by: Yurii Hamann <yurii@hamann.site>
2018-06-28 08:29:32 -05:00
Yurii Hamann 7d8d280db3 arch: arm: stm32: Basic STM32F7 family support
The patch includes support for STM32F746xG subfamily.
Related to issue #6981.

Signed-off-by: Yurii Hamann <yurii@hamann.site>
2018-06-28 08:29:32 -05:00
Robert Lubos b813502077 samples: net: Socket based echo_server
Echo server sample running on top of network sockets.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2018-06-28 15:18:42 +03:00
Robert Lubos f01b81731b samples: net: Socket based echo_client
Echo client sample running on top of network sockets.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2018-06-28 15:18:42 +03:00
Ismael Fillonneau 4535b9443d subsys: dfu: img_util: Fix warning with ERR log
GCC complains because of wrong format. commit based on #7412

Signed-off-by: Ismael Fillonneau <ismael.fillonneau@stimio.fr>
2018-06-28 13:02:42 +02:00
Johan Hedberg cd1111e16f mgmt: Reduce net_buf user data requirement
Instead of storing a bt_addr_le_t, just store a pointer to the bt_conn
object (which is what the code is interested in anyway). This way the
user data size requirement drops from 7 to 4, which is the default
that all current users are happy with.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-06-28 10:49:52 +03:00
Johan Hedberg 982385277b net: buf: Make net_buf_user_data() parameter const
This API doesn't modify the input buffer in anyway, so declare it as
const.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-06-28 10:49:52 +03:00
Johan Hedberg 387e91a76b Bluetooth: Mesh: cfg_srv: Ignore Prohibited element addresses
The Configuration Model specification states that all non-unicast
addresses given as the address of an element are Prohibited. The
correct action for Prohibited parameter values is to ignore the
message. As of writing this patch the PTS does not enforce this, but
it might in the future (as it does for many other Prohibited values).

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-06-28 10:48:18 +03:00
Johan Hedberg e69b735a5a Bluetooth: Mesh: Fix checking for model subscription address
Previously the code only checked if any of the models within an
element had the destination address in their subscription list. After
that check the specific model that the message was addressed to was
not verified to have that address in it's subscription list. This
patch fixes the problem.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-06-28 10:48:18 +03:00
Ulf Magnusson 19d7803546 drivers: sensor: Kconfig: Remove redundant 'default n' properties
Bool symbols implicitly default to 'n'.

A 'default n' can make sense e.g. in a Kconfig.defconfig file, if you
want to override a 'default y' on the base definition of the symbol. It
isn't used like that on any of these symbols though.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-27 17:20:10 -05:00
Ulf Magnusson fb0366b339 boards: Kconfig: Remove redundant 'default n' properties
Bool symbols implicitly default to 'n'.

A 'default n' can make sense e.g. in a Kconfig.defconfig file, if you
want to override a 'default y' on the base definition of the symbol. It
isn't used like that for any of the removed properties though.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-27 17:15:31 -05:00
qianfan Zhao e7205be03d arch: stm32: Enable HAS_SEGGER_RTT on all stm32 SoCs
Enable HAS_SEGGER_RTT to allow user to select use of SEGGER RTT
and SystemView solution.

SEGGER provide a firmware that can convent ST-Link to J-Link,
And RTT is supports all stm32 SoCs, so lets enable RTT default

Signed-off-by: qianfan Zhao <qianfanguijin@163.com>
2018-06-27 15:48:38 -05:00
qianfan Zhao af05ff6c55 doc: Introduct debugging and downloading using Jlink on stm32 boards
Introduct the ways to debugging and downloading using JLink tools on
stm32 boards if had convented ST-Link On-Board into a JLink.

Signed-off-by: qianfan Zhao <qianfanguijin@163.com>
2018-06-27 15:48:38 -05:00
qianfan Zhao d1054f78f0 nucleo_f070rb: Add JLink tools for debug and download support
Segger provide a firmware makes the ST-LINK on-board compatible with
J-Link OB, allowing users to take advantage of most J-Link features
such as RTT(Real Time Transfer).

Signed-off-by: qianfan Zhao <qianfanguijin@163.com>
2018-06-27 15:48:38 -05:00
Andrew Boie 8bcffefb33 arch: arm: clean up MPU code for ARM and NXP
* We are now *much* better at not reserving unnecessary
system MPU regions based on configuration. The #defines
for intent are now an enumerated type. As a bonus, the
implementation of _get_region_index_by_type() is much
simpler. Previously we were wasting regions for stack guard
and application memory if they were not configured.

* NXP MPU doesn't reserve the last region if HW stack
protection isn't enabled.

* Certain parts of the MPU code are now properly ifdef'd
based on configuration.

* THREAD_STACK_REGION and THREAD_STACK_USER_REGION was a
confusing construction and has now been replaced with
just THREAD_STACK_REGION, which represents the MPU region
for a user mode thread stack. Supervisor mode stacks
do not require an MPU region.

* The bounds of CONFIG_APPLICATION_MEMORY never changes
and we just do it once during initialization instead of
every context switch.

* Assertions have been added to catch out-of-bounds cases.

Fixes: #7384

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-06-27 12:56:38 -07:00
Christophe Priouzeau 30529da0e4 arch: arm: stm32: correct include issue
This commit correct the issue introduce by aee97be which
changed the order of header inclusion that lead
to warning generation at compilation, that truend into errors
in CI.
This commit reinstantiate the initial header inclusion order.

Fixes #8563
Signed-off-by: Christophe Priouzeau <christophe.priouzeau@st.com>
2018-06-27 12:35:27 -05:00
Erwan Gouriou b3127629c7 ext: stm32cube: update stm32l4xx cube version
Update Cube version for STM32L4XX family
from version: V1.10.0
to version: V1.12.0

This version solves patch in drivers/include/stm32l4xx_ll_spi.h

Note: git shows 100% diff on all files.
You need to tick "Ignore space change" in git UI to see real
differences. I tried different things to fix this without
success (dos2unix, file encoding, files access right).

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-06-27 12:27:15 -05:00
Erwan Gouriou 875afddb28 ext: stm32cube: update stm32f7xx cube version
Update Cube version for STM32F7XX family
from version: V1.8.0
to version: V1.11.0

Note: git shows 100% diff on all files.
You need to tick "Ignore space change" in git UI to see real
differences. I tried different things to fix this without
success (dos2unix, file encoding, files access right).

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-06-27 12:27:15 -05:00
Erwan Gouriou 176042ff34 ext: stm32cube: update stm32f4xx cube version
Update Cube version for STM32F4XX family
from version: V1.18.0
to version: V1.21.0

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-06-27 12:27:15 -05:00
Erwan Gouriou 5347dc1a07 ext: stm32cube: update stm32f3xx cube version
Update Cube version for STM32F3XX family
from version: V1.9.0
to version: V1.9.1

Fixes both patches:
 - Wrong LSI value
 - Issue in LL_SPI_TransmitData16

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-06-27 12:27:15 -05:00
Erwan Gouriou 7eb2276a49 ext: stm32cube: update stm32f1xx cube version
Update Cube version for STM32F1XX family
from version: V1.6.0
to version: V1.6.1

Note: git shows 100% diff on all files.
You need to tick "Ignore space change" in git UI to see real
differences. I tried different things to fix this without
success (dos2unix, file encoding, files access right).

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-06-27 12:27:15 -05:00
Ulf Magnusson 90e8d67848 check-compliance: Fix list_undef_kconfig_refs.py for external projects
External projects might run check-compliance.py from a subdirectory,
while list_undef_kconfig_refs.py expects to find the top-level Kconfig
file in the current directory.

Due to obscure Kconfig ugliness (explained in a comment), the working
directory needs to be changed here, instead of using 'srctree'.

(Thinking of changing that Kconfig behavior so that it only applies to
.config files. Suspect it's been a bug in the C tools all along for
Kconfig files.)

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-27 19:14:22 +02:00
Tomasz Gorochowik ff41ef477e drivers: eth: gmac: Cast to type expected by HAL
This is needed to avoid compilation warnings when using both the
built-in libc and newlib.
The warnings were caused by typedefs incompatibilities.

This was agreed to be the temporary solution at the TSC.

See #8469 for more details.

Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
2018-06-27 11:35:57 -05:00
Ulf Magnusson aa2beb9f10 kconfig: Stop whitelisting "undefined symbol SSE" warning
The warnings were fixed by commit c4123643b5 ("tests: fp_sharing:
Extract x86 configs to separate .conf").

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-27 17:07:16 +02:00
Vinayak Kariappa Chettimada fdedc49a61 Bluetooth: tests: exclude btshell/mesh_shell on NRF52810_PCA10040
Exclude building the btshell and mesh_shell application for
NRF52810_PCA10040 boards due to limited RAM and Flash
availability on the nRF52810 SoC.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2018-06-27 16:09:58 +02:00
Vinayak Kariappa Chettimada cea4b31866 Bluetooth: controller: Add support for the nRF52810
The nRF52810 is a low-cost variant of the nRF52832, with a reduced set
of peripherals and memory. This commit adds Bluetooth controller support
for it.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-06-27 16:09:58 +02:00
Jukka Rissanen 8ae6bad21d net: l2: Move the layer 2 code into subsys/net/
The subsys/net/ directory is more logical place for L2 code instead
of ip/ directory. No functionality changes by this commit.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-06-27 17:02:59 +03:00
Tomasz Bursztyka 099fe7b98f net/ethernet: Let's use the same parameter names everywhere
s/eth_dev/dev

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-06-27 16:37:13 +03:00
Tomasz Bursztyka 59df651cee include: Remove unused header
This eth.h is not used anywhere and is a legacy header from first
network stack.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-06-27 16:37:13 +03:00
Johan Hedberg 59bbab99a8 Bluetooth: Mesh: Fix cyclic rewriting to flash when restoring state
When we're reading the initial state from flash, calling the various
internal functions was leading to scheduling a rewrite to flash. Add
an extra parameter to the appropriate functions so they know when
they're called due to active configuration by a configuration client,
and when they're called due to restoring the state from flash.

This was not only wasting flash space, but also causing erroneous
behavior with the FCB settings backend if there was an intermediate
node reset operation stored, followed by a reprovisioning. The node
reset entries would cause them to be re-appened after the second valid
provisioning, leading to an incomplete node state.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-06-27 15:54:40 +03:00
Johan Hedberg f23e808ed0 Bluetooth: Mesh: Fix redundant model publication clearing
If the model publication is not enabled, we should return success,
however no other steps need to be done. This also helps avoid writing
redundant entries to flash when resetting a node that never had model
publication enabled.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-06-27 15:54:40 +03:00
Johan Hedberg 310320c4d1 Bluetooth: Mesh: Fix initialization order during node reset
There were several things broken with the initialization order during
node reset:

 - The model->flags should not be touched since the writing to
   persistent storage happends through delayed work, and the flags
   need to be kept until that.

 - The unprovision() function should only be called at the very end of
   the reset procedure, since it calls model-specific init functions
   which may clear things which the earlier reset routines depend on.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-06-27 15:54:40 +03:00
Paweł Zadrożniak f3d1b22487 subsys: usb: Fixes USB DFU class by updating the bcdUSB value.
bcdUSB has been previously updated from 1.1 to 2.0 in default
device descriptor, but not in DFU class. After USB bus reset
performed by dfu-util, alternative descriptor is registered
with bcdUSB set to 1.1. This mismatch causes communication failure.
DFU descriptor's bcdUSB has been updated to match default one.

Relates to #7570

Signed-off-by: Paweł Zadrożniak <pawel.zadrozniak@nordicsemi.no>
2018-06-27 13:38:12 +02:00
Joakim Andersson 5e3c48f43c bluetooth: Make controller crypto functions optional
Provide flexibility in choosing to use the host defined crypto
functions or the ones provided by the controller

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2018-06-27 12:12:45 +02:00