Commit graph

99014 commits

Author SHA1 Message Date
Kumar Gala
6102427e5d build: Introduce concept of SoC specific build flags
Introduce a soc-cflags, soc-cxxflags, and soc-aflags as a means for
SoC specific compiler flags to be set without manipulating Kbuild
options directly.

Change-Id: I2c8f5019fb237429e59717ef96bd4251a61dc1a5
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-05-27 10:04:29 -05:00
Johan Hedberg
7753e335f7 Bluetooth: Fix advertising parameters documentation
Change-Id: I67af3d5928ffa76cfe8c8f7a25ad65eb6493821f
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-05-27 14:44:15 +03:00
Johan Hedberg
9beb49f807 doc: Bluetooth: Add cross refrerence to Arduino BLE documentation
Change-Id: I90d25ccec7e9587e9a4ca85ffdd9b1690886109f
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-05-27 14:44:15 +03:00
Johan Hedberg
6c4b7b1250 doc: Add initial documentation for network buffers
Change-Id: I6c533eab555d73ce337681bb34839c706d969613
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-05-27 14:44:15 +03:00
Sergio Rodriguez
3ac7823ba9 benchmark: Changing dummy IRQ due conflict with APIC timer IRQ
The Quark D2000 uses the IRQ 10 for the APIC timer interrupt, this
cause a conflict with the "random" IRQ for the footprint benchmark

Change-Id: Iead18821af307832d54b0c9f3db5e52413ba670b
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-05-27 11:26:17 +00:00
Szymon Janc
f23582fe71 tinycrypt: Fix discrepancy of ecc_make_key definition and declaration
ecc_make_key declaration has random size of NUM_ECC_DIGITS * 2 but
definition has (and use) only NUM_ECC_DIGITS.

Change-Id: I18f0d7992b21a2ed7ed99851b1b795cff0a08a10
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-05-27 11:19:00 +00:00
Ravi kumar Veeramally
6a9817a091 net: apps: Add DHCP client sample application
Change-Id: I9c3f317fb13bce56ee93d66d692618145087a6a9
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-05-27 11:09:31 +00:00
Ravi kumar Veeramally
0de956d53f net: dhcp: Add DHCP client support.
DHCP client support provided for IPv4 over ethernet.

Change-Id: Ia89bc4123842cf109813b80a90b70cf50cc52e0a
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-05-27 11:09:30 +00:00
Ravi kumar Veeramally
2c6de48374 net: apps: Provide pcap support for echo apps
Provide pcap support for echo-apps with PCAP=<filename> option.

For pcap support:
make server NET_IFACE=qemu PCAP=sample.pcap.

without pcap support:
make server NET_IFACE=qemu

Change-Id: Iad90064e0c32134f9c2fda7b28e2cbca1e4e931c
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-05-27 13:13:47 +03:00
Johan Hedberg
6714e88788 doc: arduino_101: Add link to BlueZ 5.40
Change-Id: I83e6a51e276cb68bbd02e6e184faf76b596f1449
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-05-27 07:31:44 +00:00
Jukka Rissanen
2dab1d7371 net: apps: Ignore multicast context get fails in echo-server
The echo-server should work just fine even if the multicast
context cannot be get. By default there are only two contexts
so the multicast would fail always anyway and the program
would not run properly.

Change-Id: Ia9737cbda4a933a208aae020f055f0b6062b4f47
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-05-27 06:15:22 +00:00
Jukka Rissanen
655eb4b75e net: ipv6: Allow user to select number of neighbors
Earlier default was 8, new default is 4.

Change-Id: I99c9d2aae465fd0feb968efa7417cd28bafd73b8
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-05-27 06:15:21 +00:00
Jukka Rissanen
798d3511c1 net: ip: Allow user to select number of TCP connections
Earlier default was 10, new default is 2.

Change-Id: I307a4abaad34223254fd32e1fd4357892a04a2d0
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-05-27 06:15:21 +00:00
Jukka Rissanen
a2004cc70f net: ip: Allow user to select number of UDP connections
Earlier default was 10, new default is 2.

Change-Id: I938449d840a244a13e9b9b954648577b76db00bc
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-05-27 06:15:21 +00:00
Jukka Rissanen
e56f701a04 net: ip: Allow user to select number of network contexts
The network context is similar concept as network socket.
Depending on application use, the number of contexts can be
now tweaked. Default value is now 2, it was 5 earlier. Using
the lower number saves 241 bytes of memory.

Change-Id: I6e2a9f053c8c63163af6d6175783233f67553ae9
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-05-27 06:15:21 +00:00
Jukka Rissanen
81671f793d net: 802.15.4: Removed the TX fiber and its stack
This saves little over 4kb of memory.

Change-Id: I4dc3812b11de2736e2bdc17042e47fcdf5cf5491
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-05-27 06:15:20 +00:00
Jukka Rissanen
026a6d170a net: 802.15.4: Always use nullmac driver
User cannot select CSMA mac driver any more in order to save some
memory.

Change-Id: I7805a1c2028f60bc8a428bd5b8f891d540a14b6d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-05-27 06:15:20 +00:00
Carles Cufi
f81801489a ext: Import Nordic MDK header files
Nordic Semiconductor's Microcontroller Development Kit
provides a set of low-level header files that describe
the different hardware registers and peripherals of
Nordic ICs.

Origin: Nordic MDK 8.5.0
URL: http://www.nordicsemi.com/eng/Products/Bluetooth-Smart-Bluetooth-low-energy/nRF52832
Maintained-by: External

JIRA: ZEP-377
Change-Id: Ia28fbaf7333a84ea7462fb7fd7a5d06661a6fce0
Signed-off-by: Glenn Ruben Bakke <glenn.ruben.bakke@nordicsemi.no>
Signed-off-by: Vinayak Kariappa Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
Signed-off-by: Håkon Alseth <haakon.alseth@nordicsemi.no>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-05-27 01:38:23 +00:00
Anas Nashif
37b1d1eb55 ext: include headers based on HAL being used
For CMSIS we now have HAS_CMSIS which needs to be added to the
SoC definition.
Instead of changing the main Makefile we now include a sub-Makefile
with all related header and library paths that are hosted in
ext/

Move redifintion of LIB_INCLUDE_DIR later to get variables defined
in Makefile.toolchain.*

Change-Id: I9f90f90247c2a66b4565427b89d4e1d4dd5c9622
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-27 01:38:23 +00:00
Carles Cufi
a3a8828af3 scripts: Add the ISA to the path of included libraries
for GCC ARM Embedded

When compiling and linking Zephyr with GCC ARM Embedded,
the path to the libraries to be linked needs to be provided
explicitely for the correct variant to be linked in.

JIRA: ZEP-377
Change-Id: I745aa45c7dde12f1cc5c8ea4380b904e086ed94d
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-05-27 01:38:22 +00:00
Carles Cufi
44351ef004 boards: Add support for the nRF52 DK board (PCA10040)
Add board support for the Nordic Semiconductor's
nRF52832 (nRF52 series) Development Kit.

JIRA: ZEP-377
Change-Id: I6d8f1f7ec1b8a068193f6ba67c8a1ab9f399f80b
Signed-off-by: Glenn Ruben Bakke <glenn.ruben.bakke@nordicsemi.no>
Signed-off-by: Vinayak Kariappa Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
Signed-off-by: Håkon Alseth <haakon.alseth@nordicsemi.no>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-05-27 01:38:22 +00:00
Carles Cufi
7923617c8f drivers: Add basic GPIO and UART support for nRF52
Add basic support for the Nordic Semiconductor's
nRF52832 (nRF52 series) GPIO and UART.

JIRA: ZEP-377
Change-Id: Ie3613956bae57829e26cb1cc20d3f740b5371f65
Signed-off-by: Glenn Ruben Bakke <glenn.ruben.bakke@nordicsemi.no>
Signed-off-by: Vinayak Kariappa Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
Signed-off-by: Håkon Alseth <haakon.alseth@nordicsemi.no>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-05-27 01:38:21 +00:00
Carles Cufi
893fbd5460 arm: Add support for Nordic Semiconductor's nRF52 series of ICs
Add SoC support for the Nordic Semiconductor nRF52 series.

JIRA: ZEP-377
Change-Id: Idb476f43d7ca35f87c73910dd9bd1c50032ccdbe
Signed-off-by: Glenn Ruben Bakke <glenn.ruben.bakke@nordicsemi.no>
Signed-off-by: Vinayak Kariappa Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
Signed-off-by: Håkon Alseth <haakon.alseth@nordicsemi.no>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-05-27 01:38:20 +00:00
Baohong Liu
0ccc831452 drivers: PWM QMSI dev name fix
Change the dev name from PWM to PWM_0. This will make it
consistent with other drivers and also fix the device binding
failure in the PWM sample app.

Jira: ZEP-395

Change-Id: I90b945a7e57700d384eaa52e5300c881a3251d83
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-05-26 22:35:33 +00:00
Sergio Rodriguez
c2a0a59481 spi: Use locking mechanism to guard critical regions.
This will allow the driver to be fiber and task safe

Change-Id: I916d4ad67ab6f51f41f3d1136c105e4d1445de48
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-05-26 21:41:00 +00:00
Sergio Rodriguez
bf45b0bd87 i2c: Use locking mechanism to guard critical regions.
This will allow the driver to be safe from fibers and task

Change-Id: I6c4c4fc387cf334f0287b8a02982be1941a311fd
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-05-26 21:40:21 +00:00
Johan Hedberg
ab9cdd93ce MAINTAINERS: Add section for Bluetooth
Change-Id: Id79e0515eb8fcde77315acb51cf98465f30806a5
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-05-26 21:35:42 +00:00
Andrew Boie
81f61bb1be x86: make GDT setup optional
For some security scenarios the GDT may already be setup and locked,
in which case the kernel trying to set it again could lead to problems.

Change-Id: I727c1d213479f46a4bb6f0c04a9096131e10b3e7
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-05-26 19:32:03 +00:00
Chuck Jordan
d11ed0b13e spi: can use a tx threshold of 50%
The TX fifo threshold is pretty arbitrary.
Set this too big and too many interrupts will occur
for no good reason. Set it too small, and latency
in the SPI transactions is introduced. User's will probably
have to tune this per their application and SPI frequency, etc.
I think setting this to 50% is a good guess for now.

Change-Id: Ib325d40bc7ee10473d99443b3b3cd00fd6e4b95f
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-05-26 17:34:32 +00:00
Javier B Perez
fe5aa9f6ae test: bluetooth: disable test for STM32F103RB not enough RAM
Disabled bluetooth test for STM32F103RB SOC because there is not
enough RAM space for the test.

Change-Id: I9f097d9201ed659c4970b67f42c570331b92bad8
Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
2016-05-26 11:14:38 -05:00
Anas Nashif
a98232af51 add MAINTAINERS file
Enable warning about updating the MAINTAINERS file when new
files are being added.

Change-Id: I3b13ca25cd01e3254fd4b9e169546a395ebfcacd
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-26 15:19:28 +00:00
Anas Nashif
6361be24bc scripts: add a script to report RAM/ROM usage
Still WIP. Give statistics on memory/flash usage.

Run:
 make BOARD=<board> ram_report
 or
 make BOARD=<board> rom_report

Change-Id: I6b0aee09b89275e12f1cde863d2c0f5b8dfd0409
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-26 15:19:15 +00:00
Sebastien Griffoul
8237d0f882 eth: Fix spurious interrupt issues
The ethernet driver generates a lot of spurious interrupts.
These spurious interrupts have two sources:

1) The Mac Management Counter (MMC) module generates a lot of interrupts
   (GMI - bit 27 of the status register). Unfortunately the Interrupt
   enable register doesn't allow us to enable/disable it (bit 27 is
   reserved). Therefore the only way to mask this interrupt is to mask
   all the MMC interrupts (register REG_MMC_RX_INTR_MASK,
   REG_MMC_TX_INTR_MASK and REG_MMC_RX_IPC_INTR_MASK). By default
   these interrupts are not masked.

2) The RX interrupt is not correctly acknowledged. According to the
   datasheet, NIS is a sticky bit and must be cleared (by writing 1
   to this bit) each time a corresponding bit, which causes NIS to
   be set, is cleared.

Change-Id: I2033973849d87cddc328c65d0d4ad36b5a0c934e
Signed-off-by: Sebastien Griffoul <sebastien.griffoul@intel.com>
2016-05-26 15:12:25 +00:00
Szymon Janc
0595c47e17 console: shell: Add support for commands completion
This adds simple tab completion for shell use convenience.

Change-Id: If90ded32fb5044741232933d2cb0ce626227d025
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-05-26 13:06:59 +00:00
Sebastien Griffoul
fb8d7625d1 net: ipv6: Fix net_set_mac function
The ethernet driver calls net_set_mac before net_init is
called (ie before the uip stack has been fully initialized).
Unfortunately net_set_mac calls the function uip_ds6_set_lladdr.
Therefore this function is called before uip_ds6_init: this is an
issue as uip_ds6_set_lladdr is setting some static data which are
going to be erased by uip_ds6_init. In some case it could even lead
to a system hang due to a timer set twice.

To fix this issue net_set_mac should check whether net_init has been
already called. If not net_set_mac should simply copies the mac
address into uip_lladdr. Indeed uip_ds6_init automatically calls
uip_ds6_set_lladdr for the address stored into uip_lladdr.

Change-Id: Ifbcb07e7cd493b6284a85d70f2439d434cebbb00
Signed-off-by: Sebastien Griffoul <sebastien.griffoul@intel.com>
2016-05-26 12:24:43 +00:00
Sebastien Griffoul
57cd9939d6 net: ipv6: Fix lladdr state set to a wrong value
The line below is wrong and useless:
	lladdr->state = ADDR_AUTOCONF;

Indeed the three possible values for the state attribute are:
ADDR_TENTATIVE, ADDR_PREFERRED or ADDR_DEPRECATED. ADDR_AUTOCONF
is one possible value for the type attribute.

Moreover uip_ds6_set_lladdr already set the type attribute to
ADDR_AUTOCONF (this done through the call to the function
uip_ds6_addr_add).

Therefore this issue has been simply fixed by removing the line.

Change-Id: I432b7bb6a6a858264bb634f2e4d253f55acbbd5b
Signed-off-by: Sebastien Griffoul <sebastien.griffoul@intel.com>
2016-05-26 12:24:12 +00:00
Szymon Janc
d7e8fd0446 console: Add support for commands completion
This allows to register callback that will be called to
perform command completion.

Change-Id: Ide7a0427d9b8bb4dd8cfc0995ef2567b32e89632
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-05-26 12:02:51 +00:00
Johan Hedberg
645f4f93ea doc: arduino_101: Add section about Bluetooth HCI tracing
Change-Id: I91db4a1700d18511892498e2f914409b8b42e200
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-05-26 11:11:28 +00:00
Jithu Joseph
a409b3db7a doc : Corrections to memory_map doc page
Few lines in the doc were out of sync with the code base.

Jira: ZEP-312
Change-Id: Ic0d3508f0f903e43000e17b4a32c1280ae0978dc
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
2016-05-26 10:58:11 +00:00
Chuck Jordan
80f0de8604 arc: Uses of .nd on various branches not wanted
The .nd on a branch is WRONG if its an unconditional branch. Not needed.
On conditional branches its a compiler feature that is not yet functional
with ARC targets. Typical code for this compiler can use .d to put
something in the delay slot of an instruction, but using .nd is probably
never wanted.

Change-Id: If1017c468e6e7af269ea73daeb4bc223dcc0059f
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-05-26 10:45:53 +00:00
Ramesh Thomas
a4568aac44 arc: fixes a missing declaration compile error
Building microkernel for ARC causes a compiler error
due to missing declaration of _sys_idle_elapsed_ticks.
Declare this as extern.

Jira: ZEP-397
Change-Id: I83701f693fea0fcb1ae2c30e0c52abe7987de1f1
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-05-26 02:15:06 +00:00
Anas Nashif
de8bc78a5e arc: support microkernel on ARC
Microkernel on ARC works fine, was missing some declarations in the
linker file.
Also enable testing of microkernel with ARC and disable tests where
ARC is not supported yet.

Jira: ZEP-396
Change-Id: I2ac7b8dc0bea22f5d2e24832d9e3afad8df9f580
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-25 22:14:18 -04:00
Baohong Liu
14d3d37843 samples: I2c FRAM app bug fix
I2C_MSG_RESTART is not used in QMSI driver. What is really needed
here is I2C_MSG_STOP; Missing this flag is causing the issue.

JIRA: ZEP-398
Change-Id: I8fbfe15890c886ede4cce3d2cc68f53758a41e75
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-05-26 01:36:52 +00:00
Chuck Jordan
528b04f520 gpio: more TAB cleanup in Kconfig.dw
I notice there are some more places in this file
that can be switched to using tabs.

Change-Id: I7dac2b91f932aa6f167b7eaf93e7c8f571a22d41
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-05-25 18:11:03 -07:00
Jeremie GARCIA
9891d1e12b net: apps: zperf - add TCP client
Change-Id: I292e03c28169ca05f6b982a36be2ed618f8455bb
Signed-off-by: Jeremie GARCIA <jeremie.garcia@intel.com>
2016-05-26 00:47:01 +00:00
Chuck Jordan
c1e4bcf996 gpio: For ARC EM Starterkit, a 4-port GPIO implementation is being added
The file gpio_dw_registers.h already had the 4-port GPIO
registers defined, yet the gpio_dw.c implementation didn't
support it properly. There are 4 ports here, not 2, and only
PORTA can support interrupts and debounce.

On the em_starterkit board, for example, PORTA
has 3 bits for buttons: A, L and R. The other 3 ports should not
be used with interrupts & debounce.

I've re-worked this file to derive the port number from the
base address given. The lower 6 bits are divided by 12 to
derive the port number. From this, the registers EXT_PORTA,
EXT_PORTB, EXT_PORTC or EXT_PORTD can be read.

Also, for those ports that don't support interrupts,
set irq_num to 0, and that code will be avoided. I've verified
that I can access GPIO now correctly on the EM Starterkit. The
em_starterkit board support will be submitted soon but I'm
staging in this change first.

Change-Id: I98dbe083e03e046b40e07b4b14a99a39a6d0f0be
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-05-26 00:10:42 +00:00
Kumar Gala
9ec2f3be80 Cleanup whitespace in Kconfig files
Convert leading whitespace into tabs in Kconfig files.  Also replaced
double spaces between config and <prompt>.

Change-Id: I341c718ecf4143529b477c239bbde88e18f37062
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-05-25 13:28:07 -05:00
Andrei Emeltchenko
171dab4f22 drivers/nble: Defer GATT long write errors to execute response
Defer Prepare write errors to be sent in Execute write response
Per Bluetooth Spec. The Attribute Value validation is done when an
Execute Write Request is received. Hence, any Invalid Offset or
Invalid Attribute Value Length errors are generated when an
Execute Write Request is received. Fixes test case
TC_GAW_SR_BI_33_C (run with shell).

Fixes: ZEP-218

Change-Id: I3dc4583f519e0da2e1f741c9b532d6a6c1970225
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-05-25 16:44:55 +00:00
Mariusz Skamra
edc4f30beb Bluetooth: tester: Add support for indications in tester application
This adds support for indications in tester application.

1/3   GATT   TC_GAN_SR_BV_01_C   PASS
2/3   GATT   TC_GAI_SR_BV_01_C   PASS
3/3   GATT   TC_GAT_SR_BV_01_C   PASS

Closes ZEP-403.

Change-Id: I3da8746641429388d38c2593344105f33fb43ee8
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-05-25 15:19:30 +00:00
Mariusz Skamra
076df0ce73 drivers/nble: Fix GATT Server Indications
This fixes GATT Server indications.
conn handle shall be set to the valid handle, not 0xffff.
If conn passed to bt_gatt_indicate is NULL, indication will be sent
to every client subscribed.

Fix related to ZEP-403

Change-Id: Ie36b957fddfbc5485318bba649d15349e9293868
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-05-25 14:40:04 +00:00