Commit graph

99049 commits

Author SHA1 Message Date
Anas Nashif
6d5ac1c089 ci: do not build btsim if we are not going to run it
We were building this on every node.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-20 16:36:10 -05:00
Mieszko Mierunski
c9906dd3cf dts: nrf: Remove qdec dts.fixup defines and use aliases instead.
Changed driver to use defines from aliases instead of fixup.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2018-11-20 22:18:09 +01:00
Mieszko Mierunski
066fe7294e dts: nrf: Remove cryptocell dts.fixup defines and use aliases insted.
Changed driver to use defines from aliases instead of fixup.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2018-11-20 22:18:09 +01:00
Mieszko Mierunski
ac4f588e1f dts: nrf: Remove USBD dts.fixup defines and use aliases instead.
Changed driver to use defines from aliases instead of fixup.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2018-11-20 22:18:09 +01:00
Mieszko Mierunski
94dc637c65 dts: nrf: Remove WDT dts.fixup defines and use aliases instead.
Changed driver to use defines from aliases instead of fixup.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2018-11-20 22:18:09 +01:00
Mieszko Mierunski
80421d3f5f dts: nrf: Remove GPIOTE dts.fixup defines and use aliases instead.
Changed driver to use defines from aliases instead of fixup.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2018-11-20 22:18:09 +01:00
Mieszko Mierunski
b370b2ba05 dts: nrf: Remove ADC dts.fixup defines and use aliases instead.
Changed driver to use defines from aliases instead of fixup.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2018-11-20 22:18:09 +01:00
Mieszko Mierunski
34cb33daa8 dts: nrf: Remove UART dts.fixup defines and use aliases instead.
Changed driver to use defines from aliases instead of fixup.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2018-11-20 22:18:09 +01:00
Mieszko Mierunski
c1f7e0c955 dts: nrf: Remove SPI dts.fixup defines and use aliases instead.
Changed driver to use defines from aliases instead of fixup.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2018-11-20 22:18:09 +01:00
Mieszko Mierunski
5a10087a25 dts: nrf: Remove TWI dts.fixup defines and use aliases instead.
Changed driver to use alias defines instead of fixup.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2018-11-20 22:18:09 +01:00
Kumar Gala
5f09eae7a1 kconfig: Hide the DesignWare SPI driver on unsupported platforms
When users are configuring applications they are given the option
to enable the DesignWare SPI driver. But they should not be given this
option on SoCs that don't have the DesignWare SPI HW.

This commit hides the driver by default by introducing the config
option HAS_SPI_DW.

Fixes: #10825

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-20 15:50:42 -05:00
Kiril Zyapkov
23cb7dd660 soc: st: add STM32L471xG
This commit adds support for STM32L471xG. Since STM32L475 only adds
USB, stm32l475.dtsi now includes stm32l471.dtsi

Signed-off-by: Kiril Zyapkov <k.zyapkov@allterco.com>
2018-11-20 14:09:04 -06:00
Aurelien Jarno
6194b7676c drivers: flash: add flash driver support for Atmel SAM E70
This patch adds a flash driver for the Atmel SAM E70 SoC. The driver has
been kept simple by considering that the flash is only composed of 8-KiB
blocks. Indeed an area at the beginning of the flash might be erased
with a smaller granularity, and the other blocks can also be erased with
a higher granularity. It also only handles the global read/write
protection, not the 128-KiB lock regions. A write error is returned if
a region is locked.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-11-20 14:11:07 -05:00
Kumar Gala
41e43111dc cmake: Remove global include of board dir
Remove having ${BOARD_DIR} in the global include path for Zephyr builds.
Needed to add this to the arch/posix because of how posix "boards"
define various things like interrupt handling.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-20 14:08:01 -05:00
Kumar Gala
a1a321431b boards: up_squared: Rework dts_fixup.h to work w/o BOARD_DIR include
Merge up_squared_dts_fixup.h and up_squared_sbl_dts_fixup.h into
dts_fixup.h.  This allows us to remove BOARD_DIR from being included
everywhere.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-20 14:08:01 -05:00
Sebastian Bøe
985b93a367 cmake: Fix python version detection
The 'FindPythonInterp' that is distributed with CMake 3.8 is affected
by bug: https://github.com/zephyrproject-rtos/zephyr/issues/11103

To work around this, until we upgrade to 3.13, we copy and patch the
3.8 version of 'FindPythonInterp' into the Zephyr repository.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-11-20 19:37:57 +01:00
Sebastian Bøe
db63841210 cmake: Copy CMake's FindPythonInterp.cmake into the repo
Copy the 3.8.2 version of FindPythonInterp.cmake into the repo so that
we can patch it and fix #11103.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-11-20 19:37:57 +01:00
Vikrant More
fad8ff39c3 samples: mesh: nrf52: use timer in case of transition
With this commit, if message contains transition time then
and only then timer would get started.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2018-11-20 20:35:20 +02:00
Vikrant More
53902c680b samples: mesh: nrf52: changes to make immediatly send GET responses
With this commit now it is simple to understand flow of logic when
NODE receives any message & how it proceed things one by one.

Plus NODE will immediately send GET status to Client instead of
waiting for things which has less priority.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2018-11-20 20:35:20 +02:00
Grzegorz Kolodziejczyk
3abb8a8521 samples: reel_board/mesh_badge: Fix sensor statuses struct organization
Patch modifies structure organization to be specification compliant.

Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@codecoup.pl>
2018-11-20 18:00:51 +02:00
Andrei Gansari
bf988dc3af boards: mimxrt1050_evk: networking added to documentation
Board documentation updated with Networking related infomation.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2018-11-20 09:54:25 -06:00
Andrei Gansari
f37ec3b0af samples: net: some samples min_flash = 140k
In order to prevent failing tests on i.MX RT the following samples were
limited to a minimum 140k of flash: http_client, http_server,
socket/echo_client and sockets/echo_server.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2018-11-20 09:54:25 -06:00
Andrei Gansari
a5174be648 mimxrt1050_evk: enabling networking hardware
Enables Networking hardware on i.MX-RT 1050-EVKB board.
Pinout enabled board specific etherenet connection, also pin
initialization was moved later to PRE_KERNEL_2 in order to have
sysclock initialized before.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2018-11-20 09:54:25 -06:00
Andrei Gansari
35ba3aadc4 drivers: eth_mcux: adding i.mx-rt support
Enables Networking hardware on i.MX-RT type drivers.
Reuses the same eth_mcux driver used by Kinetis family; initialization
sequence refactored to work with this board as well. Unlike Kinetis
family, i.MX has a single ENET interrupt and we need to discriminate
between interrupts using a status register.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2018-11-20 09:54:25 -06:00
Andrew Boie
3aa59a6eed tests: test dynamic IRQ APIs
The gen_isr_table test now tries to install two dynamic
IRQ handlers.

RISCV32 has a workaround due to limited number of SW
triggerable interrupts that can be configured.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-11-20 09:30:34 -05:00
Krzysztof Chruscinski
e85986e153 logging: refactor log_filter_set to set existing log level
Modified log_filter_set function to limit level if requested
level is not compiled in. Additionally, extended function to
return actually set level. Removed redundant code from log_cmds.

Change fixes shell log backend initialization which was setting
log levels without taking into account compiled in limits.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-11-20 08:43:34 -05:00
Luiz Augusto von Dentz
57a6858278 Bluetooth: ATT: Rename op parameter of att_write_rsp
This makes it clear that only request need to set an opcode since they
require a error response in case it fails.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2018-11-20 13:14:58 +02:00
Luiz Augusto von Dentz
8f812f30a1 Bluetooth: GATT: Fix comment related to write attribute
The comment was suggesting that write callback was reading and storing
buffer when in fact it should write to the attribute value.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2018-11-20 13:14:58 +02:00
Luiz Augusto von Dentz
ae05089946 Bluetooth: GATT: Add flag to indicate write command
Application may need to handle the write differently depending on the
write operation so this adds a flag called BT_GATT_WRITE_FLAG_CMD which
can then be checked by the callback, for instance one can respond with
BT_ATT_ERR_WRITE_REQ_REJECTED when that flag is not set which should
indicate to the client to use write command instead.

Fixes #11206

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2018-11-20 13:14:58 +02:00
Marek Pieta
ac31020deb doc: subsystems: shell: Documentation fix
Change fixes typo in documentation.

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2018-11-20 12:11:22 +01:00
Andy Ross
7d78122caa lib/mempool: One more spurious -ENOMEM condition
Similar to the last patch, there was a spot in block recombination
where the lock would be released while the combined block was being
held allocated.  That means that when recombining a single top-level
block, it was possible for the entire heap to look allocated.

Make the combination and re-addition of the larger block atomic.
Requires a little surgery to the structure of the code, so this is a
little more involved than the earlier fix.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-11-20 11:35:10 +01:00
Andy Ross
7845e1b01e lib/mempool: Fix spurious -ENOMEM due to agressive latency control
The mempool operations need to be atomic, but because of latency
concerns (the allocator is intended for use in an ISR) the locking was
designed to be as minimal as possible.  And it... mostly got it right.
All the list handling was correctly synchronized.  The merging of four
child blocks into a parent block was atomic.  The splitting of a block
into four children was atomic.

BUT: there was a moment between the allocation of a large block and
the re-addition of its three unused children where the lock was being
released.  This meant that another context (e.g. an ISR that just
fired, interrupting the existing call to k_mem_pool_alloc()) would see
some memory "missing" that wasn't actually allocated.  And if this
happens to have been the top level block, it's entirely possible that
the whole heap looks empty, even though the other allocator might have
been doing only the smallest allocation!

Fix that by making the "remove a block then add back the three
children we don't use" into an atomic step.  We can still relax the
lock between levels as we split the subblocks further.

(Finally, note that this trick allows a somewhat cleaner API as we can
do our "retry due to race" step internally by walking back up the
block size list instead of forcing our caller to do it via that weird
-EAGAIN return value.)

Fixes #11022

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-11-20 11:35:10 +01:00
Paul Sokolovsky
2e21a95fd4 net: sockets: zsock_close: Be sure to free file descriptor
File descriptor I freed automagically when using POSIX subsystem's
close() function, but any subsys-adhoc functions like zsock_close()
should do that explicitly.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-11-20 11:25:17 +01:00
Vinayak Kariappa Chettimada
aa5bbd5dfe Bluetooth: controller: Fix enable and disable of scan state
Updated controller implementation to disallow disabling
initiator state using scan disable. But allow disabling an
already disabled scan state. Also, disallow enabling scan
state while in initiator state.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2018-11-20 11:19:07 +01:00
Luiz Augusto von Dentz
3fdedde967 Bluetooth: ATT: Assert if request is invalid
Consider invalid if the request pointer is NULL or the callback is NULL
or there is a request ongoing. This conditions would likely lead to a
crash and most likely there is some other bug involved like for example
the application queueing the same request multiple times.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2018-11-20 11:15:33 +01:00
Rajavardhan Gundi
4e8e0748e8 storage: flash_map: Make flash_map as extern
flash_map should be made extern in flash_map.c since it is defined
in flash_map_default.c. Not having flash_map as extern will result
in build errors.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2018-11-20 11:15:16 +01:00
Vinayak Kariappa Chettimada
c326ae729f Bluetooth: controller: Do not feature exchange more than once
Updated the controller implementation to not feature
exchange if already done once either by local or remote peer
device in an active connection session.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2018-11-20 11:14:58 +01:00
Flavio Ceolin
c554ab7100 subsys: logging: Fix invalid memory access
Coverity-CID: 189512

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-11-20 11:14:31 +01:00
Spoorthi K
06fa2e6764 tests: msgq: Modify test to verify k_msgq_peek
Verify k_msgq_peek() API functionality by
modifying existing test suite.

Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
2018-11-19 22:43:04 -05:00
David B. Kinder
e4759cbc41 doc: fix links in Galileo doc
Fix link text to remove substitutions that are ignored by Sphinx.  Also
replace link to Quark SOC HW ref manual to be from an Intel site (not
Russian).

Fixes: #11516

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-11-19 21:36:22 -05:00
Sathish Kuttan
e275ae5e06 doc: kernel: add k_msgq_peek() API
Add documentation for k_msgq_peek()

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2018-11-19 17:53:22 -05:00
Sathish Kuttan
a8aa235d9b kernel: msg_q: k_msgq_peek() implementation
Add implementation for k_msgq_peek() which is similar to k_msgq_get()
except the message is not deleted from the queue.

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2018-11-19 17:53:22 -05:00
Sathish Kuttan
3efd8e17bd kernel: Add k_msgq_peek() API
Add an API to peek into a message queue and read the first message
without removing the message from the queue.

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2018-11-19 17:53:22 -05:00
Anas Nashif
10b1ee149f ci: use v0.4-rc14 image
- Has cmake 3.8.2 that matches min. required version
- Has west pre-installed
- Uses latest python dependencies from scripts/requirements.txt
- remove ISSM toolchain
- added scancode-toolkit for scanning licenses and copyrights.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-19 17:22:23 -05:00
Sebastian Bøe
8ba5aff8c0 kconfig: Drop support for specifying CROSS_COMPILE through Kconfig
When we move DT infront of Kconfig we are going to need access to a C
toolchain before Kconfig is evaluated. This means it will not be
possible to specify the toolchain used through Kconfig.

To deal with this we ...

Drop support for specifying CROSS_COMPILE through Kconfig. Still
available is the ability to specify CROSS_COMPILE through the
environment or through a CMake variable.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-11-19 15:04:13 -05:00
Anas Nashif
10970a60c0 sanitycheck: remove unused platforms keyword
This keyword had no effect and was being copied over to many samples
errornously.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-19 15:03:55 -05:00
Gil Pitney
759b987f72 drivers: serial: Update cc32xx uart interrupt handling
The Zephyr console and shell interrupt processing assumes
a TX interrupt is evoked upon first enabling the TX
interrupt via uart_irq_tx_enable.

This was not the case with the cc32xx uart, coming out of
reset, with FIFO's disabled.

The only way found to achieve this behavior is to fill
the fifo with a non-printable character on initialization.

Also, the uart driver was explicitly clearing TX/RX interrupts in
its isr, which was unnecessary, as the act of reading/writing
did that implicitly.

These fixes allow the cc32xx uart to work with the
current Zephyr console/shell design.

Fixes: #11202

Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2018-11-19 14:01:29 -06:00
Sebastian Bøe
84fe1ec63f cmake: Don't remember misnamed boards
CMake prints a helpful error message with all the boards supported
when a board name has been misspelled. But CMake also
remembers (caches) the corrupted board name and refuses to change it
until the board directory has been cleared.

CMake is rightly hesitant to change the board, as other cached
variables depend on what the board is. But it is safe to change the
board just after it has been selected, because we verify it's
correctness before using it to calculate other variables.

So to support the use-case of changing a misspelled board
name (without clearing the build directory) we unset the cached board
when it is invalid.

Also; change the now unused (in-tree) macro 'assert_with_usage' to
'print_usage'.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-11-19 11:42:25 -05:00
Bobby Noelte
098dbfd185 dts: scan application dir for files included by dts
In addition to zephyr/include and zephyr/dts also scan
the dts directory within the application source directory
for files included by the DTS.

Allows to have application specific DTS includes. This
is especially useful for out of tree drivers.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2018-11-19 11:41:42 -05:00
Robert Lubos
1d4223ef3a samples: sockets: Set correct log module name in echo_server
echo_server used incorrect net_echo_client_* names for logger.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2018-11-19 11:40:39 -05:00