The sanity test script needs to have ccache installed on the Ubuntu
and Fedora developement environments.
Signed-off-by: David Leach <david.leach@nxp.com>
We want applications to be able to enable and disable userspace without
changing any code. k_thread_user_mode_enter() now just jumps into the
entry point if CONFIG_USERSPACE is disabled.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This includes:
- peripheral drivers
- driverlib (HAL)
- WiFi host driver and porting layer interface headers
See README in this patch for details.
Origin: Texas Instruments cc32xx SimpleLink SDK
URL: http://www.ti.com/tool/download/SIMPLELINK-CC3220-SDK
Purpose: Provide driver libraries and HAL for TI CC32XX SoC
Maintained-by: External
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
When the net-shell needs to send something to network interface,
it will check if the target address is found in neighbor cache and
then use that network interface. If the address is not found in nbr
cache, then the default interface is used.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This app now depends on net_app API, so it must be enabled for all
project configs we have.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Some our Zephyr tools don't like seeing UTF-8 characters, as reported in
issue #4131) so a quick scan and replace for UTF-8 characters in .rst,
.h, and Kconfig files using "file --mime-encoding" (excluding the /ext
folders) finds these files to tweak.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
send()/sendto() aren't "front facing" functions, so when user calls
them, context type hopefully should be already validated by other
functions. They are also on critical path of app/network performance,
so getting rid of extra check helps a little bit too. This also
fixes a warning of "err" possibly being used non-initialized.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This used to exist because in earlier versions of the system call
interfaces, an "extern" declaration of the system call implementation
function would precede the real inline version of the implementation.
The compiler would not like this and would throw "static declaration
of ‘foo’ follows non-static declaration". So alternate macros were
needed which declare the implementation function as 'static inline'
instead of extern.
However, currently the inline version of these system call
implementations appear first, the K_SYSCALL_DECLARE() macros appear in
the header generated by gen_syscalls.py, which is always included at the
end of the header file. The compiler does not complain if a
static inline function is succeeded by an extern prototype of the
same function. This lets us simplify the generated system call
macros and just use __syscall everywhere.
The disassembly of this was checked on x86 to ensure that for
kernel-only or CONFIG_USERSPACE=n scenarios, everything is still being
inlined as expected.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The implementation is based on net app API. It sends the request and
parses the server reply by following some suggestions mentioned in the
secion "SNTP Server Operations" of RFC 4330.
The system uptime is used as the transmit timestamp of client request
This lib can work on those devices without RTC.
Signed-off-by: Aska Wu <aska.wu@linaro.org>
The MSYS2 installer does not include an updated version of the package
database, so users need to update it first in order to install all of
the required dependencies. Additionally, the repo must be cloned before
being able to install the Python requirements.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
doc/kernel/overview/changes.rst contains information about changes from
kernel release 1.5 ("Version 1 Kernel") to the combined "Version 2
Kernel" and doc/porting/application.rst talked about how to change
applications using Version 1 interfaces to the Version 2 interface.
This information remains in the online tagged versions of the
documentation, but it's time to remove this from the current
documentation set. (Also removing example porting code.)
Fixes issue #1524
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
In Python, if open() doesn't specify "encoding" parameter,
locale.getpreferredencoding(False) will be used as the default,
as explained in
https://docs.python.org/3/library/functions.html#open ,
which may differ from system to system. So, explicitly specify
"encoding" param in open() call.
Also, fix a typo in a comment.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Since the Zephyr HCI VS extensions apply to both the Host (using them
for additional functionality) and the Controller (implement the commands
and events), it make sense to make this a common setting in order for it
to be configurable in a way that applies to both.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
- Add test cases of ipv4/ipv6 sendto() and recvfrom()
- Set the main stack size to 2048 to enable both ipv4 and ipv6 on
qemu_x86.
- Use net app for network setup.
Signed-off-by: Aska Wu <aska.wu@linaro.org>
sendto() and recvfrom() are often used with datagram socket.
sendto() is based on net_context_sendto() and recvfrom() is based on
zsock_recv() with parsing source address from the packet header.
Signed-off-by: Aska Wu <aska.wu@linaro.org>
This patch makes net_context_sendto() work independently without calling
net_context_connect() first. It will bind default address and port if
necessary.
Also, since receive callback should be provided before sending data in
order to receive the response, bind default address and port to prevent
providing an unbound address and port to net_conn_register().
Signed-off-by: Aska Wu <aska.wu@linaro.org>
Introduce net_pkt_get_src_addr() as a helper function to get the source
address and port from the packet header.
Signed-off-by: Aska Wu <aska.wu@linaro.org>
This is pulled from commit a8c964eacb21288b2dbfa9d80cee5968a3b8fb21 of
the Linux kernel with local zephyr related modifications.
Fixes#4135.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The PA/LNA feature is not functional on nRF51x series due to added
interrupt latency. Disable this feature unconditionally for those ICs to
avoid unexpected behavior.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Other parts of the networking subsystem may use net_pkt_ip_hdr_len() on
a packet that has been encrypted for use with DTLS. Let's restore that
value here so those areas don't receive an erroneous 0 value.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
When default "n" is selected (as it is by default) this sets:
CONFIG_MBEDTLS_DEBUG="n"
When checked by the existing logic (example shown below) will always
be true and debug will be enabled all the time:
//#if defined(CONFIG_MBEDTLS_DEBUG)
Instead, let's change the config type to "bool" which will be
undefined when set to "n" (by default). The existing #if defined()
checks will work correctly.
NOTE: This fix saves a lot of binary space when MBEDTLS is enabled
due to the amount debug output being compiled in.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
When a configuration file fragment ends in a line that is not
terminated by a \n, it will mange the pasting of the following
fragment. For example, in file1.prj:
CONFIG_SETTING_A=34
CONFIG_SETTING_B=12
and file2.prj:
CONFIG_SETTING_C=56
would become:
CONFIG_SETTING_A=34
CONFIG_SETTING_B=12CONFIG_SETTING_C=56
because there was no \n at the end of CONFIG_SETTING_B=12. This makes
the kconfig parser to reject CONFIG_SETTING_B and to loose
CONFIG_SETTING_C, which then has random consequences.
So, to avoid that problem, always add a newline after a config fragment.
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
patch fix the issue of unable to read from adc by setting
appropriate sampling delay.
The sampling delay should be set to resolution of adc + 2.
In adc qmsi driver the sampling delay received form application
is subtracted from resolution of adc + 2 , if the resultant value
is less than zero then zero is set as sampling delay. So in the
adc_simple application when 12 is passed as sampling delay driver
sets it as zero. So 26 is the minimum sampling delay should be
set in application for a adc with resolution of 12. The reason
to choose 30 was to maintain same value of sampling
delay between adc_simple and adc_api application.
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
ztest framework doesn't do anything privileged, it interacts with the
kernel using system calls like other application code and should be
considered runtime logic.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
If we were trying to send max MTU size data, then the temporary
frame_buf was overflowing because it only allocated 1500 bytes
for the buffer but then copied 1514 bytes into it (max mtu +
ethernet header).
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>