Commit graph

41120 commits

Author SHA1 Message Date
Anas Nashif
22c86a6907 doc: rename basic_minuteia to qemu_x86
Change-Id: Ie639739f8d98456f9e6571ff7816958042536568
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:30 -05:00
Anas Nashif
71d22157b4 makefile: do not create directories when calling help
Create a new help target.

Change-Id: I33200cb129a2527d31d19ec99bc1cd6ded1c21ea
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:30 -05:00
Louise Mendoza
8905bdb49f build: add support for mingw32 zephyr toolchain
The toolchain provided by Yocto has a specific path location.
The linux toolchain home directory after the installation is
sysroot/i686-pokysdk-linux meanwhile the mingw toolchain home
directory is sysroot/i686-pokysdk-mingw32

Change-Id: I2241a996897539c2c630c6e391f5125b51385b8e
Signed-off-by: Louise Mendoza <yonattan.a.louise.mendoza@intel.com>
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:25:30 -05:00
Jesus Sanchez-Palencia
8d0c9124a0 gpio_qmsi: Use level sensitive interrupts
For QMSI drivers with combined interrupts, we need to use level
triggered interrupts. This is the case of the GPIO controller.

If we keep it configured as EDGE, the user will never be able to
get a pin configured as LEVEL to fire more than 1 interrupt.

Change-Id: I36bffc79183ca97f431c4f5811ed5d56e2fd82e8
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
2016-02-05 20:25:30 -05:00
Rodrigo Caballero
4f976c20d7 doc: Refactor the Quick Start Guide.
Restructured the guide to follow a basic three step process: Set up, develop,
build. All information that is independent of the OS selection was taken out of
of the OS related documents and placed in the general set up sections.

A new section, Developing Zephyr Applications, was added with links to all the
development relevant section of the documentation.

The content in local_development.rst was split between the setting_up.rst,
installation_linux.rst and installation_mac.rst files as appropriate.

This new structure provides a much better flow for developers beginning their
Zephyr develpment.

Applied all of Inaky's suggestions in the refactored content.

Minor markup fixes and language edits were also perfomed during the refactoring.

Fixed a cross-reference that was broken during the refactor.

Applied all the feedback from the first trial run.

Applied the feedback provided by David Kinder from TCS.

Change-Id: I3368a3a41ec9ad02cc4e7b37fe71c65abd8a7df9
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-05 20:25:30 -05:00
Tomasz Bursztyka
c8da62567e cc2520: Fix DEVICE_INIT macro usage
config_info data comes after driver_data (though the first one is
usually the one you use first, but anyway).
Fixes a bug introduced by my commit id
3eade319e878c7e11faf4cd93a99d33737e16e6c

Change-Id: I3f58b7fd9605270bb6edf24ae0d129313ac9ab2f
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-05 20:25:30 -05:00
Andrew Boie
5cc61d5406 iamcu: interrupts: fix comment
Was only true for SYSV version.

Change-Id: I2a73c027b4a68c879c66338713f2d50a400d6c26
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:29 -05:00
Andrew Boie
fb0f918cb1 iamcu: fix dynamic IRQs
The common stub code didn't prefix the arg to 'mov' with a
'$', causing the assembler to generate code which tries to
dereference the argument before sticking it in EAX.

Change-Id: I0e201f799565d9709e3969b82ae2eb3f93a78b3a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:29 -05:00
Andrew Boie
0b1d68af27 iamcu: fix irq_offload()
The ASM stub invoked by irq_offload() wasn't switching to the
interrupt stack.

Change-Id: I0c52092a50396aa892e71f0501bbda38395d7554
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:29 -05:00
Andrei Emeltchenko
28198fcca5 quark_se: Remove pipe config defaults
Making pipe driver configuration for quark_se makes no sense for the
board. First it simply wrong since IRQs for serial are 5 and 6 and
when using PIPE care should be taken to allocate right way serial and
Bluetooth for the given UARTs.

Change-Id: I4cb3227a8be34fbfa089a457e6d9977e4adcfd19
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:25:29 -05:00
Andrei Emeltchenko
19b939d886 arduino_101: Add pipe configuration to the board
Add tester support for arduino_101 board reusing UART1.

Change-Id: Ifc00f92a80accffc37fd9b09df798ff995340a1c
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:25:29 -05:00
Anas Nashif
b8ef593878 Zephyr 0.9.0-rc1
Change-Id: Id3a66d89627808d2189c9cd7d93e836d2435809f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:29 -05:00
Juan Manuel Cruz
e04e5d97be adc: sample conofiguration update
The default number of IRQs is good enough for this sample.

Change-Id: I00f2088b4c82d60717563e36ebccfecac3983522
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:25:29 -05:00
Vinicius Costa Gomes
8166cf8d8f spi: qmsi: Add support for selecting the driver's init priority
Because of the necessity of using a GPIO pin as Chip Select, we need to
set the initialization priority of the SPI driver so it occurs after the
GPIO driver.

Change-Id: I02d675d8267ee07b267155a3806be85fbf57378c
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-02-05 20:25:29 -05:00
Vinicius Costa Gomes
39d87755c1 spi: qmsi: Add support for using a GPIO pin as CS
There are cases that it is needed to use a GPIO pin as chip
select (frames would be too long, for example), so using a GPIO pin as
chip select to keep the line active while the transfer is ongoing is the
usual solution.

This implements that solution for the QMSI shim driver.

Change-Id: Ia6b8f0f17161e20f87ad3def1468fe0abea65fdc
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-02-05 20:25:29 -05:00
Vinicius Costa Gomes
9442446944 samples: Add a sample SPI application
This application reads the 'WHO AM I' register from a LSM9DS0
sensor connected over SPI.

Change-Id: I7b0631e9bc783aea60fdb489f40058e0c15275fb
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:29 -05:00
Juan Manuel Cruz
eb8ab24ae8 build: make QUARK_SE_IPM_CONSOLE_RING_BUF_SIZE32 symbol editable
QUARK_SE_IPM_CONSOLE_RING_BUF_SIZE32 symbol must be editable through
configuration menus and configuration snippets (QA request).
Adding a title for the kconfig symbol makes it editable.

Change-Id: Id0147a50d94033e1392327935bcbfbdb5a9eedd8
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:25:29 -05:00
Vinicius Costa Gomes
40f8914376 spi: Add QMSI-based implementation
This driver uses the QMSI library and mostly translates calls from the
Zephyr API to QMSI ones.

This driver conflicts with the native driver implemenation. In order to
enable it, you must set:
CONFIG_QMSI_DRIVERS=y
CONFIG_QMSI_INSTALL_PATH="PATH_TO_QMSI"
CONFIG_SPI_QMSI=y
CONFIG_SPI_QMSI_PORT_0=y
CONFIG_SPI_QMSI_PORT_1=y

Missing:
 - Support for using a GPIO pin as Chip Select;

Change-Id: I0d8eca88a2a803b6b3604f396f874313fe90753c
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-02-05 20:25:29 -05:00
Anas Nashif
416525849a toolchain: add support for external libc on arm/arc
Both ARM and ARC did not have the right include path defined.

Change-Id: I8322b49ffa1830ef7b06cddef686ceb83a85fdfa
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:29 -05:00
Anas Nashif
5cf903f22b x86/iamcu: build with -miamcu only when CONFIG_X86_IAMCU=y
Change-Id: I57727893f37bea88ab3b6e6f47f36569d9eef97d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:29 -05:00
Anas Nashif
c8b31705a1 tests: add build tests for various options
This test builds the syncronisation app using the following config
options to verify if the build is successful:
- CONFIG_DEBUG
- CONFIG_NEWLIB_LIBC

Change-Id: Idf2fe948ab58982244b3590da938a83206103be3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:29 -05:00
Anas Nashif
51be9a50a4 Add flash support for boards using latest SDK
Using the latest SDK (0.7.2) you can flash directly using make
by specifying the board, for example

make BOARD=arduino_101 flash

This will build and flash the generated binary to the board.

Change-Id: I90254abd69874efbb449ef318079958980c23074
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:29 -05:00
Anas Nashif
c4c919dbe0 Move compiler optimization to the SoC
Decisions on compiler optimizations were done on the architecture level,
this does not scale and some SoCs will have different optimization levels
or compiler options needed. Moving this to the SoC makes it easy to optimize
differently when using the same CPU which we use to set the right optimization
now on the architecture level.

For IAMCU platforms, use the right architecture and tuning.

-march=lakemont -mtune=lakemont -miamcu -msoft-float

Change-Id: I458afca5feb9be5de8dcae559d6dcac3c6d6a2a7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:29 -05:00
Daniel Leung
ed98af00e0 samples: gpio: extends to support gpio_atmel_sam3 driver
This adds code to the gpio sample apps to run on Arduino due,
using the gpio_atmel_sam3 driver.

Change-Id: Ida16ceeabf55eb7efedc94c56ff875d8fad6456d
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:29 -05:00
Daniel Leung
a8a5597e94 arm/atmel_sam3: fixes incorrect rename to SYS_INIT()
Change-Id: I0c2ce73cd758e5e7472fa7bf66e48d12b1cdf6af
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:29 -05:00
Daniel Leung
bf0e5089dc arm/atmel_sam3: fix SRAM base address for SAM3X8E
The default Kconfig option is missing a condition for the SRAM
base address on SAM3X8E. Add it back so the correct default
can be used.

Change-Id: Ib4103366f693648c76630cbbd71ca98109381d5c
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:29 -05:00
Daniel Leung
db359d2219 samples: apps: rename gpio_dw to gpio
This renames the gpio_dw sample app to gpio, as this can be used
for multiple drivers.

Change-Id: I6f21237b5b8df10f531e47ad9f75cadfd619cd34
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:29 -05:00
Daniel Leung
f6a5bfcfa1 gpio: add driver for Atmel SAM3 PIO controllers
The PIO controllers on Atmel SAM3 family processors can be
used for GPIOs, so this is the driver.

Change-Id: I3d5712f3a0a71025b820ca1c08dd767ee1e136d8
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:29 -05:00
Daniel Leung
cae35e2460 gpio: allow pins to be enabled/disabled
Some GPIO controllers allow individual pins to be detached
from the controller (i.e. the controller no longer affects
the pin output, or can read its state).

This adds the configuration bits to the API so this feature
can be used by apps.

Change-Id: I355fd5910a5439dcabe01ab40cd887dda30eab72
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:29 -05:00
Daniel Leung
9c9ad646e1 boards/arduino_due: add pinmux driver
This adds the pinmux driver for use with Arduino Due.
The default for pinmux (mostly) reflects the pin layout
on the board.

Change-Id: I80827ee8bc507567e0cc04b3c8c48580aadf2b3f
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:29 -05:00
Andre Guedes
dacf54de68 i2c: Enable interrupts for QMSI shim driver
Due to an issue with the interrupt-based transfer API from QMSI driver,
the 'transfer' callback from the shim driver (i2c_qmsi_transfer) is
implemented with polling APIs. This is not ideal because we are not able
to sleep the current thread (so another task can be scheduled in) while
the i2c operation is carried out.

The interrupt issue with the QMSI driver has been solved then this patch
fixes the shim driver so it uses the interrupt-based API and adds extra
code to handle the thread synchronization.

Finally, this patch also moves all 'struct device' related definitions
from the bottom to the top of the i2c_qmsi.c file so the DEVICE_GET
macro can be used in transfer_complete() and removes the init.h include
since it is not needed anymore.

Change-Id: I7ef7ce4cea6fcc939e310e5fe12c406645f6a16e
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-02-05 20:25:29 -05:00
Andre Guedes
4c3a1afbac i2c: Add multi controller support for QMSI shim driver
Currently, the I2C QMSI shim driver supports only the "I2C 0"
controller instance. This patch extends the driver so it supports
the "I2C 1" instance as well.

The controller instances can be enabled independently.

Change-Id: Ieb64df46816026f3f4fb262a1682c98ee36bedd5
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-02-05 20:25:29 -05:00
Ido Yariv
3db6a541c8 Quark: Set up IRQ routing for PCIe explicitly
IRQAGENT3 is initialized explicitly, but IRQAGENT0 isn't and its value
is based on the value the BIOS or bootloader had set before. Fix this by
explicitly initializing IRQAGENT0, and swizzle the IRQs to reduce
conflicts.

Update the pci_pin2irq function to accommodate for these changes.
Also remove pci_irq2pin function since it is unused.

Change-Id: I7b1dfc7659ab227fe66711a3af5a1f34fd4a7972
Signed-off-by: Ido Yariv <idox.yariv@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Ido Yariv <ido@wizery.com>
2016-02-05 20:25:29 -05:00
Ido Yariv
6b6ef8bbb7 QEMU: Add optional PCI support
To debug PCI drivers on QEMU, it may be desired to enable CONFIG_PCI for
QEMU targets. Since the PCI driver requires a SOC pin2irq translation
function, add such function to IA32's SOC header file.

Change-Id: Icf6f88aa14ae29d70fe12dc80a708e6a2e992ba8
Signed-off-by: Ido Yariv <idox.yariv@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Ido Yariv <ido@wizery.com>
2016-02-05 20:25:29 -05:00
Daniel Leung
631c3b1242 samples: adds a sample for using aio_dw_comparator driver
Change-Id: Idcfe266db237a0f2aaa6376562cf92bb49e626cc
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:28 -05:00
Daniel Leung
1b6c88ffe2 aio/aio_dw_comparator: adds Kconfig for IRQ priority
Adds a Kconfig for setting IRQ priority, and set the default to 3.

This fixes an issue where the interrupt vector as placed in wrong
slot in the IDT table since the priority was zero, and thus
no interrupts from the comparator was received by ISR.

Change-Id: Ief2100c1d79e42f8cedc4e0ca21ed5f6970d62e2
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:28 -05:00
Daniel Leung
985c0b1de4 aio/aio_dw_comparator: use Kconfig to define device name
This makes the aio_dw_comparator driver to follow others by using Kconfig
to define device name. This makes using the device in apps a bit easier.

Change-Id: I4fbcb0c009c863a2216a15a78a8aa6324d95690b
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:28 -05:00
Daniel Leung
9709c1008a samples: adds a sample for interfacing with APA102C LED
Change-Id: I653a47c942a36ce4002f0acad29c4978aa47080a
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:28 -05:00
Dmitriy Korovkin
9183e1f4de device: Make device_sync_call_complete aware of the caller context
device_sync_call_complete can be called from ISR, fiber or task, thus
needs to be aware not only of the waiter context, but also on the actual
caller one.

Change-Id: I76652a2c44d854db9c34e7192355d455d43f61e3
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-02-05 20:25:28 -05:00
Andrew Boie
f0a1d22f28 x86: leave the GDT in ROM by default
We don't normally need a runtime-mutable GDT; make it optional to
activate a second copy in RAM. Regardless of whether it is in RAM
or ROM, it can be accessed by the '_gdt' symbol.

Change-Id: I5ce955f4b8875eb60040917ceaacc07d7e5941ac
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:28 -05:00
Daniel Leung
cb76f11259 arch/arc: fixes native C version of atomic_nand
Change-Id: I2f493e2c7cb841ef1273e628701d3b087d402e3f
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:28 -05:00
Peter Mitsis
61e6f4a299 sys_clock: Lock interrupts when processing announced ticks
Interrupts must be locked when processing announced ticks in
_nano_sys_clock_tick_announce().  This prevents higher priority
interrupts from interrupting the tick announcement and possibly
corrupting the timeout and/or timer queues.

Change-Id: I4e87fc5b3ad36161e0accb50b2691f975f5877e5
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:28 -05:00
Jukka Rissanen
1b7b470cb0 net: contiki: Fix the debug printing support for ICMPv6 code
Change-Id: I01ea438e946ec597ac389bd26f0f26c307efa65e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:25:28 -05:00
Jukka Rissanen
d9f50cdb9d net: contiki: Make sure ICMPv6 support is activated
We need ICMPv6 support if IPv6 is enabled.

Change-Id: I5e6ffe83d8299916bb268d136264f3e5cf6f91e6
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:25:28 -05:00
Jukka Rissanen
2822ed6537 net: contiki: Fix the NA ICMPv6 sending
The ICMPv6 NA (neighbor advertisement) packet length was not set
correctly so no NA message was sent.

Change-Id: I7ddf41545f4b07da669d29f2529f5b04d3bc8b75
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:25:28 -05:00
Jukka Rissanen
1e9fd8da9b net: Enable IPv6 neighbor discovery by default
The IPv6 neighbor discovery is needed when dealing with real
brearers like 802.15.4, so enabling ND by default.
In Qemu and if SLIP is used, then the ND needs to be disabled
as it does not work properly with tun devices.

Change-Id: I8baf11e71fb546b698a0a3d18fcacb142744db60
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:25:28 -05:00
Johan Hedberg
a9404225e5 Bluetooth: Use NULL for "any" connection with bt_conn_lookup_state_le()
An all zeroes address is in principle not valid, but prototype devices
have been seen using it. To avoid false-positives with the
bt_conn_lookup_state_le() API use a NULL pointer rather than
BT_ADDR_LE_ANY to indicate that any connection in the specified state
is of interest.

Change-Id: I42a1946e47173b17be295b1b7e97a654dbdcdc6a
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:25:28 -05:00
Johan Hedberg
27fe6fcb46 Bluetooth: L2CAP: Further simplify l2cap_chan_create_seg()
Change-Id: I57d45fcb0647459d9b5b465d175064fa3a194601
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:25:28 -05:00
Johan Hedberg
aa1d49041b Bluetooth: L2CAP: Take advantage of net_buf_push_le16 helper
Change-Id: Iff5e2b8f7d16f829b93832f513113c6c6c292d37
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:25:28 -05:00
Johan Hedberg
8d98247c8f net: buf: Add net_buf_push_le16 helper function
Change-Id: Icce051392d1523df8ebfeccf76477a6264d3d216
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:25:28 -05:00