Commit graph

41120 commits

Author SHA1 Message Date
Erwan Gouriou
90d81792b7 dts: provide dts for stm32 eval boards
Change-Id: If266feb9b6b22614e7456d6a5136035bd9498320
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-04-14 05:56:52 -05:00
Erwan Gouriou
b2f45a9e91 dts: add dts for nucleo boards
This commit provides dts file for nucleo boards.
For now dtsi files only populates uart nodes so other nodes
are not taken into account into board dts files.

Change-Id: Ide95a8ba3671b91ff0311b7671e77b3bf96db297
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-04-14 05:56:52 -05:00
Erwan Gouriou
d899ce16b0 dts: provide stm32 soc dtsi files for stm32 base boards
This commit provides dtsi files for available stm32 base boards.
For now only uart nodes and IRQ number are provided in order to
enable delivery of coherent material.

It also clears additional content from stm32f103xb.dtsi

Change-Id: I62d932c7f22b56e95bcd9566ce39e14a393dd640
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-14 05:56:52 -05:00
Kumar Gala
6422cabd87 dts: arm: Introduce st/mem.h for FLASH & SRAM sizes
As there can be a large number of FLASH & SRAM sizes for the same SoC
having a dts/dtsi for each one would be extremely painful.  Lets just
use some #defines to set that FLASH & SRAM sizes based on the SoC that
is being built.

Change-Id: I06388ada4e49ed3d576da31150288512bb6b4485
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-14 05:56:52 -05:00
Anas Nashif
0ac3a231f1 tests: rename ztests' assert > zassert
Change-Id: Ibccc5da75ad42bc035052e5946f977a49f6a7d2f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-14 00:07:06 -04:00
Piotr Mienkowski
a8de9ff438 drivers: i2c: rename IRQ SHARED/DIRECT Kconfig options
I2C_SHARED_IRQ, I2C_0_IRQ_SHARED, I2C_0_IRQ_DIRECT Kconfig options
are DW driver specific. Its presence is confusing for a user of any
other I2C driver than DW. This patch renames these options to include
DW string and makes it visible only for DW I2C driver. This is a
similar implementation to that used by ETH DW Ethernet driver.

Change-Id: I795506f9b103c028a22317df9ad632dce5cd1343
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2017-04-14 01:58:33 +00:00
Piotr Mienkowski
108111fd42 boards: sam_e70_xplained: set GPNVM1 bit when flashing
By default a factory new SAM E70 chip will boot SAM-BA boot loader located in
the ROM, not the flashed image. This is determined by the value of GPNVM1
(General-Purpose NVM bit 1). Updated flash procedure will ensure that GPNVM1
is set to 1 changing the default behavior to boot from Flash.

Change-Id: Ic6334c9d4743a7665fc944e8f49fc1467ecda40d
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2017-04-14 01:57:52 +00:00
Andy Gross
4f7c0efce7 dts: kinetis: bluetooth: Make UART port conditional
This patch modifies the DTS file to make the inclusion of the
bluetooth UART port conditional on CONFIG_BLUETOOTH option.

Issue: ZEP-1745

Change-Id: Iea8dc60fe17d131d8e3765e1962b25d157065c67
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2017-04-14 01:53:26 +00:00
Vinayak Chettimada
9584456fc9 drivers: pwm: Add nRF5x GPIOTE based PWM driver
Add support for nRF5x series GPIOTE based PWM driver
implementation.

Provides upto 3 pins/channels using one HF timer, two PPI
channels per pin, and one GPIOTE config per pin.

Change-id: I6056b199ec2cff595ba8fea9f659a0338ed4635b
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
2017-04-14 01:53:07 +00:00
Luiz Augusto von Dentz
aa38f54e31 slist: Fix sys_slist_merge_slist clearing the wrong list
sys_slist_merge_slist shall reinit the appended list not the original.

Change-Id: Iacd5244d0243b7ebdb110991574e9e1d265ced14
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-04-14 01:52:28 +00:00
Carles Cufi
81c52a15d2 drivers: gpio: nrf5: Fix interrupt enable and disable
Correct the way interrupts are enabled and disabled using the INTENSET
and INTENCLR registers, which ignore all 0s written to them and are both
positive registers.

Change-Id: I052548b0255d9d5ae36b2a708ed1968ae3ab1d06
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-04-14 01:51:43 +00:00
Anas Nashif
d3af7f75c9 Merge "Merge net branch into master" 2017-04-14 01:43:34 +00:00
Yannis Damigos
7f30487866 boards/arm/olimexino_stm32: add openocd file
Add openocd.cfg to control flashing and debugging of the
olimexino-stm32 board

Change-Id: Ia40d964b737792864efd85076bc599b2de15ebb0
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2017-04-14 01:36:24 +00:00
David Brown
fe7aa3f4fa misc: Allow flash image size to be constrained
The CONFIG_FLASH_LOAD_OFFSET allows the zephyr image to be placed at
an offset from the start of flash.  This is useful for situations,
such as with a bootloader, to allow the image to not occupy the very
beginning of flash.

Complement this by adding a CONFIG_FLASH_LOAD_SIZE config, that can
constrain the size of the flash image.  With the default of zero, the
behavior is as before, with the image allowed to occupy the rest of
the flash.  It can also be defined to a non-zero value which will
constrain the image to occupy that many bytes of flash.

Although this is defined generally, it is currently only supported on
cortex-m targets.

Change-Id: I6e4a0e79c8459f931cd4757c932d20dac740f5f6
Signed-off-by: David Brown <david.brown@linaro.org>
2017-04-14 01:35:59 +00:00
David Brown
0c476a58b7 misc: Generalize LOAD_OFFSET support
Instead of FLASH_LOAD_OFFSET being something specific to cortex-m, add
it generally to misc/Kconfig, along with a hidden config
HAS_LOAD_OFFSET which can be selected by the architectures as they add
support for the functionality.

Change-Id: I256ff8cf4e9b8493b26354c3b93fe1f7017d4887
Signed-off-by: David Brown <david.brown@linaro.org>
2017-04-14 01:35:59 +00:00
Michael R Rosen
ce4f942011 flash: enable flash bank 1 for arc on quark se c1000
Change-Id: Ide95d7f21290b1effb759b1f2e7a014ce21ef1bf
Signed-off-by: Michael R Rosen <michael.r.rosen@intel.com>
2017-04-14 01:35:40 +00:00
Johan Hedberg
7705c46073 boards: bbc_microbit: Add defines for all edge connector pins
The schematics of the BBC micro:bit are hard to find, and its official
web-site doesn't document the mapping of the edge connector pins
numbers the nRF51 GPIO pin numbers. Provide helpful defines for this
in the board.h file.

Change-Id: I52ce1d61558703b6aa5a5d073ccd222f27fa8760
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-04-13 21:50:40 +00:00
Kumar Gala
c7bc909914 tests/ztest: rename assert macros to be zephyr specific
ztest has a number of assert style macros and used a baseline assert()
that varies from the system definition of assert() so lets rename
everything as zassert to be clear.

Change-Id: I7f176b3bae94d1045054d665be8b5bda947e5bb0
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-13 21:17:33 +00:00
Max Filippov
a0fa4f3265 xtensa: use -mlongcalls instead of --longcalls
gcc only understands -mlongcalls form of this option, xcc understands
both. Use -mlongcalls for building with both xcc and gcc.

Change-Id: I93f65ccbc97429ae564f1986120b37ce205ee38c
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2017-04-13 20:33:28 +00:00
Max Filippov
ac430f9595 xtensa: conditionally define endianness macros
__BYTE_ORDER__, __ORDER_BIG_ENDIAN__ and __ORDER_LITTLE_ENDIAN__ are not
defined when building with xcc, but are defined when building with gcc.
Define them conditionally.

Change-Id: Ib205ffee28360aa240d61731b7a3d6f45401b4c1
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2017-04-13 20:33:27 +00:00
Max Filippov
0ad868a58c xtensa_sim_console: fix simcall
simcall must be in the volatile asm so that gcc does not optimize it
out. It also needs "memory" clobber to make sure data passed through
memory buffer is actually written back before the simcall.

Change-Id: I410b7348bf605d0d08f81ec5395f6cb144f33a43
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2017-04-13 20:33:27 +00:00
Anas Nashif
ed3d7c1de5 build: make sure we are calling python3 in all scripts
Jira: ZEP-1759
Change-Id: I0fc7329f806ca0049c555d3402dd145e92e54028
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-13 20:22:54 +00:00
Andrew Boie
b53145c6bc ztest: apply extra stack size to ztest stack
The directive exists for platforms that require more stack space than
usual. However, it wasn't being applied to the ztest thread stack
which ztest-enabled cases are run on.

Fixes numerous failures on xtensa simulator targets.

Change-Id: Iafa84de002421f03729c0f0cdeefdea51842ae32
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-04-13 12:45:36 -07:00
Andrew Boie
a883722fb6 tests: test_pipe_api: increase stack size
A recent patch added some new tests here. Unfortunately,
the current stack size value of 512 was too small for Xtensa.
Increase it to 1024.

Change-Id: I16c52b74412cbd7665e774ce3baed260885ddb9b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-04-13 18:58:51 +00:00
Andrew Boie
d75fa6bc13 tests: sprintf: increase stack size
A recent patch pinned the stack size for this test at 1024
instead of the platform default. This value wasn't sufficient
on Xtensa. Set to 2048, which was the default on most platforms.

Change-Id: I9a9d5fd448d2377aaf782c2c093a16147f31886a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-04-13 18:58:24 +00:00
Mazen NEIFER
a6e0404983 xtensa port: Fixed crash on startup on CP enabled cores
The issue was that cpStack was changed to a memory buffer by commit
https://gerrit.zephyrproject.org/r/#/c/12816
However the assembly code was expecting it to be a pointer and thus
issuing an indirection, that leads to wrong addresses.

The fix removed this unnecessary indirection and thus the inherent
invalid memory access exception.

Issue: ZEP-1997
Change-Id: I843f049212f2d116a01b05367a284209f463a5e7
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
2017-04-13 11:54:49 -07:00
Andrew Boie
6e1ff792fc sanitycheck: remove hifi_mini from arch config
Change-Id: I24eca1d3f95a4941e5efe1bfbc4905c38d7cb253
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-04-13 11:54:49 -07:00
Andrew Boie
6311ede125 xtensa: remove hifi_mini sim target
The core build in the SDK does not have a timer, making it impossible
to use this core with most of the sanity checks. We are working on
getting a special package of cores for Zephyr which meet our build
requirments; until then, remove this core as it doesn't build.

Change-Id: I3fa201f3c6b5724501e8cb1e1b8ba631436ebc23
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-04-13 11:45:52 -07:00
Kumar Gala
46e4755d63 Revert "Revert "scripts: devicetree: Handle mixed case node names""
Yes, revert the revert, was a little too quick to apply this.  The fix
is to cleanup the dtsi file in question.

This reverts commit 6702686976.

Change-Id: I933fad9d96ec6375eda33f0b012349f1c39e261f
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-13 15:02:13 +00:00
Kumar Gala
1df7eba02c dts: arm: ti: Use hardcoded addresses in cc32xx_launchxl.dtsi
In general we should be using hardcoded addresses in the dtsi files
rather than getting ifdef from other places.  As the unit address of the
node is typically based on the address in hex w/o the '0x' we can't just
use #defines directly.

Change-Id: I0e17e001151728d16842806d9407e66e6e5129cf
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-13 15:01:57 +00:00
Jukka Rissanen
711da3a10f Merge net branch into master
Main changes:

- IPv6 fragmented packet support added.
- DNS client API removed.
- New network test case which enables all config options.
- More network management events for IPv6.
- IRC bot sample to support DNS resolver API.
- Network interface structure memory savings.
- crc16 implementation added.
- IEEE 802.15.4 TX power setting support added.
- Fixes for accessing unaligned network data.
- nbuf network buffer fixes.
- DNS resolver, IPv6, RPL and TCP fixes.
- Ethernet sam_gmac and mcux driver memory leak fixes.
- Network management API fixes.
- MQTT test cases added.

----------------------------------------------------------------
Andrei Emeltchenko (1):
      net: nbuf: Implement net_nbuf_append_le32 helper

Bogdan Davidoaia (2):
      net: use UNALIGNED_GET in net_addr_ntop
      net: use UNALIGNED_GET/PUT to access IP address

Jukka Rissanen (26):
      net: tcp: Store MSS in tcp header correctly
      net: dns: Invalid memory access
      tests: net: tcp: Fix NULL pointer dereference
      drivers/eth/mcux: Make sure not to leak net_buf in RX
      net: nbuf: Add function to split a data fragment
      net: ipv6: Support fragmented IPv6 packets
      net: ipv6: Add helper to get the last extension header
      net: shell: Add IPv6 fragmentation info printing
      net: rpl: Add checks for probing timer
      net: rpl: Fix the statistics collection
      net: ipv6: Allow user to tweak packet hop limit value
      net: dns: Set the address family and address length correctly
      net: dns: Add more debugging about configured servers
      net: dns: Fix the documentation errors in header file
      net: dns: Fix the compilation even if DNS is disabled
      net: route: Fix compilation error
      net: rpl: Fix compilation if CONFIG_NET_RPL_MOP3 is enabled
      net: rpl: Fix compilation if MRHOF is enabled
      net: shell: Fix printk format for multicast routes
      net: tests: Enables all net kconfig options in one test case
      net: ipv6: Fix the constness of function parameters
      net: mgmt: Add IPv6 DAD succeed/failed event
      samples: net: irc-bot: Use DNS resolve API
      net: dns: Remove dns_client API and sample application
      net: if: Repack net_if_addr struct to save space
      net: if: Reshuffle fields in net_if and related structs

Luiz Augusto von Dentz (3):
      net: buf: Print pool name if available
      net: ipv6: Fix not initializing delayed work
      net: ipv6: Rework net_ipv6_nbr_add

Patrik Flykt (2):
      crc16: Create function for computing CRC 16
      unit: Create ztest unit test for CRC16 functionality

Piotr Mienkowski (1):
      drivers: eth_sam_gmac: Make sure not to leak net_buf in RX

Tomasz Bursztyka (11):
      tests/net: MQTT tests should be under lib
      tests/net: arp_input() unref the buffer on success
      net: Make sure IP layer events have fully differentiated layer code
      net/ieee802154: aux sec header frame counter is in little endian
      net/nbuf: Add an attribute to store/get IEEE 802.15.4 RSSI on RX
      drivers/ieee802154/cc2520: Set the current rx frame RSSI into its nbuf
      net/ieee802154: Fixing a typo in net_mgmt settings accessor
      net/ieee802154: Expose TX power setting through net mgmt API
      net/ieee802154: Add a Kconfig option to set a default tx power
      net/ieee802154/samples: Add a Kconfig option to tweak the TX power
      net/ieee802154: Add ieee15_4 shell module functions to set/get tx power

Wu Jiequan (3):
      tests: net: Add mqtt testcases
      samples: net: http_server: Add bt test and arduino 101 support
      net: coaps_server: add prj_arduino_101.conf file

june li (1):
      net: tcp: Release buf after failing to send

 .known-issues/doc/networking.conf                  |   12 -
 doc/api/networking.rst                             |    6 +-
 doc/zephyr.doxyfile                                |    2 +-
 drivers/Makefile                                   |    1 +
 drivers/crc/Makefile                               |    1 +
 drivers/crc/crc16_sw.c                             |   35 +
 drivers/ethernet/eth_mcux.c                        |    4 +-
 drivers/ethernet/eth_sam_gmac.c                    |    4 +-
 drivers/ieee802154/ieee802154_cc2520.c             |    7 +-
 include/crc16.h                                    |   66 +
 include/net/dns_client.h                           |  107 --
 include/net/dns_resolve.h                          |   27 +-
 include/net/ieee802154.h                           |   15 +
 include/net/nbuf.h                                 |  159 ++
 include/net/net_event.h                            |   12 +-
 include/net/net_if.h                               |  148 +-
 include/net/net_ip.h                               |   70 +-
 samples/net/coaps_server/prj_arduino_101.conf      |   46 +
 samples/net/common/ieee802154_settings.c           |    5 +-
 samples/net/dns_client/sample_output_IPv4.txt      |   46 -
 samples/net/dns_client/sample_output_IPv6.txt      |   39 -
 samples/net/dns_client/src/Makefile                |    7 -
 samples/net/dns_client/src/config.h                |   38 -
 samples/net/dns_client/src/main.c                  |  198 ---
 samples/net/dns_client/testcase.ini                |    4 -
 samples/net/{dns_client => dns_resolve}/README.rst |  110 +-
 samples/net/http_server/prj_arduino_101.conf       |   45 +
 samples/net/http_server/prj_bt.conf                |   46 +
 samples/net/http_server/src/Makefile               |    5 +-
 samples/net/http_server/src/main.c                 |   27 +
 samples/net/http_server/testcase.ini               |    8 +-
 samples/net/irc_bot/prj_frdm_k64f.conf             |   22 +-
 samples/net/irc_bot/prj_qemu_x86.conf              |   20 +-
 samples/net/irc_bot/src/irc-bot.c                  |  365 +++--
 subsys/net/buf.c                                   |   15 +-
 subsys/net/ip/6lo.c                                |   31 +-
 subsys/net/ip/Kconfig.app                          |    7 +
 subsys/net/ip/Kconfig.ipv6                         |   32 +
 subsys/net/ip/Kconfig.rpl                          |    7 +
 subsys/net/ip/connection.c                         |   22 +-
 subsys/net/ip/ipv6.c                               | 1568 ++++++++++++++------
 subsys/net/ip/ipv6.h                               |   61 +
 subsys/net/ip/l2/ieee802154/Kconfig.radio          |    9 +-
 subsys/net/ip/l2/ieee802154/ieee802154.c           |    5 +
 subsys/net/ip/l2/ieee802154/ieee802154_frame.c     |    5 +-
 subsys/net/ip/l2/ieee802154/ieee802154_mgmt.c      |   19 +-
 subsys/net/ip/l2/ieee802154/ieee802154_shell.c     |   34 +
 subsys/net/ip/nbuf.c                               |   53 +
 subsys/net/ip/net_core.c                           |   13 +-
 subsys/net/ip/net_if.c                             |   48 +-
 subsys/net/ip/net_private.h                        |    5 +
 subsys/net/ip/net_shell.c                          |   42 +-
 subsys/net/ip/net_stats.c                          |    4 +-
 subsys/net/ip/route.c                              |    2 +-
 subsys/net/ip/rpl-mrhof.c                          |    4 +-
 subsys/net/ip/rpl.c                                |   41 +-
 subsys/net/ip/rpl.h                                |   24 +-
 subsys/net/ip/tcp.c                                |   14 +-
 subsys/net/ip/utils.c                              |   10 +-
 subsys/net/lib/dns/Makefile                        |    1 -
 subsys/net/lib/dns/README                          |   18 -
 subsys/net/lib/dns/dns_client.c                    |  362 -----
 subsys/net/lib/dns/resolve.c                       |   24 +-
 tests/net/all/Makefile                             |    4 +
 tests/net/all/prj.conf                             |  237 +++
 tests/net/all/src/Makefile                         |    2 +
 tests/net/all/src/main.c                           |   27 +
 tests/net/all/testcase.ini                         |    5 +
 tests/net/arp/src/main.c                           |    2 -
 tests/net/lib/mqtt_publisher/Makefile              |    8 +
 .../net/lib/mqtt_publisher}/prj_arduino_101.conf   |   48 +-
 .../net/lib/mqtt_publisher}/prj_frdm_k64f.conf     |   19 +-
 .../net/lib/mqtt_publisher}/prj_qemu_x86.conf      |   27 +-
 tests/net/lib/mqtt_publisher/src/Makefile          |    3 +
 tests/net/lib/mqtt_publisher/src/config.h          |   42 +
 tests/net/lib/mqtt_publisher/src/main.c            |   24 +
 .../net/lib/mqtt_publisher/src/test_mqtt_publish.c |  448 ++++++
 tests/net/lib/mqtt_publisher/testcase.ini          |    4 +
 .../net/lib/mqtt_subscriber}/Makefile              |    7 +-
 tests/net/lib/mqtt_subscriber/prj_arduino_101.conf |   52 +
 tests/net/lib/mqtt_subscriber/prj_frdm_k64f.conf   |   39 +
 tests/net/lib/mqtt_subscriber/prj_qemu_x86.conf    |   40 +
 tests/net/lib/mqtt_subscriber/src/Makefile         |    9 +
 tests/net/lib/mqtt_subscriber/src/config.h         |   42 +
 tests/net/lib/mqtt_subscriber/src/main.c           |   24 +
 .../lib/mqtt_subscriber/src/test_mqtt_subscribe.c  |  483 ++++++
 tests/net/lib/mqtt_subscriber/testcase.ini         |    4 +
 tests/net/nbuf/src/main.c                          |  100 ++
 tests/net/rpl/prj.conf                             |    2 +-
 tests/net/tcp/src/main.c                           |    2 +-
 tests/unit/drivers/crc/Makefile                    |    3 +
 tests/unit/drivers/crc/main.c                      |   26 +
 tests/unit/drivers/crc/testcase.ini                |    4 +
 93 files changed, 4197 insertions(+), 1727 deletions(-)
 create mode 100644 drivers/crc/Makefile
 create mode 100644 drivers/crc/crc16_sw.c
 create mode 100644 include/crc16.h
 delete mode 100644 include/net/dns_client.h
 create mode 100644 samples/net/coaps_server/prj_arduino_101.conf
 delete mode 100644 samples/net/dns_client/sample_output_IPv4.txt
 delete mode 100644 samples/net/dns_client/sample_output_IPv6.txt
 delete mode 100644 samples/net/dns_client/src/Makefile
 delete mode 100644 samples/net/dns_client/src/config.h
 delete mode 100644 samples/net/dns_client/src/main.c
 delete mode 100644 samples/net/dns_client/testcase.ini
 rename samples/net/{dns_client => dns_resolve}/README.rst (55%)
 create mode 100644 samples/net/http_server/prj_arduino_101.conf
 create mode 100644 samples/net/http_server/prj_bt.conf
 delete mode 100644 subsys/net/lib/dns/README
 delete mode 100644 subsys/net/lib/dns/dns_client.c
 create mode 100644 tests/net/all/Makefile
 create mode 100644 tests/net/all/prj.conf
 create mode 100644 tests/net/all/src/Makefile
 create mode 100644 tests/net/all/src/main.c
 create mode 100644 tests/net/all/testcase.ini
 create mode 100644 tests/net/lib/mqtt_publisher/Makefile
 rename {samples/net/dns_client => tests/net/lib/mqtt_publisher}/prj_arduino_101.conf (72%)
 rename {samples/net/dns_client => tests/net/lib/mqtt_publisher}/prj_frdm_k64f.conf (75%)
 rename {samples/net/dns_client => tests/net/lib/mqtt_publisher}/prj_qemu_x86.conf (68%)
 create mode 100644 tests/net/lib/mqtt_publisher/src/Makefile
 create mode 100644 tests/net/lib/mqtt_publisher/src/config.h
 create mode 100644 tests/net/lib/mqtt_publisher/src/main.c
 create mode 100644 tests/net/lib/mqtt_publisher/src/test_mqtt_publish.c
 create mode 100644 tests/net/lib/mqtt_publisher/testcase.ini
 rename {samples/net/dns_client => tests/net/lib/mqtt_subscriber}/Makefile (60%)
 create mode 100644 tests/net/lib/mqtt_subscriber/prj_arduino_101.conf
 create mode 100644 tests/net/lib/mqtt_subscriber/prj_frdm_k64f.conf
 create mode 100644 tests/net/lib/mqtt_subscriber/prj_qemu_x86.conf
 create mode 100644 tests/net/lib/mqtt_subscriber/src/Makefile
 create mode 100644 tests/net/lib/mqtt_subscriber/src/config.h
 create mode 100644 tests/net/lib/mqtt_subscriber/src/main.c
 create mode 100644 tests/net/lib/mqtt_subscriber/src/test_mqtt_subscribe.c
 create mode 100644 tests/net/lib/mqtt_subscriber/testcase.ini
 create mode 100644 tests/unit/drivers/crc/Makefile
 create mode 100644 tests/unit/drivers/crc/main.c
 create mode 100644 tests/unit/drivers/crc/testcase.ini

Change-Id: I90549f6ba36041741b257be0d63e8bad8ad802b8
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-04-13 15:49:22 +03:00
Andrew Boie
6922a22c28 xtensa: add simulator targets for more SOCs
Change-Id: Ibceaf01ed71783c597b030bcc5778da6a03e5699
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-04-13 12:42:07 +00:00
Andrew Boie
d73641c50b xt-sim: remove extraneous C file
Change-Id: I8f2ac2e743e57e6a591b2f995fbef97ecfebf46e
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-04-13 12:42:06 +00:00
Andrew Boie
11ee791b32 xtensa: build similar to other Zephyr arches
* CONFIG_SOC is now properly set and we do not need a separate
  XTENSA_CORE build variable

* Some unnecessary macro -D CFLAGS in the Xtensa Makefile removed

* There is no default SOC selection, it is now done explicitly in
  the board's defconfig

* CONFIG_<board name> now renamed to CONFIG_SOC_<board name in
  uppercase> to conform to established style.

Issue: ZEP-1711
Change-Id: I88997530db09970b7fdd1c3e3d355bfca9d0be1a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-04-13 12:42:06 +00:00
Bogdan Davidoaia
290e1d8451 net: use UNALIGNED_GET/PUT to access IP address
Use UNALIGNED_GET and UNALIGNED_PUT throughout the networking stack to
access fields from the IP address structure. These structures can be
mapped directly to buffers and the macros are required for correct
unaligned memory access.

Jira: ZEP-2012

Change-Id: I55f9da7b143a22fa869d5d215c661de988cd9b91
Signed-off-by: Bogdan Davidoaia <bogdan.davidoaia@linaro.org>
2017-04-13 15:21:46 +03:00
Andrei Emeltchenko
01a9e4001d net: nbuf: Implement net_nbuf_append_le32 helper
net_nbuf_append_le32 helper appends le32 data to the packet, this is
needed in some Thread headers using LE data.

Change-Id: I04233ca064c2e23ec5c53979ac234adfe0ccb9dd
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2017-04-13 15:21:46 +03:00
Tomasz Bursztyka
987df43ba5 net/ieee802154: Add ieee15_4 shell module functions to set/get tx power
Change-Id: I1245686118daa1c81691694b4b4c1512847beca0
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-04-13 15:21:46 +03:00
Tomasz Bursztyka
3a3636ff7f net/ieee802154/samples: Add a Kconfig option to tweak the TX power
This can be useful to override the default value, for testing.

Change-Id: I23b559152c71955ff5aa6fd3643f1f40f5594194
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-04-13 15:21:46 +03:00
Tomasz Bursztyka
26b5f94a79 net/ieee802154: Add a Kconfig option to set a default tx power
Change-Id: Ife2af22c13954286d8e44c3e0b1f60962c617c52
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-04-13 15:21:46 +03:00
Tomasz Bursztyka
951294f15e net/ieee802154: Expose TX power setting through net mgmt API
This permits to tweak the TX power in dbm.

Change-Id: Idadff397941a39010ce3c374d9ca74b777934626
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-04-13 15:21:46 +03:00
Tomasz Bursztyka
63619b503f net/ieee802154: Fixing a typo in net_mgmt settings accessor
s/SET/GET obviously

Change-Id: Ibaad65f846fef8b1b7839616b2022fad6548612a
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-04-13 15:21:45 +03:00
Tomasz Bursztyka
feaa1e1371 drivers/ieee802154/cc2520: Set the current rx frame RSSI into its nbuf
Change-Id: I215a8ceaa066a8521a2f647746301dbec780b43f
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-04-13 15:21:45 +03:00
Tomasz Bursztyka
192435ae2b net/nbuf: Add an attribute to store/get IEEE 802.15.4 RSSI on RX
This way, the driver will be able to pass the RSSI of the frame it just
received.

Change-Id: I08e7565e35b4fb087cf348bce01722ab25d59f0f
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-04-13 15:21:45 +03:00
Jukka Rissanen
f8c9439908 net: if: Reshuffle fields in net_if and related structs
This does not save any space but sets the fields in the
structs in more natural order. Move IPv6 related
fields in net_if into internal ipv6 struct so that all
IPv6 fields are located inside one struct. Same thing
is done for IPv4 fields which are now located inside
IPv4 internal struct in net_if.

There is no functionality changes by this commit.

Change-Id: I7d72ec0a28e2b88c79a4c294655d5ef6da6ccb25
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-04-13 15:21:45 +03:00
Jukka Rissanen
8b8371f573 net: if: Repack net_if_addr struct to save space
Shuffle the fields to different order in net_if_addr struct.
This saves space in net_if struct. This saved 4.8% memory,
640 bytes in original versus 608 bytes after this commit, when
allocating net_if using minimal amount of address counts and
IPv4, DHCPv4 and IPv6 enabled.

Change-Id: I591543cded587178cf6f82189953bb2e99c2188a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-04-13 15:21:45 +03:00
Tomasz Bursztyka
62b710384d net/ieee802154: aux sec header frame counter is in little endian
So manipulating it requires to be ready to swap it if the CPU is BE.

Change-Id: I8d657c31cecfc9f3fcd010efbb6d090bf021f5f5
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-04-13 15:21:45 +03:00
Jukka Rissanen
611ccaaf88 net: dns: Remove dns_client API and sample application
DNS resolving is better done with DNS resolve API so remove
the DNS client API which is quite hard to use.

Change-Id: Ide4973a5be674414ea6e04a35c938195cce40b6a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-04-13 15:21:45 +03:00
Jukka Rissanen
abb24bb46b samples: net: irc-bot: Use DNS resolve API
Modify the code to use DNS resolve API instead of DNS client API
as the latter is being phased out.

Change-Id: I6a7618d770621fee1f502d2bc277a162c589108a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-04-13 15:21:45 +03:00
Jukka Rissanen
57e128654b net: mgmt: Add IPv6 DAD succeed/failed event
We need a way to know when IPv6 address is successfully set
into network interface.

If IPv6 DAD (Duplicate Address Detection) succeeds or fails,
we send a management event for that. This can be used by
other components to detect when the network interface is in
usable state.

Change-Id: Ifb22415fe21f31f5dba4f55455d6e0f89b414d32
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-04-13 15:21:45 +03:00
Jukka Rissanen
528a393470 net: ipv6: Fix the constness of function parameters
Some of the IPv6 utility functions were missing const in
one of the parameters that are not modified by the corresponding
function.

Change-Id: Ic9fe53daac288570c14423fd9410dcf15d1c5cfa
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-04-13 15:21:44 +03:00