Commit graph

42249 commits

Author SHA1 Message Date
Evan Couzens
17acc7fde4 doc: Moved board content from rst to wiki.
Moved content from arduino_101.rst to Zephyr wiki article

Change-Id: I10d42e28f375bcb5c5c7266e7595b6dd7767ac8b
Signed-off-by: Evan Couzens <evanx.couzens@intel.com>
2016-06-22 03:26:07 +00:00
Sebastien Griffoul
300dee8a26 serial: fix ns16550 set_baud_rate()
In order to change the baudrate the DLAB bit of the LCR register has to
be set to 1 (This bit is used to enable reading and writing of the 
divisor latch register). This bit must be cleared after the baudrate
setup in order to access other registers.

The set_baud_rate function correctly sets the DLAB bit of the LCR reg but
never clears it. Therefore the ns16550 doesn't properly work any more
after updating the initial baud rate.

In order to fix this issue the LCR reg has to be temporary saved
(because it contains other important settings). After switching to a new
baud rate the LCR reg value has to be restored. 

Change-Id: Ied4db683cbf40ba3125e747552968ddf1a66e2be
Signed-off-by: Jeremie GARCIA <jeremie.garcia@intel.com>
Signed-off-by: Sebastien GRIFFOUL <sebastien.griffoul@intel.com>
2016-06-22 01:35:37 +00:00
Jeremie GARCIA
36c19491c0 serial: fix uart_irq_rx_disable()
Fixed uart_irq_rx_disable() to call irq_rx_disable() instead of
irq_tx_disable() callback.

Change-Id: Ib18ab1c147b016ea1a2450380a90d6ac769a75eb
Signed-off-by: Jeremie GARCIA <jeremie.garcia@intel.com>
2016-06-22 01:35:22 +00:00
Andrew Boie
9a7443591a nios2: linker.ld: keep exception code for non-XIP
The KEEP() is only necessary for the exception entry point
as it sits at a magic memory address and isn't referenced by
other code.

Change-Id: I8443e8aa23059b65eaf9c5a1cf3f9b14b04737d5
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-22 01:31:13 +00:00
Andrew Boie
3574aec5e1 nios2: don't enable XIP by default
If XIP is turned on, only hardware breakpoints may be used, and
code cannot be loaded onto the device with nios2-download
or GDB 'load' command. RAM-constrained applications are free to
enable this if they need to.

Change-Id: Iee2d41f71f7ca2bc599801cf3cf0fac680273e51
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-22 01:31:13 +00:00
Andrew Boie
5c586ee6b2 nios2: linker.ld: ensure reset code isn't discarded
This isn't directly referenced by other code in the binary,
it just sits at a magic memory address. Make sure gc-sections
doesn't throw it away.

Change-Id: I1c00a163dbf2eb4866ebadc7f1d70bcc6845b8d1
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-22 01:31:12 +00:00
Andrew Boie
a3c2812e37 nios2: linker.ld: remove some assertions
These aren't valid in all circumstances; the reset vector in most cases
needs to be in ROM.

Change-Id: I83df8762eecc53c99af92f3b0972dfbafac457fb
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-22 01:31:12 +00:00
Andrew Boie
5846018d0d nios2: crt0: fix GDB debugging
When an image is sent over the wire with the GDB 'load' command,
it tries to start execution from the __start symbol, which needs to
be in RAM. Since the reset vector is in ROM, name it something else.

Change-Id: Id0bbfa76db9a8a81bd7ff20be3f2baec81eae15e
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-22 01:31:12 +00:00
Andrew Boie
c266df2d81 MAINTAINERS: Add Andrew for Nios II
Change-Id: Ia7bffdcf5d83a4f7d3642228d828c7158511ab24
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-22 01:31:11 +00:00
Andrew Boie
0d9b755bb1 nios2: ensure stack pointer is properly aligned
Kconfig doesn't enforce any kind of alignment when specifying the
ISR stack size. Perform the assembly equivalent of STACK_ROUND_DOWN.

Change-Id: Ib7fb72ff7db8a3aa20ec6d0c59a03aa8227f6671
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-22 01:31:11 +00:00
Andrew Boie
2933aadce9 altera_max10: use Nios II/f core
Has extra debug capabilities and the board has sufficient space
for it.

Change-Id: I638c665e766f1a41dc5db89fcf8b8c0d44912789
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-22 01:31:10 +00:00
Andrew Boie
b5177d7d2d nios2: Makefile: optionally include SOC Makefile
It may not necessarily exist.

Change-Id: I5c79d7538edef78e38f7e05b004e69e0259dd079
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-22 01:31:10 +00:00
Andrew Boie
464676510b nios2: crt0: init interrupt stack as well
CONFIG_INIT_STACKS should initialize all stack regions
with 0xaa. Make sure the initial interrupt stack gets this
as well. Take care not to exceed the bounds of the array
if it is not 4-byte aligned.

Change-Id: Ib23329ac84a5a8515272be2944f948e8faba65b3
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-22 01:31:10 +00:00
Andrew Boie
9ac955a762 qemu_nios2: new board for running tests under QEMU
Change-Id: If59d9291d3750274ef6a8429e2b24cf35f41dbd3
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-22 01:31:09 +00:00
Andrew Boie
6524bae242 nios2-qemu: experimental QEMU target for Nios II
Change-Id: I4c2413000166b4a8c221fab81f3d8da98a88806b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-22 01:31:09 +00:00
Andrew Boie
4fabf216fd nios2f-zephyr: add Nios II/f core
This core has extra debugging features useful for this bring-up
exercise.

Change-Id: I619bc8768acb1d9be8699a6e238168f47e605f3d
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-22 01:31:09 +00:00
Inaky Perez-Gonzalez
ecc4c765cc doc: fix WARNING: Invalid definition" due to unamed structs/unions
Fix with a workaround in unnamed unions / structs in bluetooth, i2c,
sensor and uart.

Current documentation parsers (sphinx under Doxygen) don't seem to
understand well unnamed structs / unions. They will not generate any
documentation for any documented members (see left side of
http://imgur.com/mcpBXWc).

A workaround is to make the parser think there is something like a
struct/union/enum name that is actually something with no effect to
the compiler.

Naming it with __unnamed_workaround__ ensures it is clear it is a
workaround while we wait for a final fix. It is #defined to be a NO-OP
to the compiler and rearrange the member documentation as *@param* so
we have some documentation that the non-worked around code fails to
document.

Anonymous structs/union that declare a variable are just given an
internal name.

Workarounds documented in the contribution guidelines.

Change-Id: I4d32cf444f3c5e7d2fb11581e4b41f80e93c9786
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-06-21 22:06:56 +00:00
Javier B Perez
587e5a5198 doc: fix blank line and unindent error in FAULT_DUMP option
Change-Id: I5fe38a03c0c16f89e5f456a62eb38d058380d00c
Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
2016-06-21 20:04:13 +00:00
David Kinder
333f2c9bc1 doc: add links for version 1.4.0 documents
update index.rst to include 1.4.0 doc folder

Change-Id: I57b7ea470e4a5d2f8e93459f90421a87abf331ce
Signed-off-by: David Kinder <david.b.kinder@intel.com>
2016-06-21 19:52:48 +00:00
Javier B Perez
5eecd88011 checkpatch: kconfig: warn about spaces instead of tabs
checkpatch warns about kconfig lines that contains spaces
instead of tabs.

Change-Id: I60aa74072ce424f21db64a7df0804d7d4cbe315b
Jira: ZEP-427
Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
2016-06-21 19:50:59 +00:00
Luiz Augusto von Dentz
c116fc42e0 Bluetooth: ATT: Merge all permission check in one place
This merges callback checks with permissions checks so there are done in
one place.

Change-Id: Ic51b2be9cda67eac9e5dc1ebcbf6186ad5007bf4
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-06-21 14:56:04 +03:00
Louis Caron
b7702334c4 drivers/nble: Update firmware to 0620 revision
Update NBLE driver to use the latest firmware fixing the
dependency on the bt_gatt_attr structure size.

Change-Id: Ib93d7d29656028bfb06bbb6ca883816e2a7072fc
Signed-off-by: Louis Caron <louis.caron@intel.com>
2016-06-21 09:24:10 +00:00
Arkadiusz Lichwa
8b1c837e28 Bluetooth: L2CAP: Handle incoming BR/EDR connection request
Enables L2CAP protocol definitions for connection request/response and
use it then to start handle incoming PSM connection request to valid
registered local PSM server. SDP PSM got no security restrictions.
The other PSM connections are validated against link encryption and
availability of SSP feature and if not matched are refused with
security error.

Change-Id: I429cf5dbce92300bd52639d5065e0144f8db4d13
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-06-21 07:41:27 +00:00
Genaro Saucedo Tejada
eeb2b733e4 sys_log: replace old debug macro on ADC driver sample.
ADC driver sample is now using system log.

Change-Id: I44f5189b3beb09a14d87842c5968127460eda710
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
JIRA: ZEP-311
2016-06-20 20:40:31 +00:00
Maureen Helm
280eadffdd ksdk: Add Makefile support for ksdk device and CPU
Translate the SOC name and part number into the ksdk device path and CPU
macro respectively. This will be used by future ksdk shim drivers and by
the ksdk itself.

Change-Id: I40e94441ee032bfbed7df834be8000d95be53250
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2016-06-20 17:38:47 +00:00
Johan Hedberg
8afe6078e1 Bluetooth: Avoid unnecessary indentation in read_remote_features_complete
Instead of having a dedicated branch for the success case jump to the
cleanup label in the inverse condition.

Change-Id: I271ce088a5b469d1fb96af1256fcafa5b1e6e2f7
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-06-20 13:39:28 +03:00
Arkadiusz Lichwa
16fda5f3d9 Bluetooth: Add support to read LMP remote features
Introduces HCI protocol defines to be able request and read remote LMP
features and if available extended data from peer when connected.

Change-Id: Ic274737d8b6c896eb9e83e2179829bcbadf6f635
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-06-20 10:13:03 +02:00
Maureen Helm
2bf391797b ksdk: Add Kconfig support for the ksdk
Add hidden configuration HAS_KSDK for SoCs to select if they have
support in the ksdk.

Change-Id: Ia4cd11901bc26d21a3bdfad6236d66656bb292cb
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2016-06-17 19:15:29 +00:00
Kumar Gala
b757c1ccba nios2: remove empty files from nios2e-zephyr
Use a kbuild trick to force built-in.o to get built even if there isn't
any code so we can link properly.  This is cleaner than keeping around
empty files that don't do anything.

Change-Id: I4214d21104fe5f49613fa5697c8116b0e8c8aa50
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-06-17 17:28:31 +00:00
Kumar Gala
238c9888e6 board: altera_max10: remove empty board file
Use a kbuild trick to force built-in.o to get built even if there isn't
any code so we can link properly.  This is cleaner than keeping around
files that don't do anything.

We keep around board.h for now since drivers and other code might expect
it to exist.

Change-Id: I0fb1105f19149b0e17c45455368ddf0ef75e5165
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-06-17 17:28:30 +00:00
Ramesh Thomas
b4f77ee70a doc: Fix doxygen warnings about params not documented
Some macros were inheriting from other macros with minor
differences.  They were referring to the description of the
the params from the original macro.  However, doxygen does
not recognize that.  Replaced with another doxygen command
that actually pulls in the descriptions avoiding the warnings.

Change-Id: I8545a965ee64f7800f54208e330de7b2c7a611eb
Jira: ZEP-460
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-06-17 16:46:19 +00:00
David Kinder
9c9ee5da8f doc: fix missing titles on kconfig reference entry HTML files
Add a document.title='xxx' via on-page javascript for the
.rst files generated by the genrest.py script

Jira: ZEP-459
Change-Id: I2b3dbb97758cfa232006a0cd98c4bd8394d8183e
Signed-off-by: David Kinder <david.b.kinder@intel.com>
2016-06-17 16:45:08 +00:00
Ryndzionek Mariusz
a66780ea2a doc: fix reviewers setting command
Change-Id: Icb69c2c40e90978833e37dfb4ef437fb0fd17e3a
Signed-off-by: Mariusz Ryndzionek <mariusz.ryndzionek@firmwave.com>
2016-06-17 12:02:02 +00:00
Arkadiusz Lichwa
83fd0cf62e Blutooth: shell: Fix printout BR/EDR PSM server registration
Fixes wrong server instance used during printing details on registration
PSM server.

Change-Id: I269d20bf4d12f24ce143a04c1c23ed8711b9cdba
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-06-17 11:56:56 +02:00
Andrei Emeltchenko
5dc16e0b8f drivers/nble: Indicate that there is no buffers for prepare write
Change-Id: Icb81e4be07e33e0eae6d0341847d2c68be091039
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-06-17 11:12:44 +03:00
Andrei Emeltchenko
93693e60c4 drivers/nble: Shorten on_nble_gatts_prep_write_evt() name
on_nble_gatts_prep_write_evt() indicates that this is IPC function
which is not true.

Change-Id: Ic0c5f12136a84abd7b8e6144f7ca67f9b36968fe
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-06-17 11:12:44 +03:00
Andrei Emeltchenko
4b5e220b1f drivers/nble: Update firmware to 0614 revision
Update NBLE driver to use the latest firmware fixing long write and
updating IO capabilities model.

Change-Id: Iea154f934dd6502fce3960763890ac15492c2952
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-06-17 11:12:44 +03:00
Kumar Gala
b6dd6ec56b Bluetooth: H4: Remove unused board.h include
The board.h include isn't needed so remove it.

Change-Id: If6e2725007f340afd1b782c0278edd5317dfde0f
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-06-17 06:28:26 +00:00
Inaky Perez-Gonzalez
ee4c153f0a doc: fix warnings introduced in bluetooth headers
- Missed/mispelled argument types
- Needed @typedefs to workaround tool limitations

Change-Id: I1655eca96d30d04959154c5d468e1b3b330fafc5
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-06-16 13:11:06 -07:00
Inaky Perez-Gonzalez
0518063495 doc: fix "WARNING: Error in type declaration." in callback typedefs
Some function *typedefs* confuse the *Sphynx* / *breathe* parser [see
the patch for full details]. Implement a workaround (defining the name
with @typedef), add workaround documentation and file a bug with the
sphinx/breathe developers.

Change-Id: I7f3dba4a53d0cc73e12f02511a5f85526f357b5f
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-06-16 13:11:06 -07:00
Inaky Perez-Gonzalez
9752d3d6b6 doc: fix warnings "Error when parsing function declaration." due to __deprecated
Sphinx's parser gets all confused; add a workaround using @fn,
document the workaround in the contribution section; bug filed with
Sphinx for a permanent sollution.

Change-Id: I0200add092da27206b9d006bb13110c4cc37d0e4
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-06-16 13:11:06 -07:00
Inaky Perez-Gonzalez
85c64466ff doxygen: remove NO from list of files, typo
Kills warning:

  error: Tag file `NO' does not exist or is not a file. Skipping it...

Change-Id: I1543b672f7f8eca406d2ab5493a1ad9a45ce7868
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-06-16 13:11:06 -07:00
Inaky Perez-Gonzalez
4867500ce8 doc: fix typos in doc argument names, removing doxygen warnings
Change-Id: I9319fcb8fadd375b6bbec861636c196defcf7def
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-06-16 13:11:06 -07:00
Inaky Perez-Gonzalez
2e7f3bb858 doc: fix doxygen warnings 'documented symbol XYZ was not declared or defined.'
The problem is doxygen's parser is getting confused by constructs as:

  static inline __attribute__((always_inline))
 	void sys_out8(uint8_t data, io_port_t port)
  {
 	_arc_v2_aux_reg_write(port, data);
  }

Too many words at the beginning of the function definition. So change
to use the macro ALWAYS_INLINE (which is already defined to mean
'inline __attribute__((always_inline))`.

Kills:

sys_io.h:37: warning: documented symbol `static inline void sys_out8' was not declared or defined.
sys_io.h:47: warning: documented symbol `static inline uint8_t sys_in8' was not declared or defined.
sys_io.h:58: warning: documented symbol `static inline void sys_out16' was not declared or defined.
sys_io.h:68: warning: documented symbol `static inline uint16_t sys_in16' was not declared or defined.
sys_io.h:79: warning: documented symbol `static inline void sys_out32' was not declared or defined.
sys_io.h:89: warning: documented symbol `static inline uint32_t sys_in32' was not declared or defined.
sys_io.h:120: warning: documented symbol `static inline int sys_io_test_bit' was not declared or defined.
sys_io.h:133: warning: documented symbol `static inline int sys_io_test_and_set_bit' was not declared or defined.
sys_io.h:146: warning: documented symbol `static inline int sys_io_test_and_clear_bit' was not declared or defined.
sys_io.h:161: warning: documented symbol `static inline void sys_write8' was not declared or defined.
sys_io.h:171: warning: documented symbol `static inline uint8_t sys_read8' was not declared or defined.
sys_io.h:182: warning: documented symbol `static inline void sys_write16' was not declared or defined.
sys_io.h:192: warning: documented symbol `static inline uint16_t sys_read16' was not declared or defined.
sys_io.h:248: warning: documented symbol `static inline int sys_test_bit' was not declared or defined.
sys_io.h:261: warning: documented symbol `static inline int sys_test_and_set_bit' was not declared or defined.
sys_io.h:274: warning: documented symbol `static inline int sys_test_and_clear_bit' was not declared or defined.

Change-Id: Id10e9b6cd44a370ccc732c17b23fb66bd1845205
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-06-16 13:11:06 -07:00
Inaky Perez-Gonzalez
7fbe0ba260 doxygen: include arch directory trees
This is needed so the parser can find the functions that are being
documented in high level files as part of ports.

Change-Id: I6b7fe1c2ef28d74741966a18e8008a893975c969
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-06-16 13:11:06 -07:00
Inaky Perez-Gonzalez
ef61a7141f doxygen: run quietly, report only errors and warnings
Otherwise the trees hide the forest and it is really difficult to see
what issues are introduced.

Change-Id: I2272f2caff8b99a15a0b2540787845e4541a36d3
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-06-16 13:11:06 -07:00
Inaky Perez-Gonzalez
5fae13e38d doc: fix code references in typedef.rst
Makes no sense to integrate the whole file for just a few lines, so
defaulted to remove the inclusion and just copy the lines that are
interesting.

Change-Id: I84a2218063ca7368678402b1123da34efae14f27
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-06-16 13:11:06 -07:00
Inaky Perez-Gonzalez
60f5c97dd0 doc|config: Nordic RF5 fix references to SOC_NRF5
There was a reference to SOC_FAMILY_NRF5 which was not use by anyone
else and it seemes like it was a typo, where the right reference was
to symbol SOC_NRF5. However, the right fix is to move both sites to
use SOC_FAMILY_NRF5 *and* fix the SOC_SERIES to be only nrf52,
otherwise it causes path duplication and the build fails.

This was also causing documentation warnings that are thus killed.

Change-Id: I92e74a6158f02df43e6e857df8f1e67bcfdd9551
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-06-16 19:51:40 +00:00
Andrew Boie
63cea24896 misc: add config to omit frame pointer
Change-Id: Ia69c14addded7563a24f15d4a3408fcc2c8e673a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-16 18:15:59 +00:00
Fabrice Olivero
c66ed19dea samples/net/zperf: add task profiler support
Change-Id: I199e4b5aca0b0793e18149a758c430d01b5aabd4
Signed-off-by: Fabrice Olivero <fabrice.olivero@intel.com>
2016-06-16 18:10:29 +00:00