When asserts are enabled we run into an issue with newlib and types of
printf style formatters not matching. The easy fix to this is to cast
the uint32_t to u32_t to make things consistent with or without newlib
enabled.
This fixes#5645
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Re-order the execution of the arch/ and subsys/ CMakeLists.txt code to
work around a manifestation of issue #6505. When OpenThread created an
External project in subsys, it did not have access to important
toolchain flags added in arch/.
Intuitively, subsystems might depends on how the ARCH is configured,
but the ARCH shouldn't depend on any subsystem.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Instead of hard-coding the path use find_program(), since that allows
CMake to sort out platform-specific details such as .exe extensions on
Windows.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The function returns an enum, not a u8_t, so we should cast
appropriately to avoid an implicit conversion.
This construct was triggering this compilation error when compiling
with CXX:
/home/sebo/zephyr/include/bluetooth/buf.h:85:9: error: invalid
conversion from ‘u8_t {aka unsigned char}’ to ‘bt_buf_type’
[-fpermissive] return *(u8_t *)net_buf_user_data(buf);
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Compiling this declaration with a CXX compiler triggers the compiler
error:
/home/sebo/zephyr/include/bluetooth/gatt.h:898:10: error: ‘struct
bt_gatt_read_params::<anonymous union>::__single’ invalid; an
anonymous union can only have non-static data members [-fpermissive]
Reading up on the standard, I was unable to find any mention of this
being valid C or CXX code (But reading the standard is not
straightforward). And I was unable to find any mechanism to make the
CXX compiler accept it (e.g. Changing the -std, or adding this as a
language extension e.g. -fms-extensions).
So we rewrite it to not declare the struct with the tag
"__single". There does not seem to be any reason for it to be declared
like this.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Instead of accessing the environment variable ZEPHYR_BASE every time we
require accessing the source code root, use an intermediate variable
that has OS path separators correctly set to '/' to avoid issues on
Windows.
Note: This removes the ZEPHYR_SOURCE_DIR CMake variable. External
applications using that will need to change to use the new ZEPHYR_BASE
variable.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The new images has package updates including:
- ninja-build
- lcov
- new versions of doc generations packages
- gcovr
- gcc-6-multilib
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
In order to support both "/" and "\" as OS path separators,
use the correct Python os.sep helper.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
I've been successfully using the latest sphinx/breathe/docutils
and doxygen versions for local doc build testing. The CI system
already uses the latest doxygen, so this patch updates the
pip-installed sphinx, breathe, and docutils tools too.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
It has been agreed in the project TSC to reject commit messages without
any content. Every commit message needs some explaination beyond what
was put in the title, even the most trivial ones.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
When testing ping6 with net shell, it was noticed that after some
sucessive calls the applications stopped to handle rx packets.
Analyzing other icmpv6 register callbacks it was verified that is
necessary to unref packets before returning NET_OK.
Signed-off-by: Pedro Martucci <pedropaulomartucci@gmail.com>
commit 2a7546fb5a ("net: lwm2m: add support for coap2coap proxy")
erroneously changed the COAP_OPTION_* used to specify the coap2coap
or coap2http proxy resource used from COAP_OPTION_URI_PATH to
COAP_OPTION_PROXY_SCHEME.
Changing it back to COAP_OPTION_URI_PATH requires us to re-order how
the coap options are appended to the packet as the coap options must
be added in the order specified by the numbers in:
https://tools.ietf.org/html/rfc7252#section-12.2
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
CoAP packet w/ confirmation flag set is required to be retransmitted
before it got the ACK message from the peer.
However, the packet is usally unreference once it's sent to the network.
Although we set the timeout as no wait when calling function
net_app_send_pkt(), it's still possible that the packet is unreferenced
before we got a chance to increase the packet reference by calling
coap_pending_cycle().
Usually, the IP stack will generate an ARP packet first and then send
out the packet. However, this is not the case when the remote is a
loopback address.
As issue #5101 described, when asking client to perform a firmware pull
on URL "coap://127.0.0.1:7783/large". The packet will be unreferenced
immediately after calling net_app_send_pkt(). Which then result in
client hang.
The solution to the issue is to increase the reference count on the
sending packet and decrease it after the process is finished.
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
It is desired behaviour that when 'make VERBOSE=1' is invoked, the
underlying scripts will be invoked in 'verbose mode', e.g. they have
the flag --verbose passed to them.
This patch modifies all the underlying scripts in the build system to
inject --verbose into the command line when the environment variable
VERBOSE is set.
The environment variable VERBOSE is a CMake concept. CMake will
generate Makefile's that read this environment variable and try to
behave accordingly. Unfortunately, the generated ninja build systems
behave differently and will have to be invoked like this:
VERBOSE=1 ninja -v
This fixes#4851
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Windows users have on multiple occasions cloned Zephyr using a Windows
git client. It seems that the windows git client defaults to
converting line endings from LF to CRLF when cloning repo's. This
breaks at least one of Zephyr's tools (Kconfig).
This patch introduces a sanity check of the environment for MSYS
users.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Old reference on driver's specific raw mode was still lurking around.
Removing those.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Old reference on driver's specific raw mode was still lurking around.
Removing those.
Fixes#5270
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
A very old reference to former net stack was still lurking around.
Removing it.
Taking the opportunity to clear up dependencies.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
We shouldn't limit the amount of data appended to RX packets based on
the max send size of TX packets. Skip this check for packets in the
RX slab.
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
This reverts commit 3599d793c2.
Setting a packet's data_len here doesn't fix the fact that we shouldn't
be using it at all on RX packets. Fix belongs in net_pkt_append().
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
When testing TLS connections on production web server, it was noticed
that the TLS mainloop was getting "hung" after a connection was made
via HTTPS and then closed by the server. The TLS mainloop was never
being notified that the connection was closed and was stuck waiting
for more data.
The next time that connection was used, TLS would fail to start.
Let's force trigger a closure of the TLS process when the net-app layer
is notified of the connection closure. This allows the connection to
be successfully reused later.
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
Virtual address labels array entries were not updated on va deletion,
so that STATUS_INSUFF_RESOURCES error was returned after few
subsequent Config Model Subscription Virtual Address Add, Delete,
Overwrite commands, even if there shall be free space available.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This fixes missing bt_mesh_lpn_group_del call in mod_sub_va_del.
If Config Model Subscription Virtual Address Delete was received
and successfully proceeded, subscription address shall be also
deleted from LPN Subscribe Groups.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
Modern windows tools will properly handle windows or linux line endings
so remove the warning about windows tools.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
A Zephyr library not having source files is usually due to a
misconfiguration and will lead to an obscure error message. But
imported Zephyr libraries don't have source files so we need to skip
the source file when a library is imported.
An imported Zephyr library is normally used to reference externally
built code, either prebuilt or recursively built through an external
build system.
This fixes#5497
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Having a library being GLOBAL, although not default behaviour, or
necessary for the sample, is expected behaviour for a library. It is
expected that like normal libraries, the target name will be
accessible from outside of the CMakeLists.txt file that created it.
Since samples are used as reference code, we specify GLOBAL so that
libraries are created with this intuitive behaviour.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Fix build break when enabling CONFIG_HTTPS w/o CONFIG_NET_APP_SERVER
This error can be seen when building sample/net/http_client like so:
$ cd samples/net/http_client
$ mkdir build && cd build
$ cmake -DBOARD=qemu_x86 -DCONF_FILE=prj_tls.conf ..
$ make run
In file included from
/home/<user>/zephyr/include/net/http.h:11:0,
from /home/<user>/zephyr/samples/net/http_client/src/main.c:19:
/home/<user>/zephyr/include/net/http_app.h:643:11: error: unknown type
name ‘net_app_cert_cb_t’
net_app_cert_cb_t cert_cb,
^~~~~~~~~~~~~~~~~
CMakeFiles/app.dir/build.make:302: recipe for target
'CMakeFiles/app.dir/src/main.c.obj' failed
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>