Commit graph

18591 commits

Author SHA1 Message Date
Andrew Boie
24f6f36ad6 system_apic: rename irq_enable/disable
Make this explicit to conform to the abstraction layer
defined in include/irq.h

This only worked before because the preprocessor was
substituting the function prototypes.

Change-Id: Id4d46b01f1c53c3a942772640023e23796eeb43b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-04 18:52:53 +00:00
Maciek Borzecki
b5e26faceb gitignore: make sure that SOC specific linker scripts stay visible
Update gitignore so that linker scripts lower in directory tree under
arch/*/soc stay visible when running `git status`

Change-Id: Ia618eab4534c6ff06d3dedbcd3e0062c1dd278de
Signed-off-by: Maciej Borzecki <maciek.borzecki@gmail.com>
2016-03-04 18:31:42 +00:00
Andrew Boie
f0a01163be sys_io: don't allow negative bit offsets
Use of these is the mark of a deranged imagination.

Change-Id: Ib4b5f78cf61c016e333288090b397e9a3e0b8a40
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-04 16:26:21 +00:00
Andre Guedes
59912cf13f samples: Add UART application
This patch adds a very simple UART sample application which demonstrates
how to use the UART APIs. This sample is also useful to quickly verify
if a given UART driver is working properly. For now, the application
tests uart_poll_in() and uart_poll_out() APIs only, but new APIs should
be added in future.

Change-Id: If815f358f11efb058e947291b234d3d4130581d8
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-03-04 15:16:20 +00:00
Andrew Boie
7393a00a5f test_bitfield: exercise sys_*_bit and sys_bitfield_*_bit
Origin: original code
Change-Id: I16c324e1124a58d77386236f4c0cc597041c220e
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-04 15:12:07 +00:00
Andrew Boie
9df398b0d5 sys_io: introduce bitfield ops
These are guaranteed to work for bitfields that are
larger then 32 bits wide.

Change-Id: I39a641f08a255478fae583947bced762950d12ff
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-04 15:12:06 +00:00
L.S. Cook
023e1281e6 doc: Edit microkernel_timers.rst with better ReST syntax to enhance readability.
Added ReST syntax dfns, added bold and lists.  Reworded a couple sentences
that could be stated more clearly.

Change-Id: I997b54e1dcbc44d683919008770dd90857a96e47
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-03-04 15:09:37 +00:00
Dan Kalowsky
3f6884902b arch: arm: set the architecture via Kconfig
Currently the build system has hardcoded values for the -march/-mcpu
which identify what architecture should be used when compiling ARM code.
For processors such as the STM32 this will need to be defined by a per
SOC process.

Change-Id: Ia8158cd687d8d0432ea420e204bb2bc67d33a054
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-03-04 15:08:40 +00:00
Yannis Damigos
baddeadda1 arch: & kernel: Updated Kconfigs to remove errors in html generation
This patch updates some help sections to remove the "ERROR:
Unexpected indentation" messages during hmtl documentation
generation.

Change-Id: Idcdc17727b921b6145f9eb28d85975ceca273ce2
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-03-04 13:26:15 +00:00
Andrei Emeltchenko
a81c3080a2 Bluetooth: Fix typo subscribtions to subscriptions
Change-Id: Ibf015e304e34fddf0f508a1951ac504f07e20d83
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-04 11:21:27 +02:00
Anas Nashif
21594aa1fd Revert "samples: A test app for WinBond spi flash"
This reverts commit 1b1a9ef845.

This sample was merged by mistake and without the needed drivers
or APIs.

Change-Id: Icf588ed3517e9c2f905d319e6f6f5fff935aa77a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-04 00:59:36 +00:00
Yannis Damigos
ea3b5d356c zephyr-env.sh: Set correctly $ZEPHYR_BASE in zsh
Sourcing project environment file failed to set correctly
$ZEPHYR_BASE in zsh if it was sourced from another directory
(e.g. home directory). This patch fixes this issue.

It was tested on zsh, bash and sh on Linux.
It needs to be tested on OS X.

Change-Id: Idfb11c6a3109042a9f578f38b3849d9cf9c31f95
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-03-03 14:53:40 +00:00
Vlad Lungu
616bf84db1 spi: intel: fix write failures at low speeds
When configured at a frequency of 2MHz, a transaction writing
3 bytes and reading 1 byte fails silently (last byte cannot be
read back from the device). Enabling CONFIG_SPI_DEBUG fixes the
issue.

Scope traces show that the transaction (from /CS assert to /CS
deassert)  takes 14us and there is activity on the MOSI line
after /CS is deasserted. A transaction writing 2 bytes and reading
3 bytes take 22us.

The issue is due to the fact that completed() deasserts /CS after
the driver has put 3 bytes in the TXFIFO and taken 1 byte from RXFIFO.
Just because the last byte made it to the TXFIFO, it doesn't mean that
it was put on the MOSI line.

The fix:
For a transaction sending T bytes and expecting R bytes, let N=max(T,R).
Send exactly N bytes and wait for exactly N bytes (or an error). This
way, we are sure that all the bytes were sent to the target device.

Also:
Stop calling pull_data() after every byte sent, it might take a while
for a byte to show up in RXFIFO.
If RFS bit is set, stop sending bytes (will be really useful with a
bigger RFT).
Flushing RXFIFO in spi_intel_transceive() is not needed anymore.

Change-Id: Ifb06a12b03e3e20d6ace4d9f3a20fc11ec3bb010
Signed-off-by: Vlad Lungu <vlad.lungu@windriver.com>
2016-03-03 11:00:45 +00:00
Vlad Lungu
99cb8a6ab4 spi: intel: fix typo in port 1 configuration
Remove semicolon that triggers a build failure
when CONFIG_SPI_INTEL_PORT_1=y

Change-Id: Iea49d44059377cf9eb0b5b5e14b625cb316a65bb
Signed-off-by: Vlad Lungu <vlad.lungu@windriver.com>
2016-03-03 11:00:45 +00:00
Andrew Boie
b54355050d REVERTME: bluetooth: tests: disable some tests
bluetooth/shell and bluetooth/tester need to be disabled on
galileo and minnowboard respectively. On these platforms,
the IRQ for the UART console and the H4 are the same IRQ line.
IRQ_CONNECT() is being called on the same IRQ line twice, and
it's only through linker luck that these tests work at all
since one driver will "win" when the mapping is set up at build
time by gen_idt.

gen_idt was supposed to break the build in this situation but
was bugged. The next patch in the series fixes gen_idt.

Change-Id: Ib4a42b57181731121dfad50606c8362a9fd0277d
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-03 10:24:25 +00:00
Andrew Boie
4900aecc8e gen_idt: correctly warn on duplicate IRQ connections
Now if you try to call IRQ_CONNECT() multiple times on the same
IRQ line it will correcly fail the build, as intended.

Change-Id: Ia629ae3dd009bd3a2e1dbd9797dc2b723b02d234
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-03 10:24:25 +00:00
Andrew Boie
8f0211dcf3 sanitycheck: fail on footprint analysis of stripped ELFs
These don't have necessary symbol information to determine if the
kernel is XIP or not. Fail instead of giving bogus data.

Change-Id: I87f6eeb5983f5275929e5b8d448a054b83e23d8f
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-03 10:24:06 +00:00
L.S. Cook
80edd833dc doc: Edit microkernel_events for clarity, ReST syntax, and parallelism.
Updated the Concepts subsection with a clearer topic outline, added bold
and dfn; added heading to Example: Defining Private Event... ; fixed some muddy
language in paragraph about event handler functions.

Change-Id: I040ae8ee2be7fd4742f782e5f505a9cdcece7b62
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-03-03 09:50:46 +00:00
L.S. Cook
32fd061e66 doc: Add clarification to common execution contexts docs
A couple paragraphs contain ambiguous verbs that are unclear.
(For example: Line 23. Does the kernel perform a busy-wait,
or does it merely permit a task or fiber to perform a busy-wait?)
Based on original, I guess the latter and attempted to correct this
in the docs.

Also fixed spelling error.

Change-Id: I0699835a9681c1a4873575fbf9a69bc6d854bee4
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-03-03 09:50:34 +00:00
L.S. Cook
6a1d23f4f9 doc: Edit microkernel_semaphores.rst for consist structure and APIs.
To have consistency throughout the docs, APIs should all be in
imperative verb. Updating this, and adding other consistent structure
to match the rest of microkernel section docs.

Change-Id: Ic2285496895ae9edfcc523f8fc2f99bcb935227f
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-03-03 09:49:24 +00:00
Mariusz Skamra
8a186d4eab Bluetooth: tester: Fix missing le to host order conversion
This fix missing conversion of CEP properties.

Change-Id: Ibdf9fecdb3e21e8fd5e2b7ccacb88ae2abd81776
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-03-03 08:18:39 +00:00
Ravi kumar Veeramally
bf90337e87 net: 802.15.4: Fix the dummy driver
Do not depend on uart_pipe_send return value. Just assume
uart_pipe_send call to uart_poll_out sent data through uart.

Change-Id: Ifc7119f94b625d4f2895d92d44d660013bf50145
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-03-03 07:17:56 +00:00
Ravi kumar Veeramally
fe67b69cd0 net: apps: Add separate prj_qemu.conf for board type qemu
Add separate prj_qemu.conf files for qemu_86 board type. Also
remove set_options from Makefile.ipstack which is not required now.
Now build the echo-server with "make server NET_IFACE=qemu" and
echo-client with "make client NET_IFACE=qemu" command options.

Change-Id: I1f3c9c6a198f2b6cae54ae4a5da970b284ef84de
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-03-03 07:17:30 +00:00
Ravi kumar Veeramally
4e2023c663 net: apps: Fix echo apps Makefile
Add bt related qemu flags only when BT is enabled.

Change-Id: Idc611dcf7726829ed77c3f4898abd794a825212f
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-03-03 07:17:29 +00:00
Ravi kumar Veeramally
89ca24c779 net: Fix NETWORKING_WITH_15_4_TI_CC2520 config option
NETWORKING_WITH_15_4_TI_CC2520 is already depends on
NETWORKING_WITH_15_4, so no need to select again.

Change-Id: I74970a6d550a049dc69734048d1e6eaa13be36b6
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-03-03 07:17:29 +00:00
Anas Nashif
8569839666 Zephyr 1.1.0-rc1
Change-Id: Iafe6fbee5a3ba603963fb7bcbf2b28f1875b1242
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-02 12:56:17 +00:00
Anas Nashif
29d0d234e1 device: add missing license header
Change-Id: Ice01a19373ad17a9f8080f93c066d8be31a3b115
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-02 12:56:17 +00:00
Yannis Damigos
ab1c6a1c81 doc: Fixed two warnings in html format documentation generation
The patch modifies the file doc/conf.py to fix the warnings:

1) the config value 'html_add_permalinks' has type `bool',
	defaults to `str.'
2) html_static_path entry '/media/projects/zephyr/doc/_static'
	does not exist

Change-Id: I01e74b5db85311c514ef437e75b8f378ce80125f
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-03-02 12:33:44 +00:00
Yannis Damigos
3e3e297719 zephyr-env.sh: Fixed sourcing the project environment file
In zsh the value of $0 depends on the FUNCTION_ARGZERO option
which is set by default. FUNCTION_ARGZERO, when it is set, sets
$0 temporarily to the name of the function/script when executing
a shell function or sourcing a script. POSIX_ARGZERO option,
when it is set, exposes the original value of $0 in spite of the
current FUNCTION_ARGZERO setting.

This patch allows to source the project environment file from
both zsh and bash. It also removes the -z option from the
basename command which is missing in OS X.

Change-Id: I5a32404784d9064bf749fa58b4d73d4b56c908c2
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-03-02 12:32:58 +00:00
Mariusz Skamra
9055bfe58f Bluetooth: tester: Fix missing bit in GAP supported commands
GAP_CONNECT bit was missing in supported commands.

Change-Id: I9d009c55327ae67bed38c45b7c11fb67665e1cd0
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-03-02 11:38:00 +01:00
Mariusz Skamra
c76bd33d61 Bluetooth: tester: Fix supported commands to use uint8_t array
Fixes endianess issues.

Change-Id: I9c308187d34a832cc875c9037235cedc8bee033c
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-03-02 11:38:00 +01:00
Mariusz Skamra
0abe6e85ba Bluetooth: btp: Fix BTP GATT command opcodes
This patch makes opcodes to be in the sequence.
Supported commmands is form now uint8_t array, so this resolves
the problem with endianess as well.

Change-Id: I602a58081948dbbf5e0d83cbb12a118a5990b9f8
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-03-02 11:38:00 +01:00
Jukka Rissanen
b1fd0c6a2c net: License information was missing
Few configuration related header files were missing license
header.

Change-Id: Id4ef8273a80eb41f39248dd33ccefbeb30ef57dd
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-01 16:58:32 +00:00
Yannis Damigos
79d0a339f5 doc: Documentation generator failed for html format
Fixed some indentation errors in scripts/genrest/kconfiglib.py
which cause generation of html format documentation to fail

Change-Id: I228f528d49722549f6034a572049db4b9d735615
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-03-01 16:53:51 +00:00
Benjamin Walsh
fb61bd4d5d add missing license to zephyr-env.sh
Change-Id: I0a43e634534ee1cb43c6ad2dc966d9ee20e0b9e5
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-03-01 16:52:57 +00:00
Jukka Rissanen
ca3d1adc43 net: Use the existing logging option in Kconfig for debugging
Instead of new config option for debugging, lets re-use the
existing logging option CONFIG_NETWORKING_WITH_LOGGING that
is found in Kconfig. Unselecting that option will turn off
the debug messages in IP stack.

Change-Id: I4c1e0e91f3959304b7dc2b62d2bf73ec87cd1114
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-01 13:49:55 +00:00
Luiz Augusto von Dentz
410d6849a6 net: Fix Bluetooth driver warning
This fixes warnings when compiling without
CONFIG_NETWORKING_WITH_LOGGING.

Change-Id: I50ee7004ba5c662ef2d6ff32b5dd3e1e41a92b5b
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-03-01 13:49:25 +00:00
Jukka Rissanen
bf2c827dcf Revert "cc2520: Rework reception logic"
This reverts commit bf77d902ac.

The commit is reverted because it causes hangs in packet
reception. After transferring data a while, the chip stops
packet reception.

Change-Id: Icb94e978e3ba526314afd5e80f35c877febe8740
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-01 14:22:46 +02:00
Jukka Rissanen
7795ec4435 Revert "cc2520: Turn off auto ACK"
This reverts commit e695d43fad.

This commit allows reversal of the commit
bf77d902ac which is called
"cc2520: Rework reception logic". Original code had auto ACK
turned off so we can revert this commit too.

Change-Id: Ic4979d1caa0f4341b9642d8a83ee65cf71562994
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-01 14:22:04 +02:00
Jukka Rissanen
ce4919069b net: Print the stack usage in timer fiber less often
If enabled, the stack usage is now printed every 60 secs.
Also changing the code to use the kernel ticks clock API.

Change-Id: I44eabd0c372dfb8983ef379e12e38e5bf94a99d2
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-01 14:12:13 +02:00
Jukka Rissanen
1aeca8d569 net: Timer fiber now sleeps until next event
The network timers will now use the fiber wakeup to let the
network timer fiber to get the next event. This enables the
timer fiber to sleep much longer and only wakeup when there
is something to do.

Change-Id: Ia69d92392c02b884c036793de41b38b6489c4d2e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-01 14:12:13 +02:00
Michael LeMay
6269b94652 doc: Note spurious Intel Galileo boot messages
Change-Id: I662dfd64d2e09e2a4ab6bbf76e74ebdeaae22325
Signed-off-by: Michael LeMay <michael.lemay@intel.com>
2016-02-29 22:57:43 +00:00
Michael LeMay
7987a74350 doc: Revise Intel Galileo board instructions
There were inconsistencies and outdated information in the Intel
Galileo board instructions.  They were also unnecessarily complex.

Corrected inconsistent instructions for copying the stripped ELF file
to the boot device.

Updated description of what output to expect from Galileo firmware
during boot.

Added links to board configuration instructions from Intel website.

Added instructions for configuring PuTTY keyboard mode.

Removed redundant instructions in the sections for boot device
preparation and booting the board.

Simplified the UEFI boot instructions.

Change-Id: Ie1a636a7f88a89f23945eb742536446c6a5829c1
Signed-off-by: Michael LeMay <michael.lemay@intel.com>
2016-02-29 22:57:43 +00:00
Michael LeMay
7c05a7d739 doc: Remove unneeded Ubuntu dependencies for GRUB
I built GRUB on Ubuntu v.15.10, and I found that some of the
dependencies listed in the Galileo documentation do not actually need
to be listed on the apt-get install command line.  Some are simply
unnecessary, and others are already listed as dependencies by other
packages in the list.

Change-Id: If6ae0c3abe54a18839e75299a3e9cf006c745d0c
Signed-off-by: Michael LeMay <michael.lemay@intel.com>
2016-02-29 22:57:43 +00:00
Michael LeMay
352c0c9a07 docs: Note in Galileo docs that PCI enumeration is disabled
Change-Id: Ife85345e7f0e34860f29367833ea4374f639aa84
Signed-off-by: Michael LeMay <michael.lemay@intel.com>
2016-02-29 22:57:43 +00:00
Anas Nashif
2ed89a49ee rtc: enable clock-gating for RTC on Quark SE
Clockgating was disabled for RTC and disabling RTC had no
effect on Quark SE boards.

Change-Id: I67448d5582a206fc7a68d763d504e9f743043b53
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-29 16:53:36 +00:00
Luiz Augusto von Dentz
0401d5a54a net: dtls_server: Add support for Bluetooth
This enables using dtls_server with Bluetooth by passing
CONF_FILE=prj_bt.conf, it is also enabled for testing so changes to
dtls-server are actually tested with NETWORKING_WITH_BT.

Change-Id: Ice4f409c8e2d9e97856159482969f6352264864b
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-29 13:03:35 +00:00
Luiz Augusto von Dentz
758b159120 net: dtls_server: Avoid using #ifdef and #ifndef
It is prefered to use #if (!)defined form for checking defines since it
can actually check more complex conditions.

Change-Id: Ia8ab6898d340967759a8ecbda65c4bcacdc0293e
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-29 13:03:20 +00:00
Luiz Augusto von Dentz
f32a837c9b net: coap_observe_client: Add support for Bluetooth
This enables using coap-observe-client with Bluetooth by passing
CONF_FILE=prj_bt.conf, it is also enabled for testing so changes to
coap-observe-client are actually tested with NETWORKING_WITH_BT.

Change-Id: I02705f855c1974b065557986f9b231201ba310a7
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-29 13:03:08 +00:00
Luiz Augusto von Dentz
86a4eeb740 net: coap_observe_client: Avoid using #ifdef and #ifndef
It is prefered to use #if (!)defined form for checking defines since it
can actually check more complex conditions.

Change-Id: I80b97d51cb321d84df417f8722e661d944504d4f
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-29 13:02:52 +00:00