Commit graph

19237 commits

Author SHA1 Message Date
Tomasz Bursztyka
60da813a7e misc: Make sure byteorder.h does not get loaded more than once
It's an important header, used in many place and it's thus very easy to
get different sub-system loading it thus leading to redefinition error.
(net_buf and net drivers for instance).

Change-Id: Icbbbc2fc0abcb007d8950dd06b601717960e7215
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-08-05 15:57:26 +02:00
David B. Kinder
534bfd57ab doc: add ncurses to linux dev host setup doc
update /doc/getting_started/installation_linux.rst with
ncurses package for both Ubuntu and Fedora systems

Jira: zep-478

Change-Id: Icd4ba5c2151e96330005e3e31f5ea50b437e4f18
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2016-08-04 22:13:50 +00:00
Kuo-Lang Tseng
eed45102f7 MAINTAINERS: add file system and update mbedTLS sections
Added new section for file system. Added test and sample folders
for mbedTLS section.

Change-Id: Iccbd16d0f174e65a4b1f102f6ccf26cc927b2887
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2016-08-04 22:02:02 +00:00
David B. Kinder
74d2999a44 doc: Remove contributor documentation moved to wiki
Contributor documents are moved to the wiki.zephyrproject.org site
Three references in existing documents updated to point to the wiki.

Change-Id: Ib902b9596020722cf8fec2fc064725f7406297ff
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2016-08-04 22:01:10 +00:00
Julien Delayen
54b5085e8a uart_qmsi: Remove uart_qmsi_pm_save_config
One remaining reference to uart_qmsi_pm_save_config
was missed by patch bc60506d3e.

This reference is removed.

This fixes the following error:
...
drivers/built-in.o: In function `uart_qmsi_line_ctrl_set':
/drivers/serial/uart_qmsi.c:439:
undefined reference to `uart_qmsi_pm_save_config'
collect2: error: ld returned 1 exit status
...

Change-Id: I1ceda0e152db5a1c7f70d67c04b931416687031a
Signed-off-by: Julien Delayen <julien.delayen@intel.com>
2016-08-04 21:58:54 +00:00
Flavio Santes
e669d10599 samples/static_lib: Add testcase.ini
Add testcase.ini file for qemu_x86.

We detected an unexpected behavior in sanitycheck before submitting
this patch:

  In testcase.ini, if platform_whitelist contains more than one
  platform only the last platform will work. So, here we just use
  qemu_x86.

  However, we believe this situation is caused by the structure of
  this sample. See mylib/Makefile.

Jira: ZEP-621

Change-Id: I656c1b9a69b93fd9f7b0d98a69f49b9641918a93
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-04 18:31:12 +00:00
Paul Sokolovsky
38e3e0b812 Makefile.toolchain.zephyr: Test CONFIG_TOOLCHAIN_VARIANT robustly.
Current code tests treats "" (quotes included) as an empty value for that
varible (as coming from Kconfig). However, that file also used to
integrate with build systems for 3rd-party components, e.g. as examplified
by samples/static_lib, and in that case it will be just an empty string.
So, first strip surrounding quotes, then test for empty string.

samples/static_lib: Update for recent Makefile.toolchain.zephyr changes.

Makefile.toolchain.zephyr is 2-pass now, so needs to be included twice.
ARCH needs to be defined *before* including it. Otherwise, just used
CROSS_COMPILE and TOOLCHAIN_CFLAGS set by it.

Change-Id: I56e963d0d107c77390395682d60400cf6ca62337
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2016-08-04 18:31:12 +00:00
viggo.jf.intel.com
3cbd600dc5 doc: Move code conventions to Zephyr wiki.
Move content from doc/contribute/conventions.rst to Zephyr wiki.

Change-Id: Icfad83c15e65bc7b4a5a9cebf2ee530446422087
Signed-off-by: Evan Couzens <evanx.couzens@intel.com>
2016-08-02 06:48:35 +00:00
Iván Briano
1a47abe5bf pwm qmsi: Add suspend/resume
Implement saving and restoring context of the PWM controller when the
application goes to SYS_PM_DEEP_SLEEP. No action is taken for other
states at the moment.

This functionality is implemented in the shim driver first to enable
the feature, but will later be moved into QMSI.

Change-Id: I5784f6a2c63caaea5785ca5d92bb6cc3bc9fa4cc
Signed-off-by: Iván Briano <ivan.briano@intel.com>
2016-08-02 06:48:21 +00:00
Javier B Perez
dfc15d3a48 driver: sensor: lsm6ds: remove dead code by kconfig options
Removed dead code inside sensor_lsm6ds0.h. There is no kconfig option
CONFIG_LSM6DS0_I2C_ADDR_6A neither 6B.
Also the #define LSM6DS0_I2C_ADDR is not in use.

Change-Id: Ib5a7f40d0d61542ed81687227df3795ba52ec725
Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
2016-08-02 06:47:39 +00:00
Inaky Perez-Gonzalez
1029e4d992 doc: makefile doesn't print unneeded output of pwd
Change-Id: Ieff46e5509bab3f23562f020f3b9420f814d33eb
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-08-02 06:47:21 +00:00
Amit Kucheria
975d92c038 soc: nrf5x: Add support to read and write to gpios
Change-Id: I9bded784c8e635a271b88a551b65b7268ea7e2d3
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
2016-08-02 05:50:50 +00:00
Julien Delayen
bc60506d3e uart_qmsi: Implement suspend and resume functions
In order to restore uart context after entering
SYS_PM_DEEP_SLEEP, suspend and resume functions
are called.

The following parameters are restored:
 - All registers for the UART device.
 - UART clocks.

The FIFO control register cannot be read back and is
not stored in the device configuration.
The default parameters are applied for them.

The suspend/resume functionality is implemented in
the QMSI shim layer as a fast and temporary solution,
it will be removed and migrated to QMSI later.

Change-Id: I4be9246f6aa5a6e0d91df54c1c69574060136607
Signed-off-by: Julien Delayen <julien.delayen@intel.com>
2016-08-02 05:38:01 +00:00
viggo.jf.intel.com
ce26aeeba8 doc: Move code contribution info to wiki.
Move content from doc/contribute/changes.rst to Zephyr wiki.

Change-Id: I01d8011075438c899b3d1a92c44573826e97c994
Signed-off-by: Evan Couzens <evanx.couzens@intel.com>
2016-08-02 05:33:53 +00:00
Maureen Helm
dc631750fa nxp_kinetis: Refactor K64F init to use CMSIS register accesses
The K64F SoC initialization previously used macros and structs
custom-defined in Zephyr in order to access peripheral registers.
Refactored it to use CMSIS-style register accesses from the ksdk
instead.

Change-Id: I80975c62de07ec95cf830e99cd5b0abb9623acd0
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2016-08-02 05:27:35 +00:00
David B. Kinder
c9663f5424 doc: update linux update/upgrade instructions
Linux package update/upgrade instuctions were incomplete (on
Ubuntu the instructions updated the local database but didn't
actually do the upgrade).  On Fedora, the dnf update command was
deprecated in favor of dnf upgrade.

Change-Id: I83e126cf924d9c3720fcfb77b0d5abda943a6af5
Jira: ZEP-516
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2016-08-02 05:26:29 +00:00
Jaakko Hannikainen
2652c0e5a9 net: contiki: Add NULL check to neighbor polling
The function is getting called with NULL bufs, so uip_len cannot be
called on them. The stack further down handles NULL buffers correctly.

Jira: ZEP-474

Change-Id: I85fb045ec76bea2a83c64d0f72eabba4e661f5f4
Signed-off-by: Jaakko Hannikainen <jaakko.hannikainen@intel.com>
2016-08-02 05:25:59 +00:00
David B. Kinder
66f8e892de doc: Add 1.5.0 docs link to Zephyr/doc home page
Change-Id: I0e15fa11fba8f156359ea0d767efe04702802590
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2016-08-02 05:23:18 +00:00
Bogdan Davidoaia
a30a3ac949 samples: bmi160: add sensor_value_sprintf helper function
Add helper function for printing sensor_value to char buffer.

Change-Id: I46329675d9a69376ea74c4f7dfcb270ca2078c72
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
2016-08-02 05:22:44 +00:00
Flavio Santes
e22df46b61 samples/net: Add network-related functions to MQTT Subscriber
Add TCP/IPv4 routines to this sample.

This MQTT sample code demonstrates how to implement an MQTT subscriber
application.

To build this sample, the Paho's MQTT Packet Library is required. See
the README file.

For network application development, see:

* samples/net/echo_server
* samples/net/echo_client

Change-Id: Ibeb175ee2c4594b8961c60f2a0d25296c238401c
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-02 01:59:13 +00:00
Kuo-Lang Tseng
101acb4842 fs: Updates file system sample app to use flash storage diskio
Demonstrates the use of flash storage media for file system. This
uses the on-board SPI flash on Arduino 101 board.

Jira: ZEP-447
Change-Id: Ia571cff743f338d57922df68172e94c3f18a802d
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2016-08-02 00:47:31 +00:00
Kuo-Lang Tseng
57c760ad94 fs: Adds flash device support to diskio interface
Adds the flash device support for the file system storage media.
The implementation is generic for any flash device that implements
the flash API support.

Origin: original

Jira: ZEP-447
Change-Id: Ib89a6a64216cce1461da0bec6fa9588b97e06b41
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2016-08-02 00:47:14 +00:00
Ramesh Thomas
9394605211 fs: Add a sample app to demo Zephyr file system API
Demonstrates the Zephyr file system APIs. This currently
runs on FAT FS using RAM emulation of disk.

Origin: Original
Jira: ZEP-285 ZEP-228 ZEP-481 ZEP-446
Change-Id: If459b8c2f819a2a38c8c4d805ec3f689dfcdef17
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-08-01 16:47:33 -07:00
Ramesh Thomas
e89c739e6f fs: Adds the glue layer for the Fat FS module
Adds the glue layer to interface the Fat FS module with Zephyr
file system API.

Origin: Original
Jira: ZEP-228 ZEP-483
Change-Id: I878fdad8ecaf46992d6163e24a9b0b633f49154f
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-08-01 16:47:33 -07:00
Ramesh Thomas
c9ec4ee452 fs: Add Zephyr File System API
Adds the header files containing Zephyr File System API
descriptions and interfaces.

Origin: Original
Jira: ZEP-228 ZEP-480
Change-Id: I76a000187a133df7a82329af78aec9ea6511915c
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-08-01 16:47:33 -07:00
Ramesh Thomas
cc74572c5b fs: Adds diskio interface
Adds the diskio interface for the FAT file system.  This
revision uses RAM to emulate disk storage.

Origin: Original
Jira: ZEP-285
Change-Id: I7a30c8761d5ed9b564f1d1e08482c5ef199d7372
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-08-01 16:46:38 -07:00
Genaro Saucedo Tejada
573b7420d4 sys_log: replace old debug macros at USB DFU sample
USB DFU sample application is now using new system log macros and
updated the .conf file.

JIRA: ZEP-311

Change-Id: Ifa5ede70c06a5fe18dde865fa7e97f469364ddb8
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-08-01 22:04:23 +00:00
Genaro Saucedo Tejada
67c465d2cc sys_log: replace old debug macros at ieee802154 driver
ieee802154 driver is now using new system log macros, update the
Kconfig variable to be a level rather than a bool and the .conf
files at samples.

JIRA: ZEP-311

Change-Id: I640e973d880c3a222cd7c13a72d35edf49ada3a8
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-08-01 22:03:45 +00:00
Flavio Santes
54bfc3cc63 samples/net: Add network-related functions to NATS Subscriber
- Add TCP/IPv4 routines to this sample.
- Add a testcase.ini file.

This NATS sample code demonstrates how to implement a NATS subscriber
application.

Change-Id: I25a7465b7163a09a0163859076a97b1e258a06f1
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-01 14:31:27 -05:00
Flavio Santes
8f54ece6e6 samples/net: Add network-related functions to NATS Publisher
- Add TCP/IPv4 routines to this sample.
- Add a testcase.ini file.

This NATS sample code demonstrates how to implement a NATS publisher
application.

Change-Id: Ifeac3bf03b7febafcee927b1d2ec256685885fd8
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-01 14:21:51 -05:00
Flavio Santes
e240f84c75 samples/net: DNS client application
This sample code shows how to write a DNS client application.
Only client functionality is implemented in this sample.

The code is self-documented. Read the README file for more information
about the network setup.

See https://tools.ietf.org/html/rfc1035 for more information about the
DNS protocol.

Origin: Original

Jira: ZEP-500
Jira: ZEP-501

Change-Id: Ibcfa4e392143fdc2258971304d5296d70c1c9423
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-01 18:54:07 +00:00
Genaro Saucedo Tejada
58f88179ef sys_log: replace old debug macros at bluetooth tester
Bluetooth tester is now using new system log macros.

JIRA: ZEP-311

Change-Id: I6398f2de12d5ba1073e40fd45aa8e0177d1e279d
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-08-01 18:39:50 +00:00
Flavio Santes
8ba4f26e5f samples/net: Add network-related functions to MQTT Publisher
Add TCP/IPv4 routines to this sample.

This MQTT sample code demonstrates how to implement an MQTT publisher
application.

For network application development, see:

* samples/net/echo_server
* samples/net/echo_client

Change-Id: I13ac5ca1da2cd4d984fb595b599c3eab4edc5bf0
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-01 18:28:38 +00:00
Amit Kucheria
38723bc177 boards: galileo: Only show galileo pinmux options when the board is chosen
Change-Id: I1d418251997eaeec9b37806c0d9901e5906213b9
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
2016-08-01 17:34:23 +00:00
Genaro Saucedo Tejada
7a0b987dc5 sys_log: replace old debug macros at DesignWare USB driver
DesignWare USB driver is now using new system log macros, updated
the Kconfig variable to be a level rather than a bool and the .conf
files at samples.

JIRA: ZEP-311

Change-Id: Ief46cadd954ca4b30a3a1cf2eba6e44ccbc9bc9f
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-08-01 01:54:56 +00:00
Kumar Gala
44b712da85 build: use quiet cmd for AR of libzephyr.a
Introduce a quiet_cmd to create the .a for libzephyr.a so that we can
get see explicitly what's going on if V=1 is set

Change-Id: Id0a3cf0aefac4f28bab1da3ba244b7dcead394a8
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-07-31 21:02:32 +00:00
Genaro Saucedo Tejada
31994e0645 sys_log: replace old debug macros at USB stack
USB stack is now using new system log macros, updated the Kconfig
variable to be a level rather than a bool and the .conf files at
samples.

JIRA: ZEP-311

Change-Id: I873ee0f12b81a364307cdac27a2e058a43d4c9ea
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-07-31 21:02:25 +00:00
Genaro Saucedo Tejada
e7f42e52c9 sys_log: replace old debug macros at SSS boot
The boot initialization and boot process of the sensor sub systems
is now using the new system log macros and updated the Kconfig
variable to be a level rather than a bool.

Change-Id: I098143684f8e7077a525e7fcbc93b42b22d427ac
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-07-31 18:16:02 +00:00
Genaro Saucedo Tejada
aaa66ee9f2 sys_log: replace debug macros at Freescale K64 PWM driver
Freescale K64 PWM driver is now using new system log macros, updated
the Kconfig variable to be a level rather than a bool.

JIRA: ZEP-311

Change-Id: I80d01ba75e8b186ef32861b372af4e2d15dd4131
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-07-31 18:15:24 +00:00
Genaro Saucedo Tejada
eaebd1774b sys_log: replace USB CDC ACM Device Class Driver debug macros
USB CDC ACM Device Class driver is now using new system log macros
also updated the Kconfig variable to be a level rather than a bool.

JIRA: ZEP-311

Change-Id: I7093255f34ab514b030882ef4f54c955e7e848ec
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-07-31 18:13:27 +00:00
Genaro Saucedo Tejada
9a8ff013ab sys_log: replace old debug macros at DMA sample
DMA sample application is now using new system log macros and updated
the .conf file.

JIRA: ZEP-311

Change-Id: I11dbd5c58205297751696e483fc049c1c4b7654c
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-07-31 18:13:12 +00:00
Anas Nashif
f4ed108ada build: create libzephyr.a and link it in instead of objects
Enabling building of the kernel archive as the first step towards
split kernel and app builds.
An application will be able to link against this archive in the final
step of the build process.

Change-Id: If0abc7002d19ca2ca10c7babd83fe1dc6fccebfa
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-07-31 18:10:02 +00:00
Sergio Rodriguez
259c24397d samples/net : Adding mbedTLS sample client
This is a client that uses shared keys to execute a TLS handshake and read
info from the server, information on how to run the test is in the README
file.

Jira: ZEP-327
Jira: ZEP-340
Jira: ZEP-495

Origin: https://tls.mbed.org/download/start/mbedtls-2.3.0-apache.tgz

Change-Id: I10f31f3635f346936807b7c8470b3d6ffb3af283
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-07-31 17:00:45 +00:00
Kuo-Lang Tseng
2f4975b625 qmsi: flash: Improved reentrancy of the soc flash driver
Calls to flash write or erase operations can get preempted
in the middle of the API call if a concurrent call (from
other fiber or task) to the same API is made. The patch ensures
concurrent API calls from other fiber/task is put on hold until
the current operation is completed.

The mechanism is by default not activated. To enable
it, the following flag needs to be defined:

CONFIG_SOC_FLASH_QMSI_API_REENTRANCY

Jira: ZEP-414

Change-Id: I39429e40cb6ed446123dd1a1d7c7acc1b12417aa
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2016-07-31 16:58:08 +00:00
Genaro Saucedo Tejada
93b9196ab9 sys_log: replace old debug macros at pcal9535a driver
pcal9535a driver is now using new system log macros and updated the
Kconfig variable to be a level rather than a bool.

JIRA: ZEP-311

Change-Id: Ic3d6c72630e66ac116c1e8954c32254677c51566
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-07-30 10:53:21 +00:00
Genaro Saucedo Tejada
d0a588bb5a sys_log: replace old debug macros at GPIO drivers
GPIO drivers are now using new system log macros also updated the
Kconfig variable to be a level rather than a bool.

JIRA: ZEP-311

Change-Id: I9a49626d816080cb8081c2dd445bae31f5dbf409
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-07-29 23:10:50 +00:00
Iván Briano
4be7d42db8 i2c: Remove suspend and resume hooks from i2c_driver_api
Drivers that implement power management should use the preferred
device_pm_ops method instead.

Change-Id: I9ae06e26b77325265bbe46bdee82ba39dedb6b79
Signed-off-by: Iván Briano <ivan.briano@intel.com>
2016-07-29 23:10:10 +00:00
Iván Briano
fd8b0eaccb spi: Remove suspend and resume hooks from spi_driver_api
Drivers that implement power management should use the preferred
device_pm_ops method instead.

Change-Id: I337722b1e06afe8508b5c84c00c3542571232e07
Signed-off-by: Iván Briano <ivan.briano@intel.com>
2016-07-29 23:10:10 +00:00
Iván Briano
bce65437c0 spi: intel: Move suspend and resume hooks to pm_ops
The suspend and resume hooks in the spi_driver_api struct are relics
from before the current power management infrastructure was in place.
The correct way to implement this now is through the device_pm_ops
struct, by way of the DEFINE_DEVICE_PM_OPS and DEVICE_AND_API_INIT_PM
macros, which make the hooks available through a generic mechanism for
all devices, rather than using per-type APIs.

Since the existing spi_suspend() and spi_resume() functions don't check
if the driver_api hooks are NULL, there's now a place holder function
to prevent breaking functionality until the hooks are removed.

Change-Id: I48287c58e9a8649d3e1be7547e3d0d293c84327a
Signed-off-by: Iván Briano <ivan.briano@intel.com>
2016-07-29 23:10:09 +00:00
Iván Briano
c0eda9ec7e spi: k64: Move suspend and resume hooks to pm_ops
The suspend and resume hooks in the spi_driver_api struct are relics
from before the current power management infrastructure was in place.
The correct way to implement this now is through the device_pm_ops
struct, by way of the DEFINE_DEVICE_PM_OPS and DEVICE_AND_API_INIT_PM
macros, which make the hooks available through a generic mechanism for
all devices, rather than using per-type APIs.

Since the existing spi_suspend() and spi_resume() functions don't check
if the driver_api hooks are NULL, there's now a place holder function
to prevent breaking functionality until the hooks are removed.

Change-Id: I6a3e3db370860ad46f428d287943b1ca58a80ae1
Signed-off-by: Iván Briano <ivan.briano@intel.com>
2016-07-29 23:10:09 +00:00