The commit c90e4d063be0ff5f47df45ca8500eff8518c5d25 changed
line 216 in drivers/gpio/gpio_stm32.c:
-elif CONFIG_SOC_SERIES_STM32F4X
+#elif /* CONFIG_SOC_SERIES_STM32F4X */
This causes the following compiler error:
zephyr/drivers/gpio/gpio_stm32.c:218:39: error: #elif with no expression
#elif /* CONFIG_SOC_SERIES_STM32F4X */
^
Change-Id: Ie8b124931e333aa7860e6db22f5c259670e29833
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Now that we have a more generic mcux serial driver, remove the uart_k20
driver.
Jira: ZEP-719
Change-Id: I51a3237454140feabbfe18ac2c8ee451e572c7be
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Stop using the specific uart_k20 driver by default and start using the
more generic mcux uart driver instead.
Jira: ZEP-719
Change-Id: I7b107ea7118887591362159283ebb5413b45595a
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Adds a shim layer around the mcux uart driver to adapt it to the Zephyr
serial interface. Unlike the existing (and confusingly-named) uart_k20
driver, this driver can be used for k64 and other Kinetis SoCs.
Implements polling and interrupt-driven serial interface functions that
are logically equivalent to the uart_k20 driver. Adds an extra instance,
irq_tx_empty(), and err_check() that aren't implemented in the uart_k20
driver.
Jira: ZEP-719
Change-Id: Iab99542e7ec921ef4f361437768113fee01e5fe8
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This follows the board.rst template in the RFC
for board documentation:
https://gerrit.zephyrproject.org/r/#/c/9703/
This RST file was validated visually by rendering
using the online tool: http://rst.ninjs.org/
JIRA: ZEP-1541
Change-Id: Ibe6e1c7f8eb3c7862b4087a78b469693927280a2
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
Implementation includes adding some defines in the pinmux,
adjusting gpio driver to specific defines for STM32F3X family,
adding specific functionality in the F3X SoC definition.
Change-Id: I465c66eb93e7afb43166c4585c852e284b0d6e67
Signed-off-by: Adam Podogrocki <adam.podogrocki@rndity.com>
_NvicSwInterruptTrigger is only utilized by a testcase for irq handling
on ARM-V7M. Just put the code into the testcase so we dont need to
support an additional interface.
Change-Id: I763c63c32a7a52918250458351d08b8fa54069dd
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
SOC_FLASH_NRF5 is compatible with any nrf5 device, so enable the driver
by default if CONFIG_FLASH is also enabled.
Change-Id: I6ddf7cc41bb28071f682e78661b184a8e2ee7aa9
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
It is called before early SoC initialization, so remove the duplicated
code from other boards and just set it by default when using XIP.
This can later be used when adding bootloader support, as an
additional option could be created to move the VTOR offset to a
different address.
Change-Id: Ia1f5d9a066de61858ee287215cefdd58596b6b1c
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
The k20_sim.h used by the PWM driver has some defines that also exist in
the MCUX HAL. Lets pickup the values from the HAL and drop the one's
that are in k20_sim.h. Also, they aren't used by anything at this
point.
Change-Id: Iaed4e8e5cec7d57a5ce9e89480cecfb7dc90a5e6
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Previous MAINTAINERS patch using F: *.rst didn't work
so trying adding */*.rst */*/*.rst , etc. to see if
that works.
Change-Id: I0555b3ad2a2bf24cf0b9351860d7a85f6cc7627a
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Update line numbers for included example code to reflect changes in the
source files.
Change-Id: Iceeed0a8b6df91746cf58d23fe09a03713a07d98
Signed-off-by: Bogdan Davidoaia <bogdan.davidoaia@linaro.org>
Some new tests were added that had the Apache 2.0 boilerplate licensing
instead of the SPDX licensing tag.
Change-Id: I4bde8c9c6e7a6d44bceeffb6bbcff9f62d417648
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The headings on some .rst files were not following the expected
heading order of using # for h1, * for h2, = for h3, and - for h4
This patch fixes that, and the doc/templates/*.tmpl files created
for folks to use as templates for creating board and sample docs.
Change-Id: I0263b005648558d5ea41a681ceaa4798c9594dd9
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
FXOS8700_THREAD_PRIORITY and FXOS8700_THREAD_STACK_SIZE need to also
depend on FXOS8700_TRIGGER, else they will not show in the fxos8700
menu entry when running "make menuconfig".
Change-Id: I8f59125157f046592f3c92dcf2a92bd0e407cd6a
Signed-off-by: Bogdan Davidoaia <bogdan.davidoaia@linaro.org>
Printing values as <integer_part>.<fractional_part> gives undesired
results for negative numbers, so print the values converted to floating
point to avoid this.
Change-Id: I871b8461f2d643a2adce67df064e9f5e6d506319
Signed-off-by: Bogdan Davidoaia <bogdan.davidoaia@linaro.org>
Main changes:
- TCP fixes
- ZoAP server sample application
- Fixes to issues reported by Coverity
----------------------------------------------------------------
Anas Nashif (1):
net: in newlib, ESHUTDOWN is considered an extension
Andrei Emeltchenko (1):
wpan_serial: Fix possible NULL pointer dereference
Andy Ross (2):
net: tcp: Pass correct user_data pointers
net: tcp: Destroy net_tcp struct at the same time as the context
Flavio Santes (3):
samples/net: Remove redundant configuration variable
drivers/ethernet: Update default GPIO pin for the ENC28J60 module
samples/net: Remove legacy configuation variables
Jukka Rissanen (11):
net: Fix possible null pointer dereference in nbuf
net: icmpv6: Removing dead code
net: tcp: Allocate space for TCP header
net: ipv6: Check neighbor pointer in NS reply timeout
net: ipv6: Fix IPv6 prefix comparision
net: nbuf: Check possible null pointer access
net: buf: Use TCP sent_list variable only if needed
net: nbuf: Fix debug prints in memory pool init and unref
net: context: Add status to connect callback
net: echo-server: Use net_buf_frag_del() return parameter
net: echo-server: Discard 0 byte received packets
Leandro Pereira (7):
net: slip: Do not remove fragments when sending data
net: tcp: Ensure all timers are disposed of when releasing context
net: tcp: Use an uint8_t for retry timeout instead of an uin32_t
net: tcp: Remove unused `recv_ack` field from TCP context
net: tcp: Get rid of `recv_mss` field from TCP struct
net: tcp: Reduce size of `state` member from 32 to 4 bits
net: tcp: When retransmitting, hold an extra, temporary reference
Luiz Augusto von Dentz (2):
net: zoap-client: Add bluetooth support
net: zperf: Add bluetooth support
Michael Scott (13):
net: linkaddr: calculate linkaddr storage addr size via config
net: linkaddr: introduce net_linkaddr_set function
net: ipv6: fix NULL reference in handle_ra_neighbor
net: route: remove extra variable use in net_route_add()
net: tcp: remove unused semaphore tcp_lock
net: tcp: in tcp_establish save TCP flags for post-processing use
net: tcp: handle TCP_FIN after processing any data in the buffer
net: tcp: don't assume TCP_FIN buffers are NET_DROP
net: tcp: if buffer is TCP_FIN increment send_ack by 1
net: tcp: fix buffer leak in tcp_synack_received
net: net_context: correct description of recv_data_wait in net_context
net: tcp: move accept_cb from net_context to net_tcp
net: tcp: add timeout wait in net_context_connect
Ravi kumar Veeramally (6):
samples: net: Fix DHCPv4 config options and run on its own thread
net: 6lo: Handle destination address uncompression properly
net: 6lo: Fix dereferencing null pointer
net: dhcpv4: Remove dead code
net: samples: Add ENC28J60 pin numbers to documentation
net: samples: Print assigned address from DHCPv4 server
Tomasz Bursztyka (4):
net: shell: Use lighter printk() instead of printf()
samples: net: Fix a format issues in echo_client
samples: net: Enable buffer warning and errors in echo apps on qemu
net: tcp: Fix TCP states swap when accepted an incoming connection
Vinicius Costa Gomes (14):
samples/zoap_server: Add support for the '/separate' resource
samples/zoap_server: Add support for blockwise GET tests
iot/zoap: Add response code for Continue status
samples/zoap_server: Add resouce for TD_COAP_BLOCK_03
iot/zoap: Ignore non-request packets in zoap_handle_request
iot/zoap: Fix wrong byte-order when retrieving integer options
iot/zoap: Clarify the return value of zoap_register_observer()
iot/zoap: Add a helper to find an observer by address
samples/zoap_server: Fix responding messages with the wrong type
samples/zoap_server: Add support for messages with token
samples/zoap_server: Add Content-Format options to GET responses
samples/zoap_server: Include a path for the "created" resource
samples/zoap-server: Add support for the "location-query" resource
samples/zoap_server: Do not error if there's no payload or queries
drivers/ethernet/Kconfig.enc28j60 | 2 +-
drivers/slip/slip.c | 5 +-
include/net/buf.h | 2 +
include/net/net_context.h | 24 +-
include/net/net_ip.h | 21 +-
include/net/net_linkaddr.h | 55 ++-
include/net/zoap.h | 9 +
samples/net/dhcpv4_client/prj_arduino_101.conf | 2 -
samples/net/dhcpv4_client/prj_frdm_k64f.conf | 12 +-
samples/net/dhcpv4_client/prj_qemu_x86.conf | 29 +-
samples/net/dhcpv4_client/src/Makefile | 1 +
samples/net/dhcpv4_client/src/main.c | 52 ++-
samples/net/dns_client/README.rst | 22 +-
samples/net/dns_client/prj_arduino_101.conf | 5 -
samples/net/echo_client/prj_arduino_101.conf | 4 +-
samples/net/echo_client/prj_qemu_x86.conf | 3 +
samples/net/echo_client/src/echo-client.c | 2 +-
samples/net/echo_server/prj_arduino_101.conf | 4 +-
samples/net/echo_server/prj_qemu_x86.conf | 3 +
samples/net/echo_server/src/echo-server.c | 16 +-
.../net/mbedtls_dtlsclient/prj_arduino_101.conf | 2 -
samples/net/wpan_serial/src/main.c | 6 +-
samples/net/zoap_client/Makefile | 7 +-
samples/net/zoap_client/prj_bt.conf | 21 +
samples/net/zoap_client/src/Makefile | 5 +
samples/net/zoap_client/src/zoap-client.c | 38 +-
samples/net/zoap_client/testcase.ini | 5 +
samples/net/zoap_server/src/zoap-server.c | 476 ++++++++++++++++++++-
samples/net/zperf/Makefile | 7 +-
samples/net/zperf/prj_bt.conf | 32 ++
samples/net/zperf/src/Makefile | 5 +
samples/net/zperf/src/zperf_shell.c | 12 +
subsys/net/ip/6lo.c | 16 +-
subsys/net/ip/Makefile | 1 +
subsys/net/ip/dhcpv4.c | 9 +-
subsys/net/ip/icmpv6.c | 4 -
subsys/net/ip/ipv6.c | 26 +-
subsys/net/ip/nbr.c | 6 +-
subsys/net/ip/nbuf.c | 40 +-
subsys/net/ip/net_context.c | 126 +++---
subsys/net/ip/net_shell.c | 217 +++++-----
subsys/net/ip/route.c | 6 +-
subsys/net/ip/tcp.c | 140 +++---
subsys/net/ip/tcp.h | 67 ++-
subsys/net/lib/zoap/zoap.c | 86 +++-
tests/net/context/src/main.c | 3 +-
tests/net/ipv6/src/main.c | 66 +++
tests/net/rpl/src/main.c | 8 +-
48 files changed, 1278 insertions(+), 432 deletions(-)
create mode 100644 samples/net/zoap_client/prj_bt.conf
create mode 100644 samples/net/zperf/prj_bt.conf
Change-Id: Id27ce34fccfaf2b7d5f3112b9a8b47c60f695f3e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If we receive 0 byte packets from the network, we need to
ignore those as otherwise it is possible to leak network
buffers.
Change-Id: Id4b5b0d03c0b6d1e16634ff2d1960ea4728c8aa1
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Because net_buf_frag_del() returns the next fragment in the list,
we can use the return value which makes the code nicer looking.
Change-Id: Ic3d0155417b52a34bfbaa918570ff9af95aee468
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Return and clean buffer when fragment can not be allocated.
Coverity-CID: 157590
Change-Id: Ic8844609da4049623a6cf0c2ae037b2b777542e9
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
TCP states are swaped between "server" context and the new connection
context. But in any case the "server" context should loose the
information that makes it able to accept other new connections.
The swap was badly made, as the "server" context was loosing the
accept_cb (!) and the user data pointer. Instead the new connection
context was unrelevantly inheriting those.
Change-Id: Icc877449e1d4c4e59553dcbfd41718c5006edca0
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
It is useful that the user API can know whether the connection
was established properly or not. So this commit adds status
parameter to connect callback in net_context API.
The call to connect callback needs to be set properly in TCP
code. This commit does not fix the connect callback call which
is not properly done right now in net_context.c.
Change-Id: I284a60ddd658ceef9e65022e96591f467a936a09
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Print assigned address and other information if client receives
anything from server. E.g. subnet, lease time and router.
Change-Id: I759d59522930401766452eb1fb3d57d1a8295a67
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
ENC28J60 has numbers on the board. Documentation has information about
signals only. Wiring will be easy with pin numbers.
Change-Id: I0afd6058a9417b679ef6358304737bf256aa3522
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Wrong pool pointer was used when printing pool information during
the unref in nbuf.c. During nbuf init, wrong pool pointer was used
when printing memory pool sizes.
Change-Id: I9ed08cf7afa3c841c97ea981b97fff37aa40a984
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If the parameter "timeout" is set in net_context_connect(), the
assumption by the user is that the function would wait for SYNACK
to be received before returning to the caller.
Currently this is not the case. The timeout parameter is handed
off to net_l2_offload_ip_connect() if CONFIG_NET_L2_OFFLOAD_IP is
defined but never handled in a normal call.
To implement the timeout, let's use a semaphore to wait for
tcp_synack_received() to get a SYNACK before returning from
net_context_connect().
Change-Id: I7565550ed5545e6410b2d99c429367c1fb539970
Signed-off-by: Michael Scott <michael.scott@linaro.org>
net_context is used for more than just TCP contexts. However,
the accept_cb field is only used for TCP. Let's move it from
the generic net_context structure to the TCP specific net_tcp
structure.
Change-Id: If923c7aba1355cf5f91c07a7e7e469d385c7c365
Signed-off-by: Michael Scott <michael.scott@linaro.org>
The recv_data_wait field in struct net_context is described as a "Mutex"
when in fact it's a semaphore signal.
Change-Id: I3bef8d1a07ceb3da5894ae4cdc8f1fe3c61c5dbe
Signed-off-by: Michael Scott <michael.scott@linaro.org>
When SYNACK is received we dont hand off the netbuf to anything
which will call net_nbuf_unref, so let's not mark it NET_OK.
Instead let the code path fall through to mark it NET_DROP.
Change-Id: I1f883e1a13c53c930bf50c07ff701e3db6f02d8a
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Now that the TCP_FIN block is after a potential packet_received()
tcp->send_ack should be appropriately set to the last sequence
processed.
In the case of a TCP_FIN buffer, we should advance it by 1 or else
the destination will continue to retry to send the last block.
Change-Id: I9c97d35a87ad6cc1a50f928b237780bff4cd2877
Signed-off-by: Michael Scott <michael.scott@linaro.org>