Commit graph

99049 commits

Author SHA1 Message Date
Anas Nashif
005f6c7a04 arch: increase privileged stack with mpu stack guard
After commit 3fb6ea21 the stack is not enough and a few tests have been
failing.

Fixes #10632

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-19 16:09:50 -04:00
Diego Sueiro
537798db0d soc: arm: exx32: Add Silabs EFR32MG12P soc files
The Silicon Labs EFR32MG12P Mighty Gecko MCU includes:
* Cortex-M4F core at 40MHz
* up to 1024KB of flash and 256KB of RAM
* integrated Sub-GHz and/or 2.4GHz radio
* multiple low power peripherals

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
Signed-off-by: Endre Karlson <endre.karslon@gmail.com>
2018-10-19 13:47:49 -05:00
Diego Sueiro
04c015b8df ext: Integrate Silabs EFR32MG12P Gecko SDK into Zephyr
This patch integrates EFR32MG12P support into the build
infrastructure of Zephyr.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-10-19 13:47:49 -05:00
Diego Sueiro
063dce99b1 ext: Add Silabs Gecko SDK for EFR32MG12P SoCs
Origin: Silicon Labs EFR32MG12P Mighty Gecko Series Device Support
CMSIS PACK
URL: https://www.silabs.com/documents/public/cmsis-packs/SiliconLabs.EFR32MG12P_DFP.5.5.0.pack
Version: 5.5.0 (2018-05-07)
Purpose: Add support for Silicon Labs EFR32MG12P SoCs
License: Zlib
Maintained-by: External

To update the Gecko SDK, download the current version from the given URL
rename .pack to .zip, unpack and replace the following folder:
* Device/SiliconLabs/ should replace
  ext/hal/silabs/gecko/Device/SiliconLabs

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-10-19 13:47:49 -05:00
Diego Sueiro
1131fc07a6 ext: fix a typo in Silabs Gecko emlib
Add a missing "V" in _EMU_EM23PERNORETAINCTRL_DAC0DIS_MASK ->
_EMU_EM23PERNORETAINCTRL_VDAC0DIS_MASK in em_emu.h

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-10-19 13:47:49 -05:00
Kumar Gala
b61b0cc631 dts/extract_dts_includes.py: Filter out standard properties
Standard device tree properties like 'reg-names', 'interrupt-names', and
'phandle' should be handled by other extract mechanisms or ignored.  So
filter them out before we even call extract_property

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-19 10:01:51 -05:00
Anas Nashif
1e5b3b490c nrf52_bsim: declare BSIM_OUT_PATH as required env var
Do not use with sanitycheck if BSIM_OUT_PATH is not defined.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-19 10:57:54 -04:00
Anas Nashif
924a4e7000 sanitycheck: support requirements on env variables
Some boards depend on environment variables so we want to make sure we
do not attempt to build boards requiring additional setup.

Add the section below into the board YAML file, sanitycheck will check
the environment and will only run tests on that board if the variables
are defined.

env:
  - VAR1
  - VAR2

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-19 10:57:54 -04:00
Andrei Gansari
02e217df50 drivers: eth_mcux: kinetis networking device Tree
Partially replaces Kinetis MCUX driver configuration from Kconfig to
Device Tree. Interrputs moved from defines configuration to DT.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2018-10-19 07:57:20 -05:00
Kumar Gala
fc5e23365e dts: Add proper handling for boolean properties
We've never handled boolean properties well, if we had a boolean that
existed we'd generate a define of 'True' and if the boolean didn't exist
than nothing would be generated.  So there was no easy way to tell that
the boolean wasn't defined.

Now if we mark a property as boolean in the yaml, we will generate a
define for it regardless if it exists or not.  If it exists we'll
set the value to 1, and if it doesn't to 0.

Fixes #8376

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-19 07:55:34 -05:00
Johan Hedberg
a0c22de270 tests: bluetooth/tester: Convert from SYS_LOG to new logger
Use the LOG_* macros instead of the deprecated SYS_LOG_* ones.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-10-19 14:50:22 +02:00
Johan Hedberg
f98f4e243a samples: ipsp: Convert from SYS_LOG to new logger
Use the LOG_* macros instead of the deprecated SYS_LOG_* ones.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-10-19 14:50:22 +02:00
Johan Hedberg
6bb5a3536a samples: hci_uart: Convert from SYS_LOG to new logger
Use the LOG_* macros instead of the deprecated SYS_LOG_* ones.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-10-19 14:50:22 +02:00
Johan Hedberg
e52c20c13c samples: hci_spi: Convert from SYS_LOG to new logger
Use the LOG_* macros instead of the deprecated SYS_LOG_* ones.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-10-19 14:50:22 +02:00
Johan Hedberg
9f18ff9baf Bluetooth: Convert monitor protocol to a logger backend
Convert the monitor protocol to a proper logger backend. This also
means that our log.h headerfile gets greatly simplified.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-10-19 14:50:22 +02:00
Johan Hedberg
cd4cf4e580 Bluetooth: Convert string helpers to use log_strdup
This reduces the multiple buffer requirement to a single buffer.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-10-19 14:50:22 +02:00
Johan Hedberg
251d99132d Bluetooth: Remove custom stack macros
Now that log processing happens in a separate thread, the
BT_STACK_EXTRA macro is not needed (since there's no significant
overhead), and therefore the BT_STACK macros become unnecessary as
well.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-10-19 14:50:22 +02:00
Johan Hedberg
343c53e841 Bluetooth: Switch from SYS_LOG to logger-based logging
Initial conversion to use syslog instead of logger.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-10-19 14:50:22 +02:00
Johan Hedberg
5bd6bc4bed Bluetooth: log: Make address helpers more robust
Use irq_lock (same way as bt_hex does it) and increase the number of
static buffers to reduce the risk of reuse before a buffer gets
processed.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-10-19 14:50:22 +02:00
Johan Hedberg
6a68b29f41 Bluetooth: Only build bt_hex() if BT_DEBUG is enabled
bt_hex() should be included in the same block as the address helpers.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-10-19 14:50:22 +02:00
Johan Hedberg
18270d0bdf samples: boards: mesh/onoff-app: Remove SYS_LOG usage
SYS_LOG is being deprecated. Use printk instead.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-10-19 14:50:22 +02:00
Paul Sokolovsky
cdeddee7c6 net: Set names for threads used by the network subsys/libs
Previously, these either used generic names like "workqueue" (so,
it wasn't possible to distiguish tx and rx workqueues) or didn't
set for net management thread. Here's an example of thread dump
in a typical system (using stack_analyze() call):

rx_workq (real size 4092):	unused 3696	usage 396 / 4092 (9 %)
tx_workq (real size 4092):	unused 3692	usage 400 / 4092 (9 %)
net_mgmt (real size 4092):	unused 3772	usage 320 / 4092 (7 %)
sysworkq (real size 4092):	unused 3512	usage 580 / 4092 (14 %)
idle (real size 252):	unused 64	usage 188 / 252 (74 %)
main (real size 4732):	unused 3672	usage 1060 / 4732 (22 %)

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-10-19 07:58:45 -04:00
Paul Sokolovsky
d91c11f5bf kernel: system_work_q: Set dedicated "sysworkq" name.
Previously, a generic "workqueue" name was used, but there're few
workqueues in a typical Zephyr setup, and it wasn't possible to
distinguish them.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-10-19 07:58:45 -04:00
Anas Nashif
951393f659 build: do not rename elf file, copy it
We break dependency if we rename the zephyr.elf file, we should keep it
as it is an essential dependency in the build system. Instead, copy the
file.

Fixes #10639

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-19 07:56:47 -04:00
Jakub Rzeszutko
917dd83e8b doc: shell: update example usage of shell_cmd_precheck function
Updated example usage of shell_cmd_precheck according to new API.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-10-19 13:35:56 +02:00
Jakub Rzeszutko
147122e77f shell: examples unification
Updating examples according to new return value of function
shell_cmd_precheck.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-10-19 13:35:56 +02:00
Jakub Rzeszutko
a88d5d7e4f shell: commands help unification
1. Changed return value of function: shell_cmd_precheck from bool to
int. Now it returns:
  0       when argument count is correct and help print is not requested
  1       when help was requested and printed
  -EINVAL on wrong arguments count
This change simply shell_cmd_precheck usege in command handlers.

2. Unified all commands in shell_cmd.c file.

3. Fixed a bug where help was not printed on wrong argument count.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-10-19 13:35:56 +02:00
Jukka Rissanen
6973c6a026 net: logging: Remove function name from NET_DBG if needed
The logger will add the function name automatically if
CONFIG_LOG_FUNCTION_NAME is set, so no need to do it here in that case.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-19 13:54:50 +03:00
Jakub Rzeszutko
a794e3981e drivers: serial: nrfx: fix spelling mistake in an error message
Preprocesor error message was changed from UARTE0 to UARTE1
for instance 1 of UARTE.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-10-19 12:03:40 +02:00
Anas Nashif
3aa2a1c6db flash: make flash shell generic
This shell command was tied to bluetooth and the bluetooth shell and
also had messages all related to nordic ICs.
Make it generic and put it under drivers/flash/ so it can be included by
anyone and independently of bluetooth.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-19 11:49:18 +02:00
Erwan Gouriou
5776ea8869 ext/hal: stm32cube: fix exti declaration in STM32F7
LL_EXTI_LINE_18 and LL_EXTI_LINE_20 are declared in stm32f7xx_hal_pcd.h
and in stm32f7xx_ll_exti.h which generates warnings. Set #ifndef
in stm32f7xx_ll_exti.h around declarations.
STBugtracker: 55274

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-10-18 18:32:06 -05:00
Erwan Gouriou
13e9f4ee94 ext/hal: stm32cube: fix exti declaration in STM32L4
LL_EXTI_LINE_18 and LL_EXTI_LINE_20 are declared in stm32l4xx_hal_pcd.h
and in stm32l4xx_ll_exti.h which generates warnings. Set #ifndef
in stm32l4xx_ll_exti.h around declarations.
STBugtracker: 55275

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-10-18 18:32:06 -05:00
Carles Cufi
322647129f subsys: logging: Add CR/LF handling flags
Add 2 new flags to control the output of newlines by the logger output
module. By default the logger adds both CR and LF, and with these 2 new
flags it is now possible to request LF only or no newlines at all.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-10-18 17:53:11 -04:00
Szymon Janc
30ce313482 Bluetooth: host: Avoid using out-of-scope pointer
Mkae sure that variable pointed by params is valid when passing it
as function argument.

Fixes #10587

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2018-10-18 21:22:33 +03:00
Kumar Gala
527a69ce62 dts/extract/globals.py: Add function to get list of compats
Add a function that given a node address we get a list of compats back
instead of just the first.  This is in prep for eDTS support.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-18 12:57:32 -05:00
Jukka Rissanen
10c77dfbba net: gptp: Calculate GM rate ratio properly
Typo when calculating new value for local_time_n.low, the calculation
was just a constant expression and the value was not modified.

Coverity-CID: 188759
Fixes #10568

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-18 20:35:02 +03:00
Jukka Rissanen
89783f5282 net: connection: Fix debug print for connection index
The connection index was printed incorrectly in debug print.

Coverity-CID: 188742
Coverity-CID: 188753

Fixes #10583 #10574

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-18 20:35:02 +03:00
Anas Nashif
8eff21a8dd drivers: gpio: add shell for controlling GPIO
Provide basic commands for configuring/setting/reading GPIO ports.

> gpio conf ..
> gpio set ..
> gpio get ..

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-18 10:15:50 -04:00
Anas Nashif
79f434273e shell: kernel: list configured devices
Very simple command to list configured devices and their priorities.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-18 10:15:50 -04:00
Andrei Emeltchenko
4bec02019b usb: logs: Remove newlines from the logs
Fixes double newline in the logger output.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-10-18 09:45:29 -04:00
Andrei Emeltchenko
302d9c8ef4 wpanusb: Use USB_DBG instead of NET_DBG
Use USB_* log helpers for wpanusb

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-10-18 09:45:29 -04:00
Michael Hennerich
be9780c617 drivers: sensors: adxl372: Add missing dts bindings
This patch adds the required dts/bindings/sensor/adi,adxl372.yaml file.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
2018-10-18 08:02:59 -05:00
Kumar Gala
7ae220c845 dts: x86: Fix dts warnings when building up_squared
Fix the following dts warnings:

up_squared.dts_compiled: Warning (simple_bus_reg): /soc/gpio@0:
	simple-bus unit address format error, expected "d0c50000"
up_squared.dts_compiled: Warning (simple_bus_reg): /soc/i2c@91528000:
	simple-bus unit address format error, expected "9158000"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-18 07:02:32 -05:00
Kumar Gala
3c14bbe884 scripts: dts: extract: Fix handling of reg prop being a list of lists
Before dtc 1.4.7 we'd get something like the following for an reg
property:

reg = <1 2 3 4>;

After dtc 1.4.7 we get:

reg = <1 2>, <3 4>;

We should handle both cases in the extract reg handling code.  So if
we see a list of lists, we flatten it to a single list to normalize
the property.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-18 06:59:13 -05:00
Ramakrishna Pallala
8b20f9dbab subsys: power: Add an API for force suspending the devices
Add an API for force suspending the devices. This API can be
called during unexpected system shutdown/poweroff scenarios
to safely turnoff the devices.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-10-17 22:02:06 -04:00
Ramakrishna Pallala
8572830d88 include: device: Add a state for force suspend devices
Add a device power state for force suspended devices.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-10-17 22:02:06 -04:00
Marti Bolivar
61042c3ea9 application: fix code-block directive in custom SoC section
Without the extra colon, this is showing up as a comment.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-10-17 19:07:58 -04:00
Marti Bolivar
a10f7a0653 lib: openamp: fix build info
The toolchain information is using out of date (and misspelled)
environment variables. Rather than duplicate information here which is
already present in the getting started guide, just link to it.

Clean up some other docs.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-10-17 19:07:58 -04:00
Marti Bolivar
0b6bbcf6df doc: application primer: improvements to "creating an application"
- Fix a few errors and bits of stale information in "Creating an
  Application", also adding additional cross-references.

- Consolidate some of the steps to help users create CMakeLists.txt
  correctly by unambiguously putting target_sources() after the
  boilerplate include.

- Split the description of the important build system variables into
  its own section and add more context for what they do.

- Add whitespace warning

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-10-17 19:07:58 -04:00
Marti Bolivar
23d12e9e68 doc: reorder the sections for better flow
Put the Developer Guides after the Getting Started guide, and make
sure the Application Development Primer is the first item in the
Developer Guides. Make some other ordering adjustments as well.

These changes collectively make for a more logical order for linearly
reading through the Zephyr documentation for the average user.
"Average user" here is defined as a person who wants to:

1. learn what Zephyr is and its distinguishing features
2. install a Zephyr development environment, building/running hello
   world
3. learn the basics of how Zephyr applications are structured
4. start diving deeper

This privileges "users" over "developers", i.e. it pushes sections
related to Zephyr's internals and how to edit them down lower in the
order.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-10-17 19:07:58 -04:00