Commit graph

41120 commits

Author SHA1 Message Date
Rajavardhan Gundi
7d428bb0a8 flash: spi_nor: Remove Kconfig parameter for SPI_NOR_SECTORS
Number of sectors is now calculated from the flash density
i.e. (Flash size)/(sector size).

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2019-01-16 21:22:56 -05:00
Rajavardhan Gundi
e584b05215 dts: intel_s1000: Exclude sram space dedicated for mcubootloader
The starting 192kB SRAM is reserved for the mcubootloader. Exclude
this region while building an application to be loaded by mcubootloader.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2019-01-16 21:22:56 -05:00
Rajavardhan Gundi
18b64833d5 tests: intel_s1000: flash_map: Enable tests for flash_map
This patchset introduces some tests for the flash_map and
flash_page_layout features.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2019-01-16 21:22:56 -05:00
Rajavardhan Gundi
b5dd8ac37c Kconfig: intel_s1000: Move FIFO_DEPTH to soc Kconfig
FIFO_DEPTH should be in the SoC's Kconfig as this is a
configuration of SPI master controller in SoC.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2019-01-16 21:22:56 -05:00
Rajavardhan Gundi
82b0296625 dts: intel_s1000_crb: Enable flash page layout support
This patchset introduces partitioning of flash in terms of blocks
(flash page layout) for s1000. This partitioning is currently to
be used for mcubootloader.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2019-01-16 21:22:56 -05:00
Rajavardhan Gundi
75f6f1b279 drivers: flash: spi_nor: Enable Flash Page Layout and Map
This patch enables the support for FLASH_PAGE_LAYOUT and
FLASH_MAP for the generic spin nor flash driver.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2019-01-16 21:22:56 -05:00
Rajavardhan Gundi
f885fd15bf DTS: flash: spi_nor: use DT_ for freq and other parameters
Use DT_ instead of CONFIG_ for spi freq, spi bus name, flash device
name and flash base address.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2019-01-16 21:22:56 -05:00
Erwan Gouriou
0dc0c9d83a boards: Add arduino_i2c in yaml when supported
Update boards yaml file with arduino_i2c supported option

We exclude disco_l475_iot1 from the x_nucleo_iks01a1 sample since there
are duplicated sensors between the disco_l475_iot1 and shield.  Until
Zephyr drivers can handle multiple sensors we need to have this exclude.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-16 16:14:56 -06:00
Mark Wang
296ac67d0d boards: lpcxpresso54114: Add SW for lpcxpresso54114
Update dts files for SW, Update pinmux.c for pin mux settings of the SW.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2019-01-16 14:15:48 -06:00
Kumar Gala
be2b6f870d sensor: bme280: Converting to using device tree
Convert the BME280 driver to use device tree and new DT_<COMPAT>
defines.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-16 12:39:37 -06:00
Savinay Dharmappa
955781b896 boards: nios2: Add dts support for i2c
patch add dts suppoer for i2c.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2019-01-16 12:35:30 -06:00
Savinay Dharmappa
81d3a4ff97 dts: binding: Add i2c binding for nios2
patch add i2c ymal file for nios2 arch.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2019-01-16 12:35:30 -06:00
Maureen Helm
f22bd777d6 samples: bluetooth: Build peripheral_hr sample on more imx rt boards
Adds mimxrt1020_evk and mimxrt1060_evk to the list of boards for the
peripheral_hr sample.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-01-16 12:32:16 -06:00
Maureen Helm
9a165c9460 boards: mimxrt1060_evk: Enable lpuart3 for bluetooth hci
Enables instance 3 of the lpuart driver and configures pinmuxes to use
bluetooth hci on the mimxrt1060_evk board. Updates board documentation
accordingly.

Tested with samples/bluetooth/peripheral_hr, with frdm_kw41z attached as
an arduino shield running the nxp hci controller application.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-01-16 12:32:16 -06:00
Maureen Helm
2ec2ac16d5 boards: mimxrt1020_evk: Enable lpuart2 for bluetooth hci
Enables instance 2 of the lpuart driver and configures pinmuxes to use
bluetooth hci on the mimxrt1020_evk board. Updates board documentation
accordingly.

Tested with samples/bluetooth/peripheral_hr, with frdm_kw41z attached as
an arduino shield running the nxp hci controller application.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-01-16 12:32:16 -06:00
Maureen Helm
2484e301b1 soc: nxp_imx: Add missing dts fixups for lpuart instance 2
Adds dts fixups for lpuart instance 2, which will be used for the
arduino_serial connection on the mimxrt1020_evk board.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-01-16 12:32:16 -06:00
Maureen Helm
c80b564ec2 drivers: serial: Fix mcux lpuart instance 2
The mcux lpuart shim driver was updated in commit
20202902f2 to use DT_ prefix in all
defined labels not related to Kconfig, but instance 2 was missed.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-01-16 12:32:16 -06:00
Armando Visconti
16891af7a7 drivers/sensor: lis2dh: Fix LP Enable bit mask
Fix the value for Low Power Enable (LP_EN) bit mask.
(Issue described by Coverity CID #188734)

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-01-16 12:27:05 -06:00
Kumar Gala
a93921529d boards: nrf52_pca20020: Add hts221 sensor to supported list
Add hts221 sensor to nrf52_pca20020.yaml so we build and samples/tests
associated with the hts221.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-16 12:16:36 -06:00
Kumar Gala
c5157c6f4e boards: 96b_argonkey: Add hts221 sensor to supported list
Add hts221 sensor to 96b_argonkey.yaml so we build and samples/tests
associated with the hts221.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-16 12:13:32 -06:00
Peter A. Bigot
bc703377d2 boards: arm: nrf51_ble400: add I2C and SPI configuration
This board has headers for these buses so they should be made available
without requiring special overlays.

Also take advantage of the new Nordic auto-enable for peripherals,
which eliminates the need for special configuration.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-01-16 12:12:54 -05:00
Jan Van Winkel
ce1ed82d4d settings: Corrected __ASSERT include paths
Renamed <assert.h> to <misc/__assert.h> and removed <assert.h> where
not needed.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-01-16 08:36:38 -06:00
Erwan Gouriou
e25d6a65ac drivers/pinmux: stm32: Clean up after gpio driver factorization
Clean up a left over from GPIO driver factorization.
Definition of GPIO_REG_SIZE and GPIO_PORTS_BASE do not need anymore
to be spread accross SoCs.
Put these definitions directly in STM32 pinmux driver.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-01-16 08:36:09 -06:00
Vikrant More
b5017ec7dc samples: mesh: restriction to re-transmit publish messages
If Server receives re-transmitted message then it will not
transmit corresponding publish message for it.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-01-16 13:35:54 +02:00
Vikrant More
a61f7c39aa samples: mesh: feature to save Lightness & Temp. Range on Flash
With this commit, it is now possible to save Lightness &
temperature Range values on SoC flash.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-01-16 13:35:54 +02:00
Vikrant More
f4f6426582 samples: mesh: code improvements
Added app_gpio.c & no_transition_work_handler.c to reduce
burden on main.c. It will simplify & help to understand
overall architecture.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-01-16 13:35:54 +02:00
Vikrant More
b9511f2117 samples: mesh: revised states binding & target value calculation
Simplified algorithm behind states binding & target values calculation.
This has improved code readability.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-01-16 13:35:54 +02:00
Vikrant More
41b1e3e238 samples: mesh: Remove redundant code
Removed redundant code.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-01-16 13:35:54 +02:00
Ioannis Glaropoulos
2ae3b04c53 ext: hal: nordic: add nrfx misc for nRF9160
This commit introduces compile definitions for nrfx, and
lets the build compile in system_nrf9160.c, when building
for nrf9160 SoCs.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-01-16 12:30:19 +01:00
Anas Nashif
dbd7649fc0 sanitycheck: add option to specify platforms with coverage support
We want to run coverage on select platforms even if a few do support
that now. Specify which platforms should be enabled using the new option

--coverage-platform

By default we have the posix platform configured. Any additional
platforms can be specified using the option above.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-16 06:12:33 -05:00
Anas Nashif
db9592aa3e sanitycheck: convert gcov data to gcda
Collect data generated by built-in gcov over UART.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-16 06:12:33 -05:00
Adithya Baglody
4b3c7b3d17 cmake: Generated files are excluded from coverage.
When coverage option is enabled, all C files will have
coverage option enabled. When we enable it for generated files
it adds extra .bss info and other related information.
Since the bss has now increased the perfect hash that was
calculated by gperf is now incorrect. Which is a problem
for userspace enabled systems.

This patch will make sure that the generated C files will be
compiled without the coverage flags. The remaining functionality
remains unchanged.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2019-01-16 06:12:33 -05:00
Adithya Baglody
e908ea9aa5 logging: Increase the stack size when coverage is enabled.
This prevents the stack overflow which is caused by gcov.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2019-01-16 06:12:33 -05:00
Adithya Baglody
25572f3b85 tests: Dont run coverage for select test cases.
Disabled the CONFIG_COVERAGE for benchmarks and other tests.
This is needed because it interferes with normal behavior of the
test case.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-16 06:12:33 -05:00
Adithya Baglody
777407b9ea gcov: Add coverage supported boards.
Not all boards can get the coverage reports. The report generation
needs minimum of 64KB SRAM. This patch added support for mps2_an385,
qemu_cortex_m3, qemu_x86. This is just a subset. Also the previously
supported board native_posix is included in this patch.

If a board has 64KB RAM, it can generate reports by just
adding HAS_COVERAGE_SUPPORT in Kconfig.board.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2019-01-16 06:12:33 -05:00
Adithya Baglody
131edad483 scripts: gen_gcov_files.py: Added python script to parse uart dump
This script will parse the serial console log file and create the
required gcda files.

Usage:
python3 ${ZEPHYR_BASE}/scripts/gen_gcov_files.py -i console_output.log
Add -v for verbose.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-16 06:12:33 -05:00
Adithya Baglody
516bf34df5 tests: Increase the stack size by CONFIG_TEST_EXTRA_STACKSIZE.
These tests need to use stack size as a function of
CONFIG_TEST_EXTRA_STACKSIZE. These test will fail when
CONFIG_COVERAGE is enabled.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2019-01-16 06:12:33 -05:00
Adithya Baglody
76ee02b6b3 Gcov: Added Kconfig changes needed by Gcov.
This patch addes the required changes in the Kconfig files.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2019-01-16 06:12:33 -05:00
Adithya Baglody
b57a149828 Gcov: Added linker changes needed by Gcov.
This patch adds all the required hooks needed in the linker
script.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2019-01-16 06:12:33 -05:00
Adithya Baglody
cb536111a9 Gcov: Added support for x86.
This patch adds all the required hooks needed in the kernel to
get the coverage reports from x86 SoCs.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2019-01-16 06:12:33 -05:00
Adithya Baglody
9f82eadf23 Gcov: Added support for ARM.
This patch adds all the required hooks needed in the kernel to
get the coverage reports from ARM SoCs.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2019-01-16 06:12:33 -05:00
Adithya Baglody
71e90f98fd Gcov: Enable Code coverage reporting over UART.
This patch provides support for generating Code coverage reports.
The prj.conf needs to enable CONFIG_COVERAGE. Once enabled, the
code coverage data dump now comes via UART.
This data dump on the UART is triggered once the main
thread exits.

Next step is to save this data dump on file. Then run
scripts/gen_gcov_files.py with the serial console log as argument.

The last step would be be to run the gcovr. Use the following cmd
 gcovr -r . --html -o gcov_report/coverage.html --html-details

Currently supported architectures are ARM and x86.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2019-01-16 06:12:33 -05:00
Adithya Baglody
e223cfa9dd tests: coverage: Add Gcov support.
This is a custom Gcov implementation. Taking excerpts from gcc
gcc libgcc/libgcov.h and gcc/gcov-io.h.
Ported to zephyr by Ramakrishna Pallala <ramakrishna.pallala@intel.com>
and Adithya Baglody <adithya.nagaraj.baglody@intel.com>

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2019-01-16 06:12:33 -05:00
Aurelien Jarno
40b8854705 net: tcp: do not drop successfully received packets
Each time a successfully TCP connection is done, the number of dropped
TCP packets increases by 2. This is happens because when receiving an
initial SYN packet, or an ACK packet following a SYN+ACK packet,
NET_DROP is returned even if there is no error.

Fix that by replacing the two corresponding "return NET_DROP" by
"net_pkt_unref(pkt)" followed by "return 0".

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2019-01-16 13:11:39 +02:00
Niranjhana N
81ec05548d lib: posix: fix a wrong type in mqueue.c
mq_maxmsg and mq_msgsize are defined to be of
type long in POSIX standard. So use long for
variables that hold its value in mq_open().

Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
2019-01-15 17:48:34 -05:00
Paul Sokolovsky
fbcc43393c samples: big_http_download: Set min_flash to 128K.
Previously there was just "min_ram: 32", which took care about
suitable flash size implicitly. But now we have interesting boards
(e.g. lpcxpresso54114_m0) which tout RAM of 32K and Flash of 64K.
So, become more explicit about Flash requirement for the sample.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-01-15 17:22:39 -05:00
Anas Nashif
b7b25127a4 ci: reduce minions to 5
Have more PRs build in parallel.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-15 17:21:29 -05:00
Mieszko Mierunski
8587bb19a7 smp: shell: Add support for SMP in new shell.
Added smp support for new shell.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2019-01-15 17:19:20 -05:00
Ioannis Glaropoulos
1d033a9a26 soc: arm: introduce Kconfig option for Nordic IDAU
This commit introduces a new Kconfig symbol to signify
that a CPU implements the Nordic-specific security
attribution unit. The symbol is meant to be selected
by Nordic SoCs that implement the System Protection
Unit (SPU) peripheral.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-01-15 17:18:34 -05:00
Ioannis Glaropoulos
5108990079 soc: nordic: add nRF9160 soc and mpu init configuration
This commit adds the nRF9160 fixup and the source files
for SOC and MPU boot configuration.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-01-15 17:18:34 -05:00