Commit graph

18968 commits

Author SHA1 Message Date
Alberto Escolar Piedras dc089dfe95 test: kernel/common added note about systick period
If the systick period is < 5ms the clock testcase will
stall.
Added a note to warn whoever hits it.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-02-07 16:28:16 -05:00
Alberto Escolar Piedras 31bd6ab1c1 test: sha256 can also be run in native_posix
The tests/crypto/sha256 can also be run in the posix arch

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-02-07 16:28:16 -05:00
Alberto Escolar Piedras 66c1652fb8 native: native_posix timer + irq fix
Added possibility to reconfigure CONFIG_SYS_CLOCK_TICKS_PER_SEC
for the native_posix board (before it could only be 100)
+
Fixed tickless idle support
+
Minor fixes in irq wrapping

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-02-07 16:28:16 -05:00
Alberto Escolar Piedras a99a14c3b7 native: added posix_get_hw_cycle()
Added function (for all ARCH_POSIX boards) to get the
the current clock cycle of the CPU

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-02-07 16:28:16 -05:00
Kumar Gala bb72c3d020 crypto: mbedtls: Update mbedTLS to 2.7.0
Due to a security advisory released on February 1st 2018[1], it's
advisable to update mbedTLS to 2.7.0.

The vulnerability, identified as CVE-2018-0488 and CVE-2018-0487, risk
remote code execution when truncated HMAC is enabled or when verifying
RSASSA-PSS signatures.

[1] https://tls.mbed.org/tech-updates/security-advisories/mbedtls-security-advisory-2018-01

Fixes: #6025

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-02-07 16:25:27 -05:00
Anas Nashif 9c6a1aa792 gitlint: use custom rule for line length violations
Custom rule has some exceptions for long urls and long names/email
addressed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-02-07 15:28:36 -05:00
Vitor Massaru Iha e9d1015da9 drivers: i2c: esp32: Fix to_read value on i2c_esp32_read_msg()
to_read is the minimum value between I2C_ESP32_BUFFER_SIZE
and (msg.len - 1) rather than the maximum value.

Signed-off-by: Vitor Massaru Iha <vitor@massaru.org>
2018-02-07 14:52:52 -05:00
Vitor Massaru Iha 74321ec9fd drivers: i2c: esp32: Fix msg.len on i2c_esp32_write_addr()
msg.len is incremented only when I2C master writes to slave.

Signed-off-by: Vitor Massaru Iha <vitor@massaru.org>
2018-02-07 14:52:52 -05:00
Vitor Massaru Iha 463bfb3489 drivers: i2c: esp32: Fix increase I2C_ESP32_SPIN_THRESHOLD
Increase I2C_ESP32_SPIN_THRESHOLD to avoid read or write timeout.
This is an empirical value.

Signed-off-by: Vitor Massaru Iha <vitor@massaru.org>
2018-02-07 14:52:52 -05:00
Vitor Massaru Iha 93c3def27e drivers: i2c: esp32: Fix command opcode on i2c_esp32_write_addr()
When I2C Master writes to slave on CMD_Controller, opcode WRITE
was set twice instead of 1 WRITE at the beginning of the
transmission.

And when Master reads from slave, on CMD_Controller,
byte_num = 1 + data_lenght instead of byte_num = 1 at the
beginning of the transmission.

Note that is for 7 bits addresses, to 10 bit adressess is added
more 1 in byte_num as can be seen in the code above this fix.

Signed-off-by: Vitor Massaru Iha <vitor@massaru.org>
2018-02-07 14:52:52 -05:00
Vitor Massaru Iha 6452b2e5e2 drivers: i2c: esp32: Fix command address on i2c_esp32_write_msg()
The wait address command must be the last command address.

Unncessary variable was removed.

Signed-off-by: Vitor Massaru Iha <vitor@massaru.org>
2018-02-07 14:52:52 -05:00
Vitor Massaru Iha 685f09779d drivers: i2c: esp32: Fix END opcode on i2c_esp32_write_msg()
After a STOP opcode the transmission stops. The END opcode in this
case is unnecessary.

Signed-off-by: Vitor Massaru Iha <vitor@massaru.org>
2018-02-07 14:52:52 -05:00
Vitor Massaru Iha 2ef5b6d128 drivers: i2c: esp32: Fix first command on I2C Master
On i2c_esp32_read_msg() and i2c_esp32_write_msg() first command
it should be always RSTART.

Signed-off-by: Vitor Massaru Iha <vitor@massaru.org>
2018-02-07 14:52:52 -05:00
Vitor Massaru Iha 623c915ab8 drivers: pinmux: esp32: Fix using gpio as IO at the same time.
Since PINMUX_INPUT_ENABLED == 1 and PINMUX_OUTPUT_ENABLED == 0,
we can not set a gpio port as input and output at the same time,

So we always set the gpio as input. Thus, the gpio can be used on
I2C drivers for example.

Signed-off-by: Vitor Massaru Iha <vitor@massaru.org>
2018-02-07 14:52:25 -05:00
David B. Kinder c2bf3af1de doc: fix misspellings in Kconfig files
Missed some misspellings during regular reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-02-07 14:51:46 -05:00
David B. Kinder 9a1d5d2d55 doc: fix misspelling in MinnowBoard doc
MinnowBoard has an uppercase "B" in its name.  Also added a link to the
config option mentioned.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-02-07 14:51:24 -05:00
Kumar Gala 30824c9dc3 tests: build_all: Fix building for lps25hb and lsm6ds0
The introduction of device tree support sensors need to update the
dts.fixup file in build_all to make sure that we still build.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-02-07 12:31:51 -06:00
Anas Nashif dcb0acff70 device: cleanup header layout
run through uncrustify and fix a few layout issues.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-02-07 13:07:46 -05:00
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