Similar addition was don previous for nRF52840.
Added flash-controller description and moved flash description to
it. Added property for description of
the flash alignment required by write operations.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
In a case gateway is not set drop packet early otherwise bogus
ARPs for 0.0.0.0 are sent.
...
[net/arp] [DBG] find_entry: (0xa8006720): dst 0.0.0.0
[net/arp] [DBG] find_entry: (0xa8006720): [0] iface 0xa800cd80 dst
0.0.0.0 ll 00:00:00:00:00:00 pending 0xa800a7c0
[net/arp] [DBG] find_entry: (0xa8006720): ARP already pending to
0.0.0.0 ll 00:00:00:00:00:00
[net/arp] [DBG] net_arp_prepare: (0xa8006720): Resending ARP
0xa800a380
...
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Add information that IP addresses in prj_qemu_cortex_m3.conf file for
echo_client are set that qemu<->qemu communication could be tested.
Signed-off-by: Michał Kruszewski <michal.kruszewski@nordicsemi.no>
nrf SOCs use external timer for measuring benchmarking stats.
Earlier this timer is programmed in 24 bit mode, due to which
is is getting expired in some of benchmark stats like mutex
lock/unlock. So configuring to 32 bit mode to avoid overflow.
Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
Some of benchmark stats were not reported for nrf52/52 based SOCs.
This was because nrf based SOCs use external timer.
In timing info some of benchmark stats still use systick based APIs.
Due to which benchmarking number was not getting reported. So change
it to timer based for nrf.
Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
When TCP connection over IPv4 could not be established there was
an error about TCP connection over IPv6.
Signed-off-by: Michał Kruszewski <michal.kruszewski@nordicsemi.no>
fixed error introduced in application.rst (v1.8) along with a general
spelling check pass including consistent spelling of "runtime" and
hyphenated words with "pre-"
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
A quick look at "man syscall" shows that in Linux, all architectures
support at least 6 argument system calls, with a few supporting 7. We
can at least do 6 in Zephyr.
x86 port modified to use EBP register to carry the 6th system call
argument.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Cleanup I2C drivers to not use bitfield access for config information
and instead use accessor macros that use shifts & masks. This is
cleanup towards removing the bitfield access in the future.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
If IPv6 is disabled, then it is useless to try to resolve
IPv6 address because "struct sockaddr" does not have enough
space to store IPv6 address.
Fixes#1487
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
It is useful to clone just the net_pkt which does not have any
data fragments linked to it.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
While importing the nrf_power.h to use the nrf_power_resetreas_get()
function the missing header file error was presented.
Origin: Nordic SDK 12.2.0 (components/drivers_nrf/hal)
URL: http://developer.nordicsemi.com/nRF5_SDK/
License: 3-clause BSD
Maintained-by: External
Signed-off-by: Flavio Arieta Netto <flavio@exati.com.br>
Signed-off-by: flavio <flavio@exati.com.br>
With logging enabled, this leads to type mismatch warning, which is
promoted to error when building under CI.
Also, reomove extra "\n" from the logging messages.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Add a simple test which generates a file that can be included
into a .c file. Then verify in zephyr that the file contains
the same bytes as the original file.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is useful if there is a need to generate a file
that can be included into the application at build time.
The file can also be compressed automatically when embedding it.
Files to be generated are listed in
generate_inc_file
generate_inc_gz_file
variables.
How to use this commit in your application:
1. Add this to your application Makefile
SRC = $(ZEPHYR_BASE)/<your-app-dir>/src
include $(ZEPHYR_BASE)/scripts/Makefile.gen
2. Add needed binary/other embedded files into src/Makefile
to "generate_inc_file" or "generate_inc_gz_file" variables:
# List of files that are used to generate a file that can be
# included into .c file.
generate_inc_file += \
echo-apps-cert.der \
echo-apps-key.der \
file.bin
generate_inc_gz_file += \
index.html
include $(ZEPHYR_BASE)/scripts/Makefile.gen
3. In the application, do something with the embedded file
static const unsigned char inc_file[] = {
#include "file.bin.inc"
};
static const unsigned char gz_inc_file[] = {
#include "index.html.gz.inc"
};
The generated files in ${SRC}/*.inc are automatically removed
when you do "make pristine"
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This file is no longer needed as IPSS service is already enabled with
CONFIG_NET_L2_BT.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This is useful to enable error/warning logging across the net
codebase (less useful for debug level logging, but that's true
for CONFIG_NET_LOG_GLOBAL already).
Implementation-wise, instead of keeping adding to long list of
"select"'s in CONFIG_NET_LOG_GLOBAL and thus introduce component
inter-dependencies, add "default y if NET_LOG_GLOBAL" to
individual components' logging options.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
At the moment we print "Sending ARP packet" even if we found ARP entry
and send the packet directly.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This is the first part of a large refactoring of LwM2M library
message functions and will simplify observer handling later.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
All throughout the LwM2M library we use sockaddr values which are
basically the same as the net_app_ctx's remote addr. There's no
reason to keep these extra sockaddr values around. The net_app
framework client won't accept incoming requests on sockaddr other
than the one we're connected to.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
This is the final stage of moving the LwM2M library internals to
the net_app APIs. This means we can support DTLS and other
built-in features in the future. All of the logic for
establishing the network connection is removed from the sample
app.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
In preparation for the move to net_app APIs, we will need
to pass net_app_ctx structures around to the following
functions:
lwm2m_udp_sendto()
udp_request_handler()
Let's add the parameter as net_context for now so the
transition will be smoother later.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
This allows use to associate easily the replies / pending operations
with a specific network connection.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
The LwM2M library does not use net_app APIs internally. To help
this effort let's establish a user facing structure "lwm2m_ctx"
(similar to http_client_ctx and mqtt_ctx) and start it off by
wrappering the net_context structure.
Future patches will add user setup options to this structure and
eventually remove the net_context structure in favor of a net_app_ctx.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
If no gateway is set, an ARP request for 0.0.0.0 will be sent out,
which is confusing, so log as an error. Of course, logging will
happen only if enabled.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
The IPv4 multicast address to MAC address mapping was missing
the 4th byte high bit clearing.
We also need to have some storage for the multicast MAC address.
This was missing which could cause NULL pointer access.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The DNS resolver example enables mDNS client support and then
queries zephyr.local hostname. The net-tools project has example
avahi-daemon script that will response these .local queries and
can be used in testing.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This implements mDNS client from RFC 6762. What this means that
caller is able to resolve "hostname.local" names using multicast DNS.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Allow the script to take multiple -f (fixup) file options. We output
the fixup files in order that the -f options are passed. This will
allow us to have a common soc fixup and board fixup if we desire.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
If there's any key in the alias which length is larger than other keys
in the node, the include file will be incorrect, there will be no tab
between the key and value.
We need to take into account the max length of alias keys.
Signed-off-by: Aska Wu <aska.wu@linaro.org>
* Instead of a common system call entry function, we instead create a
table mapping system call ids to handler skeleton functions which are
invoked directly by the architecture code which receives the system
call.
* system call handler prototype specified. All but the most trivial
system calls will implement one of these. They validate all the
arguments, including verifying kernel/device object pointers, ensuring
that the calling thread has appropriate access to any memory buffers
passed in, and performing other parameter checks that the base system
call implementation does not check, or only checks with __ASSERT().
It's only possible to install a system call implementation directly
inside this table if the implementation has a return value and requires
no validation of any of its arguments.
A sample handler implementation for k_mutex_unlock() might look like:
u32_t _syscall_k_mutex_unlock(u32_t mutex_arg, u32_t arg2, u32_t arg3,
u32_t arg4, u32_t arg5, void *ssf)
{
struct k_mutex *mutex = (struct k_mutex *)mutex_arg;
_SYSCALL_ARG1;
_SYSCALL_IS_OBJ(mutex, K_OBJ_MUTEX, 0, ssf);
_SYSCALL_VERIFY(mutex->lock_count > 0, ssf);
_SYSCALL_VERIFY(mutex->owner == _current, ssf);
k_mutex_unlock(mutex);
return 0;
}
* the x86 port modified to work with the system call table instead of
calling a common handler function. fixed an issue where registers being
changed could confuse the compiler has been fixed; all registers, even
ones used for parameters, must be preserved across the system call.
* a new arch API for producing a kernel oops when validating system call
arguments added. The debug information reported will be from the system
call site and not inside the handler function.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
gitlint was complaining about use of the word "title"
in PR #1512 doc: fix link title in linux installation guide
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Previous description of counter_set_alarm() was insufficient and
could be ambiguously interpreted.
Signed-off-by: Michał Kruszewski <michal.kruszewski@nordicsemi.no>
Fixes a tx_pkts slab leak since the cloned pkt was referencing the
original pkt slab but was not originated from it (net_pkt_unref uses
pkt->slab when releasing the pkt).
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Removing internal boolean in order to use the proper error code hold in
spi_context which was relevantly added in commit 6c717095b8.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Because a next networking API call will lead to a crash. Given that
logging can be easily disabled (disabled by default so far!), don't
be shy and call by the name (i.e. error).
Jira: ZEP-2105
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
If the IP address string is empty, then it is no use trying
to parse it. This was seen when handling DNS server strings when
user has made a mistake and defined the DNS server addresses
incorrectly.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>