Commit graph

41120 commits

Author SHA1 Message Date
Erwan Gouriou
bcdb4825a4 dts: arm: stm32f3: Add pinctrl node and uart pin configurations
Add needed uart pinctrl configuration in pinmux node.
This is done thanks to <soc>-pinctrl.dtsi file matching
<soc>.dtsi files
Populate stm32 f3 based boards dts files with references
to uart pinctrl nodes

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-07-26 15:16:52 -05:00
Erwan Gouriou
e514554cd1 dts: arm: stm32f4: Add pinctrl node and uart pin information
Add needed uart pinctrl configuration in pinmux node.
This is done thanks to <soc>-pinctrl.dtsi file matching
the <soc>.dtsi files
Populate stm32 f4 based boards dts files with references
to uart pinctrl nodes.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-07-26 15:16:52 -05:00
Erwan Gouriou
72d2960741 arch: arm: stm32f3: Rework pinmux handler
STM32F3 pinmux handler is reworked to support future pinmux dts
generation.
Preliminary change is done to move pin configuration
informations in a {pin, conf} structure closer to dts fields
"pins" array is removed as information is transfered to
"pinconf" array

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-07-26 15:16:52 -05:00
Erwan Gouriou
8763939763 arch: arm: stm32f4: Rework pinmux handler
STM32F4 pinmux handler is reworked to support future pinmux dts
generation.
Preliminary change is done to move pin configuration
informations in a {pin, conf} structure closer to dts fields
"pins" array is removed as information is transfered to
"pinconf" array

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-07-26 15:16:52 -05:00
Erwan Gouriou
8d0150000c arch: stm32f1: rework pinmux driver
Rework stm32f1 pinmux code for future dts based pinmux code
generation.
Pin configuration is now done directly thanks to gpio port
configuration. Reference to pseudo alternate functions are
now removed same as the use of pins[] array.
Pins function (uart tx for instance) is set implicitly by
defining gpio mode and configuration.
This behavior is specific to stm32f10x series.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-07-26 15:16:52 -05:00
Erwan Gouriou
9bd248f8e1 dts: arm: stm32l4: add pinctrl node and pins configurations
Add pinctrl node on stm32l4 soc dts files, including uart
pinctrl configurations. This is done thanks to <soc>-pinctrl.dtsi
file matching the <soc>.dtsi file
Populate stm32 l4 based boards dts files with references
to uart pinctrl nodes

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-07-26 15:16:52 -05:00
Erwan Gouriou
2366d23573 arch: arm: stm32l4: Rework pinmux driver
STM32L4 pinmux handler is reworked to support future pinmux dts
generation.
Preliminary change is done to move pin configuration
informations in a {pin, conf} structure closer to dts fields
"pins" array is removed and information is transferred to
"pinconf" array

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-07-26 15:16:52 -05:00
Erwan Gouriou
63aa5edfc4 dts: arm: stm32: Add pinmux bindings and yaml
Add pinmux yaml file and bindings before introduction
of pinmux node in stm32 soc device tree files

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-07-26 15:16:52 -05:00
Kumar Gala
a19f6629bb scripts/extract_dts_includes.py: Fix typo in device name list
For CONFIG_UART_PIPE_ON_DEV_NAME the chosen property is
"zephyr,uart-pipe" not ""zephyr,bt-mon-uart".

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-07-26 11:37:06 -05:00
Kumar Gala
b32b581a34 scripts/extract_dts_includes.py: Reduce code for handling chosen names
We have the same pattern for how we map a chosen property to the device
label that generates a Kconfig define.  Rather than duplicating the code
over and over again, lets just iterate over a list of defines and chosen
properties.  This also provides us a list we can use in the future to
special case handle the defines associated with names.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-07-26 11:21:21 -05:00
Erwan Gouriou
c51f281277 CODEOWNERS: update for stm32 arch, drivers, dts and disco_l475_iot1
Add codeowners for:
arch/arm/soc/st_stm32
drivers/*/*stm32*
dts/arm/st
boards/arm/disco_l475_iot1

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-07-26 10:34:03 -05:00
Anas Nashif
52e7cdae57 tests: mqtt_subscriber: unify prj.conf
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-26 10:57:48 -04:00
Anas Nashif
80010b04cb tests: mqtt_publisher: unify prj.conf
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-26 10:57:48 -04:00
Anas Nashif
ca0ad13a61 net: enable SLIP only on QEMU targets
In many networking tests we had to configure SLIP in the prj.conf
leaving those configurations Qemu specific. This change enables SLIP for
QEMU targets automatically and allows reuse of prj.conf for multiple
boards.

Additionally, the TUN options is removed. This option was not used
anywhere.

To enable self-contained networking tests that do not depend on SLIP, we
introduce the new option NET_TEST which disables TAP and allows testing
in QEMU without the need for a host interface.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-26 10:57:48 -04:00
Erwan Gouriou
92c7ef5939 arch: stm32: l4: factorize HAS_STM32CUBE
In L4 series, select HAS_STM32CUBE is done per soc.
This could be factorized in Kconfig.series.
Aim is  to lower the steps to add a new SoC.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-07-26 09:52:59 -05:00
Marti Bolivar
bdebff0caa drivers: ethernet: mcux: fix build warning
The ethernet HAL has a different uint32_t typedef than Zephyr's u32_t:
uint32_t in the HAL is long unsigned int, while in Zephyr it's
unsigned int. This is causing a build warning on GCC ("warning:
passing argument 2 of ‘ENET_GetRxFrameSize’ from incompatible pointer
type") when passing a u32_t* where ENET_GetRxFrameSize expects a
uint32_t*.

Add a cast to silence the warning.

Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-07-26 09:49:45 -05:00
Jukka Rissanen
e75b71ff0a net: trickle: Misc changes
* Fix the indentation which was caused by uint32_t -> u8_t changes.
* Make sure there is no unused variable warning if debugging is
  enabled but debug level is low.
* Add assert that checks that Imax_abs is > 0 which it should be.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-07-26 07:56:51 -05:00
Jukka Rissanen
cb7b96bcc7 tests: net: trickle: Fix the Trickle parameters
The Imax doublings value was too large which caused overflow
of Imax_abs value, which then could cause Trickle test to fail.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-07-26 07:56:51 -05:00
Anas Nashif
dd8fd72826 boards: mark qemu targets with a unified Kconfig
This will allow checking if we are building for QEMU globally, without
having to know the exact architecture and board name.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-26 07:40:45 -05:00
Yannis Damigos
596c961d69 CODEOWNERS: update i2c_ll_stm32 olimexino_stm32 stm32f3_disco
Adds codeowners for I2C STM32 driver and olimexino_stm32,
stm32f3_disco boards

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2017-07-26 08:37:11 -04:00
Anas Nashif
9f642c4291 samples: mesh: build only on BLE platforms
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-26 07:23:14 -04:00
Savinay Dharmappa
8a0afcd372 dts: quark_d2000: fix build warning
patch fix the build warning generated while building
application for quark_d2000. This is a fix for Jira ZEP-2437

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2017-07-26 07:20:01 -04:00
Punit Vara
a4eaf6e80c scripts: Fix string pattern on byte like objects error
This patch fixes following error of python script.

TypeError: cannot use a string pattern on a bytes-like object

Jira: ZEP-2290

Signed-off-by: Punit Vara <punit.vara@intel.com>
2017-07-26 06:54:12 -04:00
Savinay Dharmappa
63174efa7b dts: quark_d2000: uart0 instance to be used for console
This patch is a fix for jira ZEP-2436.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2017-07-26 06:13:41 -04:00
Andrew Boie
d944950aaa x86: install guard page for interrupt stack
We need to know when the interrupt stack overflows as well as
thread stacks.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-26 05:57:45 -04:00
Andrew Boie
5bcf3e97df timing_info: fix how stacks are referenced
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-26 05:53:14 -04:00
Andrew Boie
768e2a9617 mpu_stack_guard_test: fix stack declaration
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-26 05:53:14 -04:00
Andrew Boie
010498da62 samples: net: fix stack definitions
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-26 05:53:14 -04:00
Kumar Gala
dd6d34e7dc tests: net: second pass at cleanup tests to build on all platforms
The majority of these fixes adjust the memory limit needed to build the
various tests on systems with and without BLE support.  We also fixup
one test case that was able to run on platforms with 16k of memory.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-07-26 11:47:14 +03:00
Jukka Rissanen
723a4a5583 net: route: Check null pointer for neighbors and routes
If there are no neighbors or there is no route to one specific
neighbor, then check the NULL pointer before accessing the route.
This issue was seen with "net route" shell command.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-07-26 11:25:06 +03:00
Andrew Boie
e8cede7940 net: fix references to stack buffers
The net_stack_analyze function wants to look at the stack buffer,
but it is making assumptions on where this data is that are no
longer valid. Change to use the proper APIs for referencing this.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-26 10:31:46 +03:00
Kumar Gala
edcf5f86fd board: hexiwear_kw40z: Fix I2C dts info
When we introduced I2C DTS support on hexiwear_kw40z we got it wrong.
Its I2C1 not I2C0 that was being used on the hexiwear.  Fix the dts and
fixup file to reflect that.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-07-25 17:39:56 -05:00
Anas Nashif
1f9d8a9fd8 tests: trickle: exclude qemu_cortex_m3
Fails in CI, exclude while we investigate the issue.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-25 17:39:37 -05:00
Inaky Perez-Gonzalez
eb5ff2606f doc/linux: pip installs in user area vs system wide
When installing packages with PIP, recommend --user so that it is
installed in the user's directory vs system wide, potentially
overriding system-wide files that are under package manager control
and introducing possible security issues.

Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2017-07-25 18:05:10 -04:00
Inaky Perez-Gonzalez
cb290aa708 doc/linux: recommend install pip3 from distro packaging
Avoid overriding files in the system that shall be under package
manager control with who knows what is downloaded that day, as it can
introduce security issues.

Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2017-07-25 18:05:10 -04:00
Michael Scott
c58be92208 samples: net: irc_bot: fix stack declarations
kernel APIs have changed to using K_THREAD_STACK_DEFINE to declare stack
memory as well as K_THREAD_STACK_SIZEOF to calculate it's size.

Adjust irc_bot sample to reflect those changes.

This fixes stack related page faults when running irc_bot with
CONFIG_X86_STACK_PROTECTION enabled (which it is by default for qemu).

Signed-off-by: Michael Scott <michael.scott@linaro.org>
2017-07-25 18:01:32 -04:00
Kumar Gala
ebc948d818 tests: net: limit tests to boards with enough memory to build them
A number of the network tests have minimal memory requirements that not
all boards are able to meet.  Add in those memory requirements so we
don't attempt to build these tests for those platforms.  Utilized the
frdm_kl25z (with 16K of memory) and cc2650_sensortag (with 20K) to test
the limits.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-07-25 15:51:18 -05:00
Yannis Damigos
1bd908088b dts: arm: Update I2C defines in fixup files
Update the I2C defines in fixup files after the introduction
of cell prefix to interrupts-names generated defines

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2017-07-25 13:25:42 -05:00
Andrew Boie
3aecba10f7 scripts: add version check for pyelftools
Versions before 0.24 have string handling issues in Python 3.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-25 13:41:16 -04:00
Kumar Gala
0e7067c6be arm: dts: cleanup uart related Kconfig options
Now that we generate BLUETOOTH_UART_ON_DEV_NAME, UART_PIPE_ON_DEV_NAME,
and BLUETOOTH_MONITOR_ON_DEV_NAME Kconfig defines for dts enabled
platforms add those into the appropriate dts files and remove from the
various board/Kconfig.defconfig files.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-07-25 12:23:20 -05:00
Kumar Gala
a45dac0bd1 dts: fix Kconfig enablment of BLUETOOTH_MONITOR_ON_DEV_NAME
Since we generate BLUETOOTH_MONITOR_ON_DEV_NAME based on dts we need a
!HAS_DTS check around it.  Otherwise we can get into odd build errors.
Its also possibly that we don't specify "zephyr,bt-mon-uart" and in that
case we default to CONFIG_UART_CONSOLE_ON_DEV_NAME (ie 'zephyr,console'
on DTS platforms).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-07-25 12:23:20 -05:00
Erwan Gouriou
9f374d9d9c script: extract_dts_includes: Add cell prefix to interrupt-names
Cell prefix was missing to interrupts-names generated defines

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-07-25 11:18:05 -05:00
Andrew Boie
416eca5b13 tests: fatal: enable x86 MMU stack protection
Show that this mechanism can detect stack overflows with the
guard page. We only do it once since are are in an alternate
IA HW task after it happens.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-25 11:32:36 -04:00
Andrew Boie
19fdf4d6f8 qemu_x86: enable MMU stack protection by default
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-25 11:32:36 -04:00
Andrew Boie
054d47b29c x86: set stack guard page non-writable
This will trigger a page fault if the guard area
is written to. Since the exception itself will try
to write to the memory, a double fault will be triggered
and we will do an IA task switch to the df_tss and panic.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-25 11:32:36 -04:00
Andrew Boie
0fab8a6dc5 x86: page-aligned stacks with guard page
Subsequent patches will set this guard page as unmapped,
triggering a page fault on access. If this is due to
stack overflow, a double fault will be triggered,
which we are now capable of handling with a switch to
a know good stack.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-25 11:32:36 -04:00
Andrew Boie
befb0695ba kernel.h: add note about K_THREAD_STACK_SIZEOF()
Each member of the array may need to have a padding size added
such that the base address of each array element corresponds to
the desired stack alignment.

This would mean that sizeof(some array element) would return
a larger size than what was originally provided.

This won't cause problems at runtime since the space is really
there, but for users who are only enabling this padding for
debug features, they may be surprised when their stacks are
effectively smaller than when this was enabled.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-25 11:32:36 -04:00
Andrew Boie
861b269128 sys_kernel: fix stack declaration
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-25 11:32:36 -04:00
Andrew Boie
c3fce81d13 tests: fatal: fix stack size to k_thread_create
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-25 11:32:36 -04:00
Andrew Boie
6101aa6220 x86: add API for modifying page tables
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-25 11:32:36 -04:00