Commit graph

19400 commits

Author SHA1 Message Date
Anas Nashif 48d11ba18b doc: device.h: fix doxygen grouping
Remove duplicated doxygen group

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-02-07 13:07:46 -05:00
Kumar Gala 8a6381d8e8 dts: flash: Add support for flash labels
Added a label for soc-nv-flash nodes.  Made some updates to the
generation to maintain creating defines for properties like
erase-block-size and write-block-size so they we get both
FLASH_ERASE_BLOCK_SIZE and FLASH_${LABEL}_ERASE_BLOCK_SIZE (same for
WRITE_BLOCK_SIZE).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-02-07 11:28:28 -06:00
Andy Gross c59d6cb760 scripts: sanitycheck: Add MPU userspace related sections
This patch adds app_pad and priv_stacks to the rw section list so that
tests which validate the sections found in the binary pass when run on
systems which contain MPUs.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-02-07 11:14:12 -06:00
Erwan Gouriou 2ede6c67ff sensors: move lps25hb and lsm6ds0 to dts
Introduce yaml binding files for sensors LPS25HB and LSM6DS0.
Fix description issue in lps22hb yaml file

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-02-07 10:30:36 -06:00
Andrzej Puzdrowski b3614c0b17 subsys: fs: fcb: remove f_area_id from fcb structure
It is faster to operate directly on flash_area pointer instead
of fetch it all the time using the fcb flash area id.
Also as f_area_id was needed only for get appropriate flash_area
pointer, so it is better to pass it only while initialization
the fcb and not store it in fcb instance data at all.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2018-02-07 09:51:26 -05:00
Andrzej Puzdrowski 9d56247cc7 test: subsys: fs: fcb: align to using sectors
fcb sectors description switch from using array of flash_area
structures to array of flash_sector structures.
This patch aligns tests to this change.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2018-02-07 09:51:26 -05:00
Andrzej Puzdrowski 95a9dbc4b3 subsys: fs: fcb: rework fcb_walk and its callback
Previously flash_area structure was the parameter for the callback
function for transferring sector location info.
Now flash_sector is used so relevant flash_area is missing for
the callback.

This patch introduces structure fcb_entry_ctx which incorporates
entries' location and relevant flash area. It is used to pass complete
information to the callback. Additional  pointer to the flash_area fcb
speeds up operations.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2018-02-07 09:51:26 -05:00
Christopher Collins e3cd915d8f fs: Convert FCB to use sectors (not areas)
Prior to this commit: `struct fcb` contained a pointer to an array of
`struct flash_area`.  Each entry in the array represented a flash sector
that the fcb comprised.

After commit: `struct fcb` contains a pointer to an array of `struct
flash_sector`, not `struct flash_area`.

Rationale: The FCB needs to know which sectors it occupies for its
rotate operation.  However, the `flash_area` type is meant to represent
a collection of sectors, not a single sector.  `struct flash_area`
contains information that the fcb does not need (e.g., area ID and
device ID).  Furthermore, the flash_map API provides a means of
converting a flash area ID to an array of sectors
(`flash_area_get_sectors()`), but no way to convert to an array of
areas.

Signed-off-by: Christopher Collins <ccollins@apache.org>
2018-02-07 09:51:26 -05:00
Christopher Collins a528d4d3d7 storage: flash_map: fix directory name typo
tests/subsys/storage/flash_mpa --> tests/subsys/storage/flash_map

Signed-off-by: Christopher Collins <ccollins@apache.org>
2018-02-07 09:51:26 -05:00
Christopher Collins ffc90dd496 subsys: storage: flash_map - Remove some code duplication
This patch cleans up flash_map code.

Signed-off-by: Christopher Collins <ccollins@apache.org>
2018-02-07 09:51:26 -05:00
Christopher Collins ffef30d39a storage: flash_map - Fix typo
get_flah_dev_from_id --> get_flash_dev_from_id

Signed-off-by: Christopher Collins <ccollins@apache.org>
2018-02-07 09:51:26 -05:00
Carles Cufi 8f7fdade1b scrips: kconfig: Rebase KConfiglib to latest upstream
Include latest improvements in 2.7.0

Origin: https://github.com/zephyrproject-rtos/Kconfiglib/tree/zephyr

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-02-07 15:26:23 +01:00
Spoorthi K 788b38b8c4 doc: memory_domain: Update memory domain API's documentation
Remove thread from memory domain API (k_mem_domain_remove_thread())has
only one argument which is thread ID as per the implementation whereas
documentation says there has to be two arguments, memory domain and
thread ID.Memory domain argument is not required as a thread belongs
to single memory domain at any point in time. Also memory domain
initialisation function (k_mem_domain_init()) should accept only 3
arguments i.e, memory domain name, number of parts and array of
pointers to the memory domain, instead of 4.

Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
2018-02-07 08:36:18 -05:00
Ding Tao cdcff62f92 sensor: adxl362: Fix typo on Kconfig file
Replace prefix "BMI160_" with "ADXL362".

Signed-off-by: Ding Tao <miyatsu@qq.com>
2018-02-07 08:35:29 -05:00
Ding Tao 68ca36f8f5 sensor: vl53l0x: Fix Kconfig warning of non-int value
The I2C address of vl53l0x are write in hex, but the VL53L0X_I2C_ADDR
type is int.

Fix this by replace "int" with "hex".

Signed-off-by: Ding Tao <miyatsu@qq.com>
2018-02-07 08:35:29 -05:00
Ding Tao 75a3590d20 fs: Kconfig: Fix warning on undefined choice NO_FILE_SYSTEM
Fix this by replace "NO_FS" with "NO_FILE_SYSTEM".

Signed-off-by: Ding Tao <miyatsu@qq.com>
2018-02-07 08:35:29 -05:00
Ding Tao 6c00545d66 native: console: Fix Kconfig "multiple prompts" warnings
NATIVE_POSIX_STDIN_CONSOLE and NATIVE_POSIX_STDOUT_CONSOLE have more
than one prompts, this will cause warnings when run kconfig checks.

Remove one of two prompts.

Signed-off-by: Ding Tao <miyatsu@qq.com>
2018-02-07 08:35:29 -05:00
Carles Cufi 4b23b5d589 arch: arm: Do not enable SW_VECTOR_RELAY with M0+ and VTOR
Whenever a Cortex-M0+ supports the VTOR register it makes no sense to
use the software vector relay mechanism. Therefore change the logic so
that SW_VECTOR_RELAY does not get enabled whenever a VTOR register is
present, but enable it if an M0+ has no VTOR.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-02-07 07:31:32 -06:00
Vinayak Kariappa Chettimada f54f2ceb95 Bluetooth: controller: Rename a microsecond variable
Rename incorrectly named variable storing microseconds, from
ticks_slot to slot_us.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2018-02-07 12:26:34 +01:00
Ravi kumar Veeramally 9ac64c1837 net: tests: Fix coap test case
Test case should first check for next block in the coap packet and
unref the packet (assuming packet has been sent).

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2018-02-07 13:24:25 +02:00
Vinayak Kariappa Chettimada a02606cbf9 Bluetooth: controller: Fix missing ticks to us conversion
Fixed a missing ticks unit to microsecond unit conversion
potentially caused incorrect window offsets being used while
establishing connections.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2018-02-07 11:57:26 +01:00
Vinayak Kariappa Chettimada 978652e7b5 Bluetooth: controller: Remove redundant whitespace
Removed redundant whitespace when dereferencing struct
members.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2018-02-07 11:57:26 +01:00
Vinayak Kariappa Chettimada bb84be2c5c Bluetooth: controller: Fix ticker to use u32_t ticks_slot
ticker timespace reservation can range up to 10.24 seconds,
needing 19-bits to represent in 32KHz clock units. Hence,
fix controller implementation to use u32_t to store ticks
slot values.

Without this fix, the controller is asserting in scan_adv
sample when using continuous scanning with 2 second interval
and window.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2018-02-07 11:48:27 +01:00
Vinayak Kariappa Chettimada ad7c9d3d76 Bluetooth: controller: Improved continuous scanning
Refactored the high frequency clock preparation advanced
feature to improve radio utilization during continuous
scanning.

The inter-event timespace value now considers the reserved
timespace while determining if the high frequency clock
will be retained. This reduces the preparation time, hence
increased radio use inside scan window.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2018-02-07 11:23:10 +01:00
Vinayak Kariappa Chettimada fa724b2bba Bluetooth: controller: Refactor invalid ctrl PDU handling
Refactor the invalid control PDU handling so as to reuse the
switch-case and hence, reduce code size and CPU time used.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2018-02-07 11:20:48 +01:00
Ramakrishna Pallala 318b8e1d20 boards: nios2: altera_max10: Add default Kconfig options for Disk
Add default Disk and Flash Kconfig options for Altera MAX10 board.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-02-06 22:49:37 -05:00
Rajavardhan Gundi 1e6adba9ef drivers/interrupt_controller: Introduce multi-level interrupt support
In a scenario where a platform harbours multiple interrupts to the
extent the core cannot support it, an interrupt controller is added
as an additional level of interrupt. It typically combines several
sources of interrupt into one line that is then routed to the parent
controller.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2018-02-06 22:39:05 -05:00
Anas Nashif 9a839df82e sanitycheck: rename qemu_crash -> handler_crash
qemu is only one of many handler we support now.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-02-06 20:59:35 -05:00
Anas Nashif a49048b9db sanitycheck: all handlers produce the same log now
Rather than having handler generate differently named log files,
generate the same for all handlers, so qemu, native and unit will now
generate handler.log.

This will simplify things and reporting will be consistent.  Also, this
fixes a bug where we only included qemu.log in generated reports.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-02-06 20:59:35 -05:00
Anas Nashif b630ca6292 sanitycheck: fixed function documentation
Functions now accept a different set of parameters, adapt the docs

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-02-06 20:59:35 -05:00
Anas Nashif 61346f0c42 doc: install pyocd using pip2
pyocd does not exist as a python 3 module, use pip2 to install it.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-02-06 19:40:42 -05:00
David B. Kinder 10330cadcb doc: update Zephyr features list in intro
Intro page update to list the features and major changes that
happened in the last year

fixes #5136

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-02-06 19:36:08 -05:00
David B. Kinder 0b1d20e254 doc: Add shell doc for kernel module
Issue #5996 mentions the need for a shell feature that is somewhat
implemented already, but not documented: the "kernel" module has
commands to display information about the kernel version, uptime,
cycles, threads, and stacks, so add that to the subsystem/shell doc.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-02-06 19:35:32 -05:00
Anas Nashif b452e9ecde doc: update package dependencies for Linux
We now require host compiler for building Zephyr in 32bit mode.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-02-06 15:59:36 -08:00
Gil Pitney 3f68f2bc97 soc: ti_simplelink: cc32xx: Remove ARMV7_M guard from CMSIS_IRQn_Type
Remove unnecesary #ifdef CONFIG_ARMV7_M guard in soc.h file.

Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2018-02-06 17:34:25 -06:00
Andy Gross 6042ae9862 scripts: Covert scripts to use elf_helper.py
This patch converts over the current ELF processing scripts to use the
new elf helper python library.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-02-06 15:31:16 -08:00
Andy Gross 826389ab7f scripts: Add elf_helper.py
This patch adds a python helper library that encapsulates the ELF
processing being done across multiple scripts.  Users of this script
will be converted over in a following patch.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-02-06 15:31:16 -08:00
Chunlin Han 18560a01a4 arm: Generate privileged stacks
This patch adds the generation and incorporation of privileged stack
regions that are used by ARM user mode threads.  This patch adds the
infrastructure for privileged stacks.  Later patches will utilize the
generated stacks and helper functions.

Signed-off-by: Chunlin Han <chunlin.han@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-02-06 15:31:16 -08:00
Andy Gross e8860fe8be arm: Add app data section alignment constraints
This patch adds application data section alignment constraints
to match the region definition requirements for ARM MPUs.  Most MPUs
require a minimum of 32 bytes of alignment for any regions, but some
require power of two alignment to the size of a region.

This requires that the linker align the application data section to
the size of the section.  This requires a linker pass to determine the
size.  Once this is accomplished the correct value is added to a linker
include file that is utilized in subsequent linker operations.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-02-06 15:31:16 -08:00
Andy Gross 1f0ff06e38 makefile: Convert linker function to use names
This patch changes the way the custom linker function works.  It uses
names instead of numbers to denote the name of the file and applies
the correct LINKER_PASS variable for the final linker pass.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-02-06 15:31:16 -08:00
Andy Gross 65ac049105 kernel: arm: core: Fix thread monitor wrapping
This fixes the wrapping of the thread monitor specific parts of the
new thread code.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-02-06 15:31:16 -08:00
Mark Vels 6324d11535 sensors: tmp112: Fix breakage on stm32f4 platform
It makes no sense to set the restart condition flag on a first message
and some i2c bus drivers (like the stm32 v1 driver) actually reject
them by returning an error from i2c_transfer().

This patch fixes that by using i2c_burst_read() in tmp112_reg_read()
instead. For consistency, tmp112_reg_write() is also changed to use
i2c_burst_write().

Signed-off-by: Mark Vels <mark.vels@team-embedded.nl>
2018-02-06 17:08:35 -05:00
Mark Vels 018b489aea sensors: tmp112: trivial: Add comment about using this driver for TMP102
I have been using this the TMP112 driver with success with a TMP102
connected to to nucleo-f411re board (via I2C1 using PB8/9).

According to the datasheets, both devices are both driver and pin
compatible although the TMP102 is less accurate.
This temperature sensor is not a thermopile sensor type as stated in
comments.

This patch updates that help info

Signed-off-by: Mark Vels <mark.vels@team-embedded.nl>
2018-02-06 17:08:35 -05:00
Marti Bolivar 4e6e7374c4 flash: mcux: implement software write protection (HACK)
Write protection is currently not supported by the mcux flash
driver. This prevents it from working with the DFU subsystem, which
checks the error codes from the write protect routine. Hack it for now
with a semaphore.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-02-06 15:39:45 -06:00
Carles Cufi 81da97c474 kconfig: Rebase to latest Kconfiglib
A lot of improvements have made it into Kconfiglib since we introduced
it into Zephyr. This rebases our 2 Zephyr-specific commits into the
latest Kconfiglib upstream.

Origin: https://github.com/zephyrproject-rtos/Kconfiglib/tree/zephyr

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-02-06 14:06:04 -05:00
Erwan Gouriou c734c2972f flash: remove obsolete FLASH_DRIVER_NAME
Replace seldom occurrences of FLASH_DRIVER_NAME by equivalent
and commonly used FLASH_DEV_NAME.

Fixes #5919.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-02-06 11:48:53 -06:00
Manivannan Sadhasivam 2c31ccee0e samples: sensor: Add sample application for CCS811 sensor
Add sample application for AMS CCS811 digital gas sensor driver.
This application fetches Co2, VOC, Voltage and Current readings
from the sensor and prints it on serial console continuously.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
2018-02-06 11:16:26 -05:00
Manivannan Sadhasivam 9e88120fdf drivers: sensor: Add support for CCS811 Digital Gas Sensor
Add support for AMS CCS811 Digital Gas Sensor for monitoring
indoor air quality. This sensor reports the following parameters:

1. Co2 concentration
2. VOC concentration
3. Sensor voltage
4. Sensor current

This driver only supports polling mode as of now.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
2018-02-06 11:16:26 -05:00
Manivannan Sadhasivam 75103ad683 sensor: Add Co2, VOC, Voltage, Current channels
CCS811 digital gas sensor supports the following channels:

1. Co2 Channel
2. VOC Channel
3. Voltage Channel
4. Current Channel

Add support for the those in API.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
2018-02-06 11:16:26 -05:00
Ilya Tagunov d2b09497eb arm: core: cortex_m: introduce CPU_CORTEX_M_HAS_VTOR option
Some ARMv6-M Cortex-M0+-based SOCs have VTOR register
and can relocate vector table just as ARMv7-M ones.
Vector table relocation path should be choosed
by VTOR presence, not by arch.

Signed-off-by: Ilya Tagunov <tagunil@gmail.com>
2018-02-06 08:59:36 -06:00