Commit graph

19400 commits

Author SHA1 Message Date
Neil Armstrong
8359e46d48 boards: nucleo_f091rc: add SPI1 and SPI2 pinmux
Add the SPI1 and SPI2 pinmux for the nucleo_f091rc board

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2018-01-11 19:00:19 -05:00
Neil Armstrong
5f5480ac7d hal: stm32cube: Fix warning when SPI STM32F0 LL API is compiled
Current implementation of LL_SPI_TransmitData16 on F0 family
generates following warning:
"warning: dereferencing type-punned pointer will break strict-aliasing
rules [-Wstrict-aliasing]"
Besides being forbidden by rule, this cast is not needed, as register is
16 bits wide. Modification has been tested on F0 SoC.
stm32yyxx_ll_spi.h being included in soc.h file, warning is generated
at each compiled object, this commit allows a clean build.
This issue is referenced in ST and tracked under
reference  13359. Code will be updated on upcoming stm32cube updates.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2018-01-11 19:00:19 -05:00
Neil Armstrong
7caa56f608 spi: spi_ll_stm32: Add support for STM32F0
Add support for STM32F0 similar to STM32F3 and STM32L4

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2018-01-11 19:00:19 -05:00
Neil Armstrong
9c3f7e11fb arch: arm: soc: stm32f0: include LL spi header
Include the STM32Cube LL SPI Header for STM32F0

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2018-01-11 19:00:19 -05:00
Neil Armstrong
b5938c43fb ext: hal: stm32cube: build LL SPI code for STM32F0
Build the STM32Cube LL SPI Code for STM32F0

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2018-01-11 19:00:19 -05:00
Jonas Pfaff
1d8e7a58c0 arm: atmel: soc: Soc init can be executed twice
Signed-off-by: Jonas Pfaff <jonas.pfaff@gmail.com>
2018-01-11 19:00:19 -05:00
Alberto Escolar Piedras
66a1454ce6 native: Accept command line arguments
The native_posix board will accept command line arguments
which the application / test may pick by calling
native_get_cmd_line_args()

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-01-11 18:02:54 -05:00
Alberto Escolar Piedras
095300a3e1 tests: bluetooth/bluetooth can also be run in native_posix
The bluetooth/bluetooth can also be run in the native_posix
board

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-01-11 18:01:01 -05:00
Kumar Gala
cd7ca95378 arm: nxp_mpu: Fix build issue when asserts enabled
When asserts are enabled we run into an issue with newlib and types of
printf style formatters not matching.  The easy fix to this is to cast
the uint32_t to u32_t to make things consistent with or without newlib
enabled.

This fixes #5645

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-11 15:20:03 -06:00
Sebastian Bøe
6f946e20b6 cmake: Execute arch/CMakeLists.txt before subsys/CMakeList.txt
Re-order the execution of the arch/ and subsys/ CMakeLists.txt code to
work around a manifestation of issue #6505. When OpenThread created an
External project in subsys, it did not have access to important
toolchain flags added in arch/.

Intuitively, subsystems might depends on how the ARCH is configured,
but the ARCH shouldn't depend on any subsystem.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-01-11 16:06:55 -05:00
Carles Cufi
07a64f19ed cmake: Use find_program() to locate the toolchain
Instead of hard-coding the path use find_program(), since that allows
CMake to sort out platform-specific details such as .exe extensions on
Windows.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-01-11 16:05:05 -05:00
Sebastian Bøe
d3304dc508 bluetooth: Fix cast in bt_buf_get_type
The function returns an enum, not a u8_t, so we should cast
appropriately to avoid an implicit conversion.

This construct was triggering this compilation error when compiling
with CXX:

/home/sebo/zephyr/include/bluetooth/buf.h:85:9: error: invalid
  conversion from ‘u8_t {aka unsigned char}’ to ‘bt_buf_type’
  [-fpermissive] return *(u8_t *)net_buf_user_data(buf);

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-01-11 16:04:27 -05:00
Sebastian Bøe
f61cd12bf8 bluetooth: Fix "struct bt_gatt_read_params" declaration
Compiling this declaration with a CXX compiler triggers the compiler
error:

/home/sebo/zephyr/include/bluetooth/gatt.h:898:10: error: ‘struct
bt_gatt_read_params::<anonymous union>::__single’ invalid; an
anonymous union can only have non-static data members [-fpermissive]

Reading up on the standard, I was unable to find any mention of this
being valid C or CXX code (But reading the standard is not
straightforward). And I was unable to find any mechanism to make the
CXX compiler accept it (e.g. Changing the -std, or adding this as a
language extension e.g. -fms-extensions).

So we rewrite it to not declare the struct with the tag
"__single". There does not seem to be any reason for it to be declared
like this.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-01-11 16:04:27 -05:00
Yannis Damigos
4b7f3e75dd samples: bmi160: Add testcase filter for SPI_LEGACY_API
Don't run testcase if CONFIG_SPI_LEGACY_API is false.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-01-11 14:35:45 -06:00
Yannis Damigos
d907ed309e samples: bme280: Add testcase filter for SPI_LEGACY_API
Don't run testcase if CONFIG_SPI_LEGACY_API is false.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-01-11 14:35:45 -06:00
Yannis Damigos
4d2dbab036 boards: stm32f1: Clean up driver generic flags
Clean up driver generic flags from boards' _defconfig files

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-01-11 14:35:45 -06:00
Yannis Damigos
c868ac0238 boards: stm32f0: Clean up driver generic flags
Clean up driver generic flags from boards' _defconfig files

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-01-11 14:35:45 -06:00
Yannis Damigos
2cb692e7de boards: stm32f3: Clean up driver generic flags
Clean up driver generic flags from boards' _defconfig files

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-01-11 14:35:45 -06:00
Yannis Damigos
96740a0570 boards: stm32l4: Clean up driver generic flags
Clean up driver generic flags from boards' _defconfig files

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-01-11 14:35:45 -06:00
Yannis Damigos
d60dc69ee7 boards: stm32f4: Clean up driver generic flags
Clean up driver generic flags from boards' _defconfig files

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-01-11 14:35:45 -06:00
Yannis Damigos
a6f8283ecd arch: st_stm32: Add common series configuration file
Add common series configuration file

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-01-11 14:35:45 -06:00
Yannis Damigos
f62d9ef99d include: dt-bindings: stm32_pinctrl: Add ports I, J, K
Add defines for ports I, J, K

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-01-11 14:35:45 -06:00
Yannis Damigos
ef0d77b74e drivers: gpio_stm32: Add defines for ports I, J, K
This patch adds defines for ports I, J, K and
refactors gpio_stm32.h file.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-01-11 14:35:45 -06:00
Carles Cufi
7d764b35f3 cmake: Use path-corrected version of ZEPHYR_BASE
Instead of accessing the environment variable ZEPHYR_BASE every time we
require accessing the source code root, use an intermediate variable
that has OS path separators correctly set to '/' to avoid issues on
Windows.

Note: This removes the ZEPHYR_SOURCE_DIR CMake variable. External
applications using that will need to change to use the new ZEPHYR_BASE
variable.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-01-11 14:59:03 -05:00
Anas Nashif
e09646ab12 ci: update docker image for CI builds
The new images has package updates including:
- ninja-build
- lcov
- new versions of doc generations packages
- gcovr
- gcc-6-multilib

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-11 12:50:49 -05:00
Anas Nashif
73220b79ab boards: arduino_zero: document build using cmake
Use built-in macro for build instructions.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-11 12:50:14 -05:00
Anas Nashif
320c078c02 tests: mqtt_packet: fix README and adapt for cmake
Use built-in macro for build instructions.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-11 12:50:14 -05:00
Anas Nashif
5f42cb1b12 tests: mem_protect: fix README and adapt for cmake
Use built-in macro for build instructions.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-11 12:50:14 -05:00
Anas Nashif
e029e94100 tests: fs: fix README and adapt for cmake
Change build instructions to use CMake and remove confusing
'Troubleshooting' section.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-11 12:50:14 -05:00
Anas Nashif
a2002e6069 samples: nfc: update README
Update README for usage with CMake.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-11 12:50:14 -05:00
Paul Sokolovsky
84e3d3e7e8 libc: Kconfig: Move STDOUT_CONSOLE from subsys/debug
This option is clearly not related to debugging, but affects libc
features.

Fixes: #5566

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-01-11 12:47:10 -05:00
Carles Cufi
907735dd58 scripts: parse_syscalls: Multiplatform separators
In order to support both "/" and "\" as OS path separators,
use the correct Python os.sep helper.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-01-11 10:48:56 -05:00
Anas Nashif
abfed53525 gitlint: fix check for line_count
We should check if the commits line is less than, not less/equal...

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-11 10:48:03 -05:00
David B. Kinder
77d877c0d9 doc: update doc tools versions
I've been successfully using the latest sphinx/breathe/docutils
and doxygen versions for local doc build testing. The CI system
already uses the latest doxygen, so this patch updates the
pip-installed sphinx, breathe, and docutils tools too.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-01-11 06:51:22 -05:00
Anas Nashif
2dd5cef811 gitlint: do not allow title-only commit messages
It has been agreed in the project TSC to reject commit messages without
any content. Every commit message needs some explaination beyond what
was put in the title, even the most trivial ones.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-11 06:39:42 -05:00
Sebastian Bøe
daa39867b8 cmake: sdk: Improve error message when INSTALL_DIR is wrong
Add an assertion that verifies the user has not misconfigured
ZEPHYR_SDK_INSTALL_DIR.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-01-11 06:39:12 -05:00
Pedro Martucci
df37588b6f net: ip: shell: Fix ipv6 echo reply callback to unref packet
When testing ping6 with net shell, it was noticed that after some
sucessive calls the applications stopped to handle rx packets.
Analyzing other icmpv6 register callbacks it was verified that is
necessary to unref packets before returning NET_OK.

Signed-off-by: Pedro Martucci <pedropaulomartucci@gmail.com>
2018-01-11 09:19:48 +02:00
Michael Scott
a21563d1a8 net: lib: lwm2m: fix coap proxy resource option
commit 2a7546fb5a ("net: lwm2m: add support for coap2coap proxy")
erroneously changed the COAP_OPTION_* used to specify the coap2coap
or coap2http proxy resource used from COAP_OPTION_URI_PATH to
COAP_OPTION_PROXY_SCHEME.

Changing it back to COAP_OPTION_URI_PATH requires us to re-order how
the coap options are appended to the packet as the coap options must
be added in the order specified by the numbers in:
https://tools.ietf.org/html/rfc7252#section-12.2

Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
2018-01-11 09:18:45 +02:00
Robert Chou
33030721c4 net: lwm2m: increase packet reference to avoid packet being freed
CoAP packet w/ confirmation flag set is required to be retransmitted
before it got the ACK message from the peer.

However, the packet is usally unreference once it's sent to the network.
Although we set the timeout as no wait when calling function
net_app_send_pkt(), it's still possible that the packet is unreferenced
before we got a chance to increase the packet reference by calling
coap_pending_cycle().

Usually, the IP stack will generate an ARP packet first and then send
out the packet.  However, this is not the case when the remote is a
loopback address.

As issue #5101 described, when asking client to perform a firmware pull
on URL "coap://127.0.0.1:7783/large". The packet will be unreferenced
immediately after calling net_app_send_pkt(). Which then result in
client hang.

The solution to the issue is to increase the reference count on the
sending packet and decrease it after the process is finished.

Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
2018-01-11 09:18:10 +02:00
Sebastian Bøe
4971d2a084 cmake: Fix "make VERBOSE=1"
It is desired behaviour that when 'make VERBOSE=1' is invoked, the
underlying scripts will be invoked in 'verbose mode', e.g. they have
the flag --verbose passed to them.

This patch modifies all the underlying scripts in the build system to
inject --verbose into the command line when the environment variable
VERBOSE is set.

The environment variable VERBOSE is a CMake concept. CMake will
generate Makefile's that read this environment variable and try to
behave accordingly. Unfortunately, the generated ninja build systems
behave differently and will have to be invoked like this:

VERBOSE=1 ninja -v

This fixes #4851

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-01-10 22:14:53 -05:00
Sebastian Bøe
c6f367d251 cmake: Give descriptive error to user when cloned with core.autocrlf
Windows users have on multiple occasions cloned Zephyr using a Windows
git client. It seems that the windows git client defaults to
converting line endings from LF to CRLF when cloning repo's. This
breaks at least one of Zephyr's tools (Kconfig).

This patch introduces a sanity check of the environment for MSYS
users.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-01-10 22:12:27 -05:00
Tomasz Bursztyka
671514fc59 boards/usb_kw24d512: Cleaning up defconfig
Old reference on driver's specific raw mode was still lurking around.
Removing those.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-01-10 21:53:01 -05:00
Tomasz Bursztyka
f4664f1d9a drivers/ieee802154: Cleaning up CMakeLists.txt
Old reference on driver's specific raw mode was still lurking around.
Removing those.

Fixes #5270

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-01-10 21:53:01 -05:00
Tomasz Bursztyka
5195ddf472 drivers/ieee802154: Cleanup Kconfig
A very old reference to former net stack was still lurking around.
Removing it.

Taking the opportunity to clear up dependencies.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-01-10 21:53:01 -05:00
17fcbc3f9b serial: sam0: add support for interrupt based transmit.
Signed-off-by: Michael Hope <mlhx@google.com>
2018-01-10 21:49:18 -05:00
Michael Scott
33ea1b5c89 net: skip TX max send calculation in net_pkt_append() for RX packets
We shouldn't limit the amount of data appended to RX packets based on
the max send size of TX packets.  Skip this check for packets in the
RX slab.

Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
2018-01-10 21:48:20 -05:00
Michael Scott
6338ec0546 Revert "net: net_app: set packet data_len on incoming packets"
This reverts commit 3599d793c2.

Setting a packet's data_len here doesn't fix the fact that we shouldn't
be using it at all on RX packets.  Fix belongs in net_pkt_append().

Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
2018-01-10 21:48:20 -05:00
Michael Scott
a75458131a net: lib: app: trigger TLS closure when connection is closed
When testing TLS connections on production web server, it was noticed
that the TLS mainloop was getting "hung" after a connection was made
via HTTPS and then closed by the server.  The TLS mainloop was never
being notified that the connection was closed and was stuck waiting
for more data.

The next time that connection was used, TLS would fail to start.

Let's force trigger a closure of the TLS process when the net-app layer
is notified of the connection closure.  This allows the connection to
be successfully reused later.

Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
2018-01-10 21:47:46 -05:00
Jukka Rissanen
e63a781612 drivers: eth: mcux: Use correct Kconfig option for RX bufs
The mcux ethernet driver was using TX buf count when allocating
RX buffers.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-01-10 10:32:16 -06:00
Mariusz Skamra
2f81942754 Bluetooth: mesh: Fix model subscription groups cleanup
Virtual address labels array entries were not updated on va deletion,
so that STATUS_INSUFF_RESOURCES error was returned after few
subsequent Config Model Subscription Virtual Address Add, Delete,
Overwrite commands, even if there shall be free space available.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-01-10 16:38:53 +02:00