Commit graph

41120 commits

Author SHA1 Message Date
Robert Konc
62c8fee2ec Bluetooth: Mesh: Add header file support for C++
Add preprocessor directive for C++ compatibility.

Signed-off-by: Robert Konc <robert@konc.si>
2018-12-08 14:56:46 +02:00
Andrew Boie
ce8e1ecd2d Revert "interrupts: use weak linkage instead ..."
This reverts commit 140863f6a7.

This was found to be causing problems with certain linkers which
generate different code depending on whether a symbol is weak or
not.

Fixes #11916

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-12-07 20:26:58 -05:00
Andrew Boie
cd255744d0 userspace: eliminate warning in process_gperf.py
Python 3.7 throws a FutureWarning when it thinks it
has found a nested set in a regular expression.

We weren't actually; just trying to match some brackets.
Escape them instead. No functional difference.

Fixes: #11961

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-12-07 20:26:46 -05:00
Andrew Boie
5f793cc25c tests: mem_pool_api: reduce stack usage
Some arches were getting a stack overflow in ISR context.

Fixes: #9777

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-12-07 20:09:47 -05:00
Andrew Boie
95936e2b14 kernel: fix x86 stack protector with later GCC
Newer versions of GCC default to using thread-local storage ABI
for the canary value instead of a global. We don't implement TLS
in Zephyr like this (at least for now) so specify that we want
to use the global instead.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-12-07 19:34:29 -05:00
Andrew Boie
a68120de6d kernel: check retval of driver init
If initialization fails, zero the API struct so that
device_get_binding() can't fetch it, and do not mark
the driver object as initialized to user mode.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-12-07 19:33:23 -05:00
Piotr Mienkowski
2d2a0452b9 doc: efr32_slwstk6061a: update paragraph 'Flashing'
Zephyr SDK 0.9.4 added OpenOCD support for SiLabs EFR32FG1P SoC. This
commit updates 'Flashing' paragraph of the board documentation to
reflect this change.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2018-12-07 19:32:49 -05:00
Wayne Ren
f8022b2630 driver: arcv2_timer0: optimze the code
use a local variable to replace the ctrl_cache

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-12-07 17:08:15 -05:00
Wayne Ren
64522df740 soc: arc: clean up the timer relatted definitions
the old definitions are not required

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-12-07 17:08:15 -05:00
Wayne Ren
37b4d2cd06 drivers: arcv2_timer0: bug fixes
* remove QEMU related definitions
* fix the definition of TIMER 0 IRQ

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-12-07 17:08:15 -05:00
Wayne Ren
f477f564c1 driver: arcv2_timer0.c: minor changes according to review
* code style and comment clean up

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-12-07 17:08:15 -05:00
Wayne Ren
fceaf894c4 driver: refactor the arcv2 timer0 driver
refactor the arcv2 timer0 driver according to
the latest changes in sys clock dirver.

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-12-07 17:08:15 -05:00
Anas Nashif
724d6f7909 sanitycheck: add new _TEXT_SECTION_NAME_2 section to whitelist
Add _TEXT_SECTION_NAME_2 to the whitelisted list of linker sections.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-07 16:50:24 -05:00
Alberto Escolar Piedras
d8c25d37d9 ci: Allow setting BSIM_OUT_PATH from environment
If BSIM_OUT_PATH was set in the environment use that value

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-12-07 16:46:54 -05:00
Alberto Escolar Piedras
69772ef7d8 ci: Fail shippable if something fails catastrophically
Before run_ci.sh was introduced, if some command in the
.shippable.yml script failed, Shippable would stop and report
a failure.
When run_ci.sh was introduced we lost this, which is pretty
dangerous if something fails cathastrophically and the xml
reports are not (properly) generated and copied, as then
Shippable reports a pass.
=> Run run_ci.sh in -e mode, so we propagate a bad failure upwards

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-12-07 16:46:54 -05:00
Alberto Escolar Piedras
539e73f526 ci: Copy results before handling coverage
Coverage parsing has high chances of failing, let's copy
first the results

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-12-07 16:46:54 -05:00
Ruth Fuchss
664741c5bf doc: Add anchor in Getting Started
Add an anchor in the Getting Started topic to be able to link to
the requirements section.

Signed-off-by: Ruth Fuchss <ruth.fuchss@nordicsemi.no>
2018-12-07 16:45:49 -05:00
Maureen Helm
2167ae07ba boards: Fix and update nxp board doc links
Fixes broken user guide and schematics links in nxp board documentation.
Updates remaining nxp.com links from http to https.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-12-07 16:41:29 -05:00
Endre Karlson
91c4d20214 arm: silabs: Enable DCDC before setting up clk
This enables DCDC for Silabs devices before initializing the
clock.

Signed-off-by: Endre Karlson <endre.karslon@gmail.com>
2018-12-07 13:55:31 -06:00
Mieszko Mierunski
d1b3efd98b drivers: nrf: Fix TWI and TWIM current consumption issue
TWI and TWIM  peripheral is now enabled only during transfers.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2018-12-07 12:54:25 -05:00
Erwan Gouriou
aab5be5c64 boards: nucleo_f413zh: Update board images
Connectors imaages for nucleo_f413zh were actually a reuse of
similar board nucleo_f412zg.
Add dedicated images for nucleo_f413zh.

Fixes #5198

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-12-07 12:53:57 -05:00
Sebastian Bøe
87858fd4e2 cmake: toolchain: Minor refactoring
Fixed whitespace such that 'XTOOLS_TOOLCHAIN_PATH' is vertically
aligned.

Also, combined two cmake invocations of 'list' into one.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-12-07 12:53:20 -05:00
Sebastian Bøe
e9a49047a0 cmake: Remove unnecessary comments
Remove unnecessary comments.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-12-07 12:53:20 -05:00
Sebastian Bøe
75811428c3 cmake: toolchain: Use ARCH instead of CONFIG_ARCH
ARCH is available before CONFIG_ARCH, and is otherwise identical. So
it is better to use ARCH than CONFIG_ARCH as this allows the code to
be moved around more freely.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-12-07 12:53:20 -05:00
Sebastian Bøe
4f61c2a58d xcc: Drop the seemingly unused XCC_BUILD variable
Drop the seemingly unused XCC_BUILD variable because it depends on
Kconfig and we need to cut the toolchain's dependency on Kconfig.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-12-07 12:53:20 -05:00
qianfan Zhao
ffbe747225 openocd.board.cmake: Fix flash load address
'make flash' always erase the flash banks from sector 0, and flashing
the Zephyr.bin file to base address of flash even if there has a
bootloader placed on the first sector.

Users maybe want placed Zephyr to another location instead of sector
0 by adding 'zephyr,code-partition' in dts. But the openocd scripts
doesn't deal with that currently.

Fix this issue, flash zephyr.elf instead of zephyr.bin, elf file
contain load address and openocd scripts can deal with it.

Signed-off-by: qianfan Zhao <qianfanguijin@163.com>
2018-12-07 11:34:56 -05:00
Sebastian Bøe
9de5bc9109 cmake: FindPythonInterp: Prioritize 'python' from path the highest
Users expect that not just "some" compatible python is detected, but
also that it will be the 'python' executable from PATH, at least when
this executable is valid.

To this end rewrite FindPythonInterp to give this executable the
highest priority.

This fixes #11857

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-12-07 11:33:17 -05:00
Andrei Emeltchenko
d8285e4adf pci: General code cleanup
Cleanup code

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-12-07 11:32:45 -05:00
Andrei Emeltchenko
d0d426e898 pci: Remove inlines
Remove inline functions.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-12-07 11:32:45 -05:00
Andrei Emeltchenko
6d8673c3ac pci: Use logger
Use logger for logging.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-12-07 11:32:45 -05:00
Andrei Emeltchenko
7dab29860a pci: Do not scan all functions for single function device
Check MF flag and behave accordingly.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-12-07 11:32:45 -05:00
Andrei Emeltchenko
e5349d74ab pci: Fix endless loop scanning PCI devices on up_squared
Increase function number so that next scanning starts from the next
function.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-12-07 11:32:45 -05:00
Andrei Emeltchenko
4658d6b48c pci: Scan all PCI buses
Allow to scan all buses.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-12-07 11:32:45 -05:00
Andrei Emeltchenko
331a4ca853 pci: Skip scanning Host Bridge
Continue with scanning other devices.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-12-07 11:32:45 -05:00
Andrei Emeltchenko
80e5314bea pci: Enable pci shell only when shell is enabled
Fixes build with enabled PCI_SHELL and not enabled SHELL.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-12-07 11:32:45 -05:00
Andrei Emeltchenko
9a92ae4169 pci: Fix presentation of PCI devices
Follow Linux style for list PCI devices.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-12-07 11:32:45 -05:00
Carles Cufi
65ced0ee5e doc: tools: Update links to Nordic website
The links to the nRF Command-line tools have changed.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-12-07 11:32:33 -05:00
Sebastian Bøe
dc04f552b0 cmake: Fix warning related to policy CMP0079
In CMake 3.13 a warning is produced if one does not explicitly state
what the policy for CMP0079 should be. To resolve this warning we set
policy CMP0079 to OLD.

This is expected to have no semantical change. When we want a
semantical change we can flip the policy and port the build scripts to
the new behaviour.

This fixes #11794

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-12-07 11:32:08 -05:00
Erwan Gouriou
9062e97a45 drivers: stm32: check clock_control_on return value
Check clock_control_on return value now that it is checking appropriate
bus is used in the request.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-12-07 11:31:48 -05:00
Erwan Gouriou
f6b014e6dd dts/arm: stm32f0: AHB2 but is not supported
AHB2 bus does not exist on STM32F0 series, replace with AHB1.

Fixes #11904

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-12-07 11:31:48 -05:00
Erwan Gouriou
e24fcc55ce drivers/clock_control: stm32: add errors on unsupported bus value
Driver was not complaining when unsupported bus values where used.
Add default to switch cases and return error.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-12-07 11:31:48 -05:00
Erwan Gouriou
d1fd304273 drivers/pinmux: stm32: GPIO ports missing in array
GPIO ports I, J, and K were missing in port_enable array.
Fix this to make them usable.


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-12-07 11:31:22 -05:00
Erwan Gouriou
ea1f2b60a0 drivers/gpio: stm32: return error when pin line already in use
GPIO pin interrupts share common EXTI resources.
Return an error when attempt to configure a line already in use.

Fixes #10611

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-12-07 11:31:22 -05:00
Erwan Gouriou
a1ccde2629 doc/tools: stlink: Provide guidelines for openocd install on windows
Add directives for openocd installation in Windows environment.

Fixes #7325

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-12-07 11:26:30 -05:00
Jukka Rissanen
c790290468 samples: net: gptp: Add instructions for native_posix
Remove QEMU instructions as those do not work. Add native_posix
board instructions for running gPTP with linuxptp daemon.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-12-07 18:20:54 +02:00
Jukka Rissanen
f4fc30569b doc: net: Add instructions for native_posix board
Add generic instructions how to use native_posix board with
networking enabled.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-12-07 18:20:54 +02:00
Armando Visconti
e721b498ce drivers/lis3dh: Add symbol to TRIGGER_MODE config choice
Add symbolic names to trigger mode (LIS3DH_TRIGGER_MODE) in order to
be defined in board defconfig files.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2018-12-07 10:43:13 -05:00
Armando Visconti
7dbbb07f07 sensors: convert lis3dh to use information coming from dts
Convert lis3dh accelerometer driver to get the device name as well
as i2c slave information from device tree. Updates the build_all
test accordingly.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2018-12-07 10:43:13 -05:00
Ramakrishna Pallala
a4f933677b drivers: flash: Nios-II QSPI Coccinelle issue
Fixed Coccinelle warning "Unsigned expression compared with zero".

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-12-07 10:42:01 -05:00
Adithya Baglody
3e784bc6b5 CMakeLists.txt: Enable -fno-common globally.
This is needed to force the .common type to .bss type.
This will force the .common variables to go into bss section
in the compiled object file.
As of now the movement to the .bss section was happening only
during the final linking stage.

The -fno-common option specifies that the compiler should place
uninitialized global variables in the data section of the object
file, rather than generating them as common blocks.  This has the
effect that if the same variable is declared (without "extern")
in two different compilations, you will get a multiple-definition
error when you link them.

e.g:
// file a.c
// file-scope

int b;

// file b.c
// file-scope

int b;

If there exist two non-extern declarations of the same variable
then no-common will cause a linker error.
This sequence would have compiled before, but will now cause a
linker error.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2018-12-07 10:32:41 -05:00