Commit graph

99049 commits

Author SHA1 Message Date
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
Ioannis Glaropoulos
1fa958510f soc: nordic: add Kconfig structure for nRF9160 SOC definition
This commit introduces the Kconfig file structure for nrf9160
SoC in the Zephyr tree.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-01-15 17:18:34 -05:00
Kumar Gala
801ee9c5f0 dts: nrf: Add SoC compatible property
Add a compatible property to the SoC level nodes to tell what SoC we
are on.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-15 17:17:28 -05:00
Karl Zhang
80a9fc3fa1 arm: v2m musca: Add support for v2m musca SoC and board
Support musca board as a variant, it is a Cortex-M33 based SoC.

Signed-off-by: Karl Zhang <karl.zhang@linaro.org>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-15 15:40:37 -06:00
Andy Gross
0859f34f3b arch: arm: mpu: arm_mpu: Fix compiler error on stack_obj
This patch adds a required cast for the size calculation utilizing
pointer arithmetic.  The stack_obj needs a cast to u32_t.  This was
caught using a newer compiler.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2019-01-15 15:40:37 -06:00
Andy Gross
9cc4b59069 serial: Add Support for ARM PL011 UART
This patch adds a serial driver for the ARM PL011 IP block.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-15 15:40:37 -06:00
Miguel A. Borrego
aea3645817 soc: select CONFIG_CPU_CORTEX_M_HAS_VTOR for SAMD2x.
SAMD2x series have available the Optional Vector Table Offset Register
(VTOR). If this option is not selected, SCB->VTOR is not configured
properly and the application hangs if it's located in an offset
different than 0.

Removed select CPU_CORTEX_M from SAMD20, as it's already selected by
select CPU_CORTEX_M0PLUS

Signed-off-by: Miguel A. Borrego <jimjim17@gmail.com>
2019-01-15 14:37:19 -06:00
Karol Lasończyk
c0a5739bda drivers: watchdog: align sample and test to new DT
Sample application and test are aligned to new DT naming convention.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2019-01-15 12:40:13 -06:00
Varun Sharma
229e9f79e5 samples: Modify samples to use DEVICE_AND_API_INIT()
tests: Modify tests to use DEVICE_AND_API_INIT()

Modified samples/tests drivers to use DEVICE_AND_API_INIT() instead
of deprecated DEVICE_INIT() api

Signed-off-by: Varun Sharma <varun.sharma@intel.com>
2019-01-15 10:39:34 -08:00
Varun Sharma
77c643a5a3 drivers: Modify drivers to use DEVICE_AND_API_INIT()
Modified drivers to use DEVICE_AND_API_INIT() instead of DEVICE_INIT()

This will make sure driver_api,is populated at build time and is exposed
to user space

Signed-off-by: Varun Sharma <varun.sharma@intel.com>
2019-01-15 10:39:34 -08:00
Ioannis Glaropoulos
052121ee7c drivers: clock control: rename Kconfig.nrf5 to Kconfig.nrf
Renaming Kconfig.nrf5 to Kconfig.nrf in the wake of extending
the use of the nRF clock control driver to both nRF5 and nRF91
SOC series.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-01-15 18:03:24 +01:00
Ioannis Glaropoulos
2e687653fa drivers: clock control: rename nrf5_power_clock source and header
This commit renames the nrf5_clock_control.h and
nrf5_clock_control.c files to nrf_clock_control.h and
nrf_clock_control.c, respectively, as they are used
in nRF9160 builds, as well.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-01-15 18:03:24 +01:00
Ioannis Glaropoulos
302a746bd6 drivers: clock control: nrf: rename CLOCK_CONTROL_NRF5 Kconfig symbol
This commit renames the CLOCK_CONTROL_NRF5 Kconfig symbol to
CLOCK_CONTROL_NRF. The change is required to aleviates confusion
when selecting the symbol in nRF9160 SOC definition.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-01-15 18:03:24 +01:00
Kumar Gala
1c7d8cad5c boards: bbc_microbit: Add i2c/gpio as supported peripherals
Add i2c/gpio to board yaml as supported peripherals on the bbc_microbit

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-15 10:56:42 -06:00
Kumar Gala
6bd9dd2bef boards: warp7_m4: Add i2c/gpio as supported peripherals
Add i2c/gpio to board yaml as supported peripherals on the warp7_m4.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-15 10:54:14 -06:00
Johan Hedberg
a7a0d27ae2 Bluetooth: Give proper names to Bluetooth threads
Provide names for all Bluetooth threads so that they don't show up as
"NA" when issuing the "kernel stacks" command in the shell.

To get this info the following Kconfig options need to be enabled:

CONFIG_THREAD_STACK_INFO=y
CONFIG_THREAD_MONITOR=y
CONFIG_KERNEL_SHELL=y
CONFIG_INIT_STACKS=y
CONFIG_THREAD_NAME=y

After issuing the "kernel stacks" command the output should look
something like this:

uart:~$ kernel stacks
0x200011D0 BT RX      (real size 1024): unused 760      usage 264 / 1024 (25 %)
0x20001148 BT RX pri  (real size 448):  unused 280      usage 168 / 448 (37 %)
0x20000654 BT ECC     (real size 1100): unused 168      usage 932 / 1100 (84 %)
0x20000764 BT TX      (real size 640):  unused 280      usage 360 / 640 (56 %)
0x20001ED8 sysworkq   (real size 1024): unused 592      usage 432 / 1024 (42 %)
0x200004C4 shell_uart (real size 2048): unused 904      usage 1144 / 2048 (55 %)
0x20000058 logging    (real size 768):  unused 584      usage 184 / 768 (23 %)
0x20001D84 idle       (real size 256):  unused 184      usage 72 / 256 (28 %)
0x20001E08 main       (real size 1024): unused 768      usage 256 / 1024 (25 %)

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2019-01-15 17:39:54 +01:00
Peter A. Bigot
f3f8f96842 tests: i2c_slave_spi: update to proposed DT compatible naming
In driver and application code use the new device-tree values produced
by standard compatible-instance bindings.

As this code may be used as an example add a comment describing how the
binding instance number cannot be reliably used to distinguish multiple
instances.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-01-15 08:29:52 -06:00
Peter A. Bigot
83773ecc19 dts: correct compatible name for I2C EEPROM devices
Zephyr has been using "i2c,eeprom" for the compatible property.  This is
inconsistent with the property documentation which expects
"manufacturer,model" to be used.

The Linux standard compatible name for I2C EEPROMs is "atmel,at24".  The
standard for SPI EEPROMS is "atmel,at25".  We don't have support for the
latter, but change the name for the former.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-01-15 08:29:52 -06:00
Ioannis Glaropoulos
4fccdaf5dd dts: nordic: add missing nRF91 flash controller binding
This commits adds the binding for nRF9160 flash controller.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-01-15 08:17:50 -06:00
Ioannis Glaropoulos
1aace66c05 soc: nordic: Fix flash driver defines nomenclature in fixup.h
In the wake of 9cbe468a470fe6a103557d4352d37604a632b2fe we need
to update the nomenclature of DT_FLASH_DEV_NAME macros.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-01-15 08:17:26 -06:00
Kumar Gala
0891ad4362 dts: nordic: Fix vendor prefix for flash controller
The vendor prefix for the flash controller should be "nordic," not
"nrf,".

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-15 08:17:26 -06:00
Kumar Gala
8f52956905 scripts: extract_dts_includes: Change arg parsing requirements
Changed arg parsing so you can invoke the script and only generate the
include file or conf file as desired.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-15 08:10:31 -06:00