When LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP is enabled:
- Mark the first server as a bootstrap server
- Create second server and security instances (used by bootstrap
server)
This allows bootstrap support to be tested out of the box with
the following:
- setup Leshan bss-server-demo (bootstrap server) on port 5783
- setup Leshan server-demo (lwm2m server) on port 5683
- add an entry into the bootstrap server:
LWM2M Server=coap://[2001:db8::2]:5683
- build the sample like so:
west build -t run -b qemu_x86 \
-s zephyr/samples/net/lwm2m_client/ -- \
-DCONFIG_LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP=y \
-DCONFIG_LWM2M_PEER_PORT=5783
Signed-off-by: Michael Scott <mike@foundries.io>
CONFIG_NET_SOCKETS_POSIX_NAMES is incompatible with POSIX_API, so it's
disabled by the build system. It's no longer required anyway.
It is a leftover from before #16557 was merged.
Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
Use LOG_LEVEL_INF as defautl log level and use LOG_INF
for important messages. Relax while loop and
give CPU resources to low priority threads like logging.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
This removes the necessity of registering the storage for CCC and make
it part of the declaration itself.
Fixes#18547
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mark harness as TBD as we haven't defined how to test/validate this
sample on real hardware. As such marking it 'harness: TBD' will get it
skipped from being attempted to run on hardware via --device-testing
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Was "pkconfig", which may confuse users whether some different tool
than the standard pkgconfig is meant.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
The order of the fonts in ROM has changed.
Since the sorting is not wrong, correct the
order in the application.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Consistently place C++ use of extern "C" after all include directives,
within the negative branch of _ASMLANGUAGE if used.
Background from issue #17997:
Declarations that use C linkage should be placed within extern "C"
so the language linkage is correct when the header is included by
a C++ compiler.
Similarly #include directives should be outside the extern "C" to
ensure the language-specific default linkage is applied to any
declarations provided by the included header.
See: https://en.cppreference.com/w/cpp/language/language_linkage
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Adding required fields to the devicetree overlay of the CAN sample as
this is often used as a reference. Also use these fields instead of the
KConfig entries.
Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
The CAN sample is rewritten to be board independent.
The CAN controller and LED is determined automatically and the
button is removed.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
SOCKS5 support added to echo_client. Details are added
in README file about how to verify this feature using
echo-client with echo-server running on Linux host.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Reduce the RAM usage in two of the Bluetooth samples in order for them
to fit in the BBC Microbit's RAM.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
* this is a simple sample to show how
secure applicaiton and non-secure application work
together. More details are in README.rst
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
This commit includes tweaks in several tests, so
that the tests can be passing on ARM QEMU targets,
mps2_an385 and mps2_an521 with Qemu 4.x release.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This adds a basic app which puts some rectangles on the display
It's hard to write an equivalent README to the rest of the sample
documentation, as the LCD I have uses a custom board thrown together for
testing. (ie other LCDs have publicly available modules)
Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
This commit adds a sample configuration for 6LoCAN to the
echo_client and echo_server example.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
This commit is an implementation of 6LoCAN, a 6Lo adaption layer for
Controller Area Networks. 6LoCAN is not yet standardised.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
The maximum period a PWM controller can generate depends on its input
clock and its resolution (16-bit, 32-bit...). Setting a 1s max period
generates error with some hardwares (mimxrt1064_evk) because of clock
limitation.
This patch fixes this issue by calculating maximum period of the PWM
device to adjust max and min periods accordingly.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
There's desire to be able to customize parameters on a per-filesystem
basis, which means we need a way to override the Kconfig defaults which
are global. This also means the littlefs data structure cannot own the
cache and lookahead buffers.
Switch to using a macro to define the littlefs data structure. The
default version uses the Kconfig constants. A custom one takes
arguments providing the most likely partition-specific parameters.
Finally the user is free to bypass the helper macros and set any
parameters desired, though validation is limited and only present when
CONFIG_DEBUG is enabled.
Extend the test suite with a performance module, which confirms that
these settings have an impact proportional to the log of changes to the
cache or IO sizes.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Add support for the littlefs file system in the fs shell. Update
the sample to use the same partition configuration as the littlefs
example for the SPI NOR test platform.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
The message talks about seconds but displays ticks. Adjusting the
parameter to convert ticks to seconds then. But also adding the ticks
since it is a valuable information when testing counter devices.
Fixing small style issue (parameter indentation) as well.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Modify mqtt_publisher sample to use mqtt_client_set_proxy().
Removed CONFIG_MQTT_LIB_SOCKS based setup.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Error codes are listed in header files and in the core spec as hex
values. Always print them in hex in debug for easier error code
checking.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Let's add support for recently added LwM2M objects:
- Connectitiy Monitoring
- Location
- IPSO Accelerometer
- IPSO Buzzer
- IPSO On/Off Switch
- IPSO Push Button
Currently, this is limited to compile enabled and manual creation
of objects via LwM2M server. Objects will respond to read/write
operations, but not have real HW backing.
Signed-off-by: Michael Scott <mike@foundries.io>
LwM2M allows for multiple instance resources such the power source
resources in the device object. These types of resources have
always been very hard to work with, and frankly were poorly
implemented.
This led to other issues where it was very hard to have
non-sequential resource instances, and each resource of this type
needed special getter / setter methods such as:
lwm2m_device_add_pwrsrc()
lwm2m_device_set_pwrsrc_voltage_mv()
Going forward, as more LwM2M objects are implemented this just
doesn't scale well.
To fix this:
- split the resource instance data out from the resource data.
This includes the data pointer information and resource
instance id.
- add resource id and resource instance id to the event callback
functions so user's can see in more detail what resources and
resource instances are being handled.
- allow generic functions like lwm2m_engine_get_*() and
lwm2m_engine_set_*() to access resource instance data.
- adjust object resource initialization macros to map resource
instances to resources at the time of object instance
creation.
- fix up the lwm2m_client as a reflection of all of these changes.
Signed-off-by: Michael Scott <mike@foundries.io>
By sending the temp value back to the LwM2M engine, it allows all of
the min/max values to be updated over time.
Fixes an issue where min/max values were not being updated.
Signed-off-by: Michael Scott <mike@foundries.io>
The native Zephyr LwM2M client enables the JSON formatter which
can use more of the packet buffers than the default 256 with
TLV formatting. Let's set the default to 512 in order to avoid
cutting off the output of larger READ operations.
In the future, we should establish block transfer buffers to
handler longer READ ops.
Signed-off-by: Michael Scott <mike@foundries.io>
Per IPSO Light Control definition from the OMA LwM2M registry:
http://www.openmobilealliance.org/tech/profiles/lwm2m/3311.xml
There is an optional "Application Type" string resource (5750) in the
Light Control object. This was missed in the initial implementation.
NOTE: sample will assign reference if needed.
Signed-off-by: Michael Scott <mike@foundries.io>
We are pre-allocating a storage variable for the application type
resource in the IPSO Timer object. This is an optional resource
which won't always be set by samples.
Let's leave out the pre-allocated variable and let the sample set
this reference if needed (it's optional).
Signed-off-by: Michael Scott <mike@foundries.io>
Now that strcspn() is implemented in our minimal libc, remove it from
the civetweb sample to avoid the linker complaining about multiple
definitions.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
k_cycle_get_32() returns an unsigned 32-bit integer, while the '%d'
specifier denotes a signed integer.
Using the proper C99 format specifier resolves the problem.
Signed-off-by: Reto Schneider <code@reto-schneider.ch>
This commit adds civetweb as a west module and a sample that uses it.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
This board and SoC was discontinued some time ago and is currently not
maintained in the zephyr tree.
Remove all associated configurations and variants from the tree.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This board and SoC was discontinued some time ago and is currently not
maintained in the zephyr tree.
Remove all associated configurations and variants from the tree.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit enables the CAN shell for the sample code.
Also, the device shell is activated to find the proper device-name.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
Show eSPI API driver usage, including early configuration,
send of virtual wire packets and callback mechanism
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
The `start_udp_and_tcp` funcion is a blocking function, therefore it
should not be called from the system workqueue, as it would stall it.
Because it was called in such a way, the retry mechanism, which
also relied on the system workqueue did not work properly.
This commit fixes the issue, by keeping the main application processing
in the main thread, and using a semaphore to synchronize with the
connection manager.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Particle mesh feather devices, and Nordic PCA10056, can both run
this example with the on-board JEDEC SPI NOR device if the driver
is enabled.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
There are multiple flash implementations. This sample was originally
written for the W25QXXDV driver, but has since been used for
jedec,spi-nor. The sample should work with multiple drivers.
Add device name sources for several drivers, falling back to spi-nor
which was recently used as a test filter.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
On some SoCs the frequency of the system clock is obtained at run time
as the exact configuration of the hardware is not known at compile time.
On such platforms using CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC define
directly introduces timing errors.
This commit replaces CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC by the call
to inline function sys_clock_hw_cycles_per_sec() which always returns
correct frequency of the system clock.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
After the removal of the virtualcom DT node in 5071eee, using the chosen
node is no longer functional. Instead the Kconfig
CONFIG_UART_CONSOLE_ON_DEV_NAME is used to locate the correct UART.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Updated fs shell sample readme to state the requirement of a 32-bit
version of libfuse while building for native_posix board
Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
main.c file changes
1. Renamed <board.h> to <device.h>
2. <misc/printk.h> now is inserted into <sys/printk.h>
3. <i2c.h> and <gpio.h> now are inserted into
<drivers/i2c.h> and <drivers/gpio.h>
4. Deleted <errno.h> because it is not using
5. Deleted <pwm.h> because it is not using
6. Deleted <display/mb_display.h> because it is not using
in that project (legacy from old project).
7. Now we use the following commands to rename any
SW._GPIO_{CONTROLLER,PIN,FLAGS} to
DT_ALIAS_SW._GPIOS_{CONTROLLER,PIN,FLAGS} ,
so renamed SW0_GPIO_CONTROLLER to DT_ALIAS_SW0_GPIOS_CONTROLLER
prj.conf file changes
1. Deleted CONFIG_SYS_CLOCK_TICKS_PER_SEC=250
because apps shouldn't set tick rate.
Made a line follower robot sample using DFRobot Maqueen chassis
for micro:bit board. Deleted unused files.
Signed-off-by: Maksim Masalski <maxxliferobot@gmail.com>
Sample applications for display functions do not work on native_posix_64
due to missing overrides. Clone the native_posix_64 Kconfig override
for all samples that have a native_posix Kconfig override.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Remove old configurations of boards that do not support networking
natively and very custom and difficult to test.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Start to monitor Connected and Disconnect events and then start
and stop the echo service according to system connectivity status.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The size_t type is either compatible with an int on 32-bit target, or
a long on 64-bit targets. It could even be a long even on some 32-bit
targets. Let's use the z qualifier in the printf format to be compatible
with whatever flavor in use.
In case of pointers, let's just use %p with pointers directly and
avoid casts altogether.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Delete IPSP sample file, this source file is not included in any build
files. The service contains no valuable logic other than advertising
with the IPSP service in the advertising data.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Move the HID over GATT service into the sample that demonstrates it.
This avoids long build paths
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Move the Current Time service into the sample that demonstrates it.
This avoids long build paths
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Move the health thermometer service into the sample folder that
demonstrates it. This avoids long build paths
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit moves the BLE GATT heart rate service from
samples/bluetooth/gatt to subsys/bluetooth/services and adds a Kconfig
entry to enable and configure the service.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit moves the BLE GATT Battery service
from /samples/bluetooth/gatt to /subsys/bluetooth/services and
adds a Kconfig entry to enable and configure the service;
when enabled, it will register itself automatically.
Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
The name disk_access_sdhc.c is ambiguous,
actually this driver depends on SPI,
rename this file.
In addition, move the generic sdhc stuff from C file
to head file for other sdhc drivers to use.
1) disk_access_sdhc.c->disk_access_spi_sdhc.c.
2) create .h and move sdhc specifications from .c to .h.
Signed-off-by: Jun Yang <jun.yang@nxp.com>
Flags in alarm configuration structure will allow further extention
without breaking API. Initially, existing absolute flag was added
as the only flag.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Converts all net samples that enable the mcr20a 802.15.4 driver to use
the frdm_cr20a shield instead of hardcoding configs for the frdm_k64f
base board. This makes it possible to build mcr20a samples for other
base boards with compatible arduino headers.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
If a sample wants to use the Zephyr implementation of mbedtls, it
enables CONFIG_MBEDTLS and sets any needed Zephyr-specific mbedtls
options.
Currently, the LwM2M subsystem selects MBEDTLS automatically when
LWM2M_DTLS_SUPPORT is enabled. Let's remove this and let the
LwM2M client sample enable mbedtls and it's options.
This mimics the behavior of several other network-related samples
and removes conflicts when selecting alternate implementations of
MBEDTLS.
Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/17399
Signed-off-by: Michael Scott <mike@foundries.io>
Provide two basic example samples to test the x-nucleo-iks01a3 shield:
- Standard (Mode 1)
- SensorHub (Mode 2)
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Update to documentation for the sample audio application running
on Sue Creek S1000 board from Intel.
Added section on how to control the audio application on target
from a Linux host and updated the console output section
accordingly.
Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
Add python script and associated configuration YAML file
to control audio sample application running on
Intel Sue Creek S1000 from a Linux host.
Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
Add tuning driver, audio block processing threads,
background processing thread and USB transport driver
to the cmake build in audio sample app.
Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
Add a status check to start/stop audio in order to start
audio only if it's not already running and to stop audio
only if it is running.
Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
Add processing threads for small/large audio blocks
in audio sample app for Intel® Sue Creek S1000 board
Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
Add USB transport driver to control the sample application
from a host connected to Intel® Sue Creek S1000 board
via an USB interface.
Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
If user has set CONFIG_NET_CONTEXT_TIMESTAMP then enable
network packet throughput collection for UDP packets.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The current CMSIS v2 implementation is clearly assuming that timeout
arguments being passed to e.g. osDelay() are in units of Zephyr ticks,
not milliseconds as specified by ARM or (inconsistently) assumed by
our test code.
Most tests work with the ~100 Hz default tick rate, but they tend to
fail on precision issues at higher tick rates. Force the CMSIS v2
applications to be 1000 Hz for now as a workaround, and detect the
mismatch as a build failure.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
When tickless is available, all existing devices can handle much
higher timing precision than 10ms. A 10kHz default seems acceptable
without introducing too much range limitation (rollover for a signed
time delta will happen at 2.5 days). Leave the 100 Hz default in
place for ticked configurations, as those are going to be special
purpose usages where the user probably actually cares about interrupt
rate.
Note that the defaulting logic interacts with an obscure trick:
setting the tick rate to zero would indicate "no clock exists" to the
configuration (some platforms use this to drop code from the build).
But now that becomes a kconfig cycle, so to break it we expose
CONFIG_SYS_CLOCK_EXISTS as an app-defined tunable and not a derived
value from the tick rate. Only one test actually did this.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Tick rate is becoming a platform tunable in the tickless world. Some
apps were setting it due to requirements of drivers or subsystems (or
sometimes for reasons that don't make much sense), but the dependency
goes the other way around now: board/soc/arch level code is
responsible for setting tick rates that work with their devices.
A few tests still use hard-configured tick rates, as they have
baked-in assumptions (like e.g. "a tick will be longer than a
millisecond") that need to be addressed first.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Recursive make should be invoked as $(MAKE) and not "make" for reasons
documented at
https://www.gnu.org/software/make/manual/html_node/MAKE-Variable.html
$(MAKE) is what CMake puts in all the CMakeFiles/Makefile2 it generates,
it doesn't use "make" either.
Issue found thanks to the following warning:
build.log:make[4]: warning: jobserver unavailable: using -j1.
Add '+' to parent make rule.
If CMake is invoked with -GNinja or other then fall back on "make" as
before and pray that it's available.
Fast reproduction with:
make -j2 -C build clean mylib_project VERBOSE=1
Build directories have been compared before/after this change and
there's zero difference except the generated
mylib_project.dir/build.make file (and the warning above) when using
make.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Adding Health Thermometer Service sample. Refer to Health Thermometer
Profile Specification for detailed information about the Health
Thermometer Profile.
Signed-off-by: Aaron Tsui <aaron.tsui@outlook.com>
We use the following commands to rename any
LED._GPIO_{CONTROLLER,PIN,FLAGS} to
DT_ALIAS_LED._GPIOS_{CONTROLLER,PIN,FLAGS}
git grep -l LED._GPIO_CONTROLLER | xargs sed -i 's/LED\(.\)_GPIO_CONTROLLER/DT_ALIAS_LED\1_GPIOS_CONTROLLER/g'
git grep -l LED._GPIO_PIN | xargs sed -i 's/LED\(.\)_GPIO_PIN/DT_ALIAS_LED\1_GPIOS_PIN/g'
git grep -l LED._GPIO_FLAGS | xargs sed -i 's/LED\(.\)_GPIO_FLAGS/DT_ALIAS_LED\1_GPIOS_FLAGS/g'
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Previously we always used the board identifier (via CONFIG_BOARD) as
identifier, however this causes troubles in case of tests with multiple
boards of the same kind on the same server. The device_id addresses that
problem nicely if enabled and supported by the architecture.
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
Print IP address for added or removed IP address. This helps
to understand what IP address is being removed or added.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add support for the FXOS8700CQ present on the NXP TWR-KE18F
development board. The FXOS8700CQ IRQ lines are not connected by
default on the TWR-KE18F, so only polling (no trigger) is supported.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add support for polling the sensor values of the FXOS8700 device when
no trigger (interrupt) is enabled.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Introduce a separate buffer pool for events which the HCI driver
considers discardable. Examples of such events could be e.g.
Advertising Reports. The benefit of having such a pool means that the
if there is a heavy inflow of such events it will not cause the
allocation for other critical events to block and may even eliminate
deadlocks in some cases.
Also update all mesh samples not to specify explicit RX buffer counts
anymore. Instead, create appropriate defaults in Kconfig so that we
only need to override this in the app for cases like the bbc:microbit
with limited memory.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
We use the following commands to rename any
SW._GPIO_{CONTROLLER,PIN,FLAGS} to
DT_ALIAS_SW._GPIOS_{CONTROLLER,PIN,FLAGS}
git grep -l SW._GPIO_CONTROLLER | xargs sed -i 's/SW\(.\)_GPIO_CONTROLLER/DT_ALIAS_SW\1_GPIOS_CONTROLLER/g'
git grep -l SW._GPIO_PIN | xargs sed -i 's/SW\(.\)_GPIO_PIN/DT_ALIAS_SW\1_GPIOS_PIN/g'
git grep -l SW._GPIO_FLAGS | xargs sed -i 's/SW\(.\)_GPIO_FLAGS/DT_ALIAS_SW\1_GPIOS_FLAGS/g'
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
We use the following commands to rename any _PWM_{CONTROLLER,CHANNEL}
to *_PWMS_{CONTROLLER,CHANNEL}
Used the following commands to make these changes:
git grep -l '[A-Z_0-9]*_PWM_CONTROLLER' | xargs sed -i 's/\([A-Z_0-9]*\)_PWM_CONTROLLER/DT_ALIAS_\1_PWMS_CONTROLLER/g'
git grep -l '[A-Z_0-9]*_PWM_CHANNEL' | xargs sed -i 's/\([A-Z_0-9]*\)_PWM_CHANNEL/DT_ALIAS_\1_PWMS_CHANNEL/g'
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
move misc/reboot.h to power/reboot.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move misc/stack.h to debug/stack.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move misc/util.h to sys/util.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move misc/printk.h to sys/printk.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move misc/byteorder.h to sys/byteorder.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move misc/__assert.h to sys/__assert.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move ring_buffer.h to sys/ring_buffer.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move display.h to drivers/display.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move uart.h to drivers/uart.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move spi.h to drivers/spi.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move sensor.h to drivers/sensor.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move rtc.h to drivers/rtc.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move pwm.h to drivers/pwm.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move led_strip.h to drivers/led_strip.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move led.h to drivers/led.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move ipm.h to drivers/ipm.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move i2s.h to drivers/i2s.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move i2c.h to drivers/i2c.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move gpio.h to drivers/gpio.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move flash.h to drivers/flash.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move entropy.h to drivers/entropy.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move counter.h to drivers/counter.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move can.h to drivers/can.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move watchdog.h to drivers/watchdog.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move zephyr/jwt.h to data/jwt.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move json.h to data/json.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move power.h to power/power.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move disk_access.h to disk/disk_access.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move stats.h to stats/stats.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move nvs/nvs.h to fs/nvs.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move fs.h to fs/fs.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move console.h to console/console.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Convert DT_.*_GPIO_{CONTROLLER,PIN,FLAGS} ->
DT_.*_GPIOS_{CONTROLLER,PIN,FLAGS)
Used the following commands to make these conversions:
git grep -l DT_.*_GPIO_CONTROLLER | xargs sed -i 's/DT_\(.*\)_GPIO_CONTROLLER/DT_\1_GPIOS_CONTROLLER/g'
git grep -l DT_.*_GPIO_PIN | xargs sed -i 's/DT_\(.*\)_GPIO_PIN/DT_\1_GPIOS_PIN/g'
git grep -l DT_.*_GPIO_FLAGS | xargs sed -i 's/DT_\(.*\)_GPIO_FLAGS/DT_\1_GPIOS_FLAGS/g'
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
USBD_CFG_DATA_DEFINE macro has not consider that a class
could have more than one set of usb_cfg_data struct.
If a class has more than one set of usb_cfg_data
then they should be sorted the same way like by
USBD_DEVICE_DESCR_DEFINE macro.
Fixes: #16240
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
This patch removes the "hard" selection of the USB_DEVICE_REMOTE_WAKEUP
Kconfig option for USB devices made on the nRF52840 SoC. Now it's up to
the application to decide if it wants to enable the option. This change
makes it possible to pass the USB3CV Chapter 9 Tests for applications
that don't use the remote wakeup feature, since when a USB device only
reports that it supports this feature, and the mentioned option makes
it to do so, one of the test cases expects the USB device to actually
perform the remote wakeup. And when the feature is not reported as
supported, the test case is skipped.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Assert if the UART device is NULL to help with debugging whenever
there's an issue locating the correct UART instance.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Use Device Tree,and in particular a new 'bt-c2h-uart' to select which
UART is being used to communicate with an external BLE Host when acting
as a Controller.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The assumption that the value handle is one past the attribute handle
works for Zephyr servers but may not be true for others. Avoid the
hard-coded system-specific assumption.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Add nordic boards to the whitelist to ensure that compilation is
checked by the CI.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Removed Quark D2000 SoC files and first-order related DT bindings.
A few config options have been moved from the CONFIG_* space to
the DT_* space, as they were defined in the D2000 Kconfig files
and "leaked" into the other Quark trees.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
Found a few annoying typos and figured I better run script and
fix anything it can find, here are the results...
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This sample has to be operated manually (it's a USB DFU implementation
that needs to be plugged into a host to validate). Sanitycheck is
failing right now becuase it tries to flash and run it, and doesn't
see a harness declaration.
Set it to build_only when run under sanitycheck.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Right now this fails needlessly under sanitycheck for lack of a
harness declaration. It's short, just stuff in a simple regex check.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
The regexes for the power states entered were in the wrong order, and
this tests takes 2 minutes to get to that point, blowing past the
default sanitycheck timeout.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
YAML document separators are needed e.g. when doing
$ cat doc1.yaml doc2.yaml | <parser>
For the bindings, we never parse concatenated documents. Assume we don't
for any other .yaml files either.
Having document separators in e.g. base.yaml makes !include a bit
confusing, since the !included files are merged and not separate
documents (the merging is done in Python code though, so it makes no
difference for behavior).
The replacement was done with
$ git ls-files '*.yaml' | \
xargs sed -i -e '${/\s*\.\.\.\s*/d;}' -e 's/^\s*---\s*$//'
First pattern removes ... at the end of files, second pattern clears a
line with a lone --- on it.
Some redundant blank lines at the end of files were cleared with
$ git ls-files '*.yaml' | xargs sed -i '${/^\s*$/d}'
This is more about making sure people can understand why every part of a
binding is there than about removing some text.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Fix misspellings and doc issues missed during regular reviews (including
some files without a trailing newline)
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
This updates all client modules to const char processing of
setting names.
Update of peripheral_dis sample
Signed-off-by: Laczen JMS <laczenjms@gmail.com>
This is done only for testing purposes, in real life the socket
would be closed if it is not used or needed.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Clean up some stray references to cmake in doc, boards and
samples that don't make explicit use of the zephyr app extension,
as well as other minor doc fixes.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Change code from using now deprecated DT_<COMPAT>_<INSTANCE>_<PROP>
defines to using DT_INST_<INSTANCE>_<COMPAT>_<PROP>.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The DT spec. only has "okay" and not "ok". The Linux kernel has around
12k "okay"s and 300 "ok"s.
The scripts/dts scripts only check for "disabled", so should be safe re.
those at least.
The replacement was done with
git ls-files | xargs sed -i 's/status\s*=\s*"ok"/status = "okay"/'
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Change code from using now deprecated DT_<COMPAT>_<INSTANCE>_<PROP>
defines to using DT_INST_<INSTANCE>_<COMPAT>_<PROP>.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Sample was not compiling for nordic boards because RTC_0
instance was not enabled by default and RTC_0 device is using
different DT define.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Cleanup references to boards in some of the example and use the same
boards through the examples. Other minot cleanups and make the text more
generic and not specific to certain boards.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Using void pointers as universal arguments is widely used. However, when
compiling a 64-bit target, the compiler doesn't like when an int is
converted to a pointer and vice versa despite the presence of a cast.
This is due to a width mismatch between ints (32 bits) and pointers
(64 bits). The trick is to cast to a widening integer type such as
intptr_t and then cast to
void*.
When appropriate, the INT_TO_POINTER macro is used instead of this
double cast to make things clearer. The converse with POINTER_TO_INT
is also done which also serves as good code annotations.
While at it, remove unneeded casts to specific pointer types from void*
in the vicinity, and move to typed variable upon function entry to make
the code cleaner.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Place audio buffers in LPSRAM using linker section attribute
for the 2-way audio sample application
Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
Place audio buffers in LPSRAM using linker section attribute
for the I2S audio sample application
Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
Place audio buffers in LPSRAM using linker section attribute
for the digital mic audio sample application
Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
Hdc1008 driver is renamed into ti_hdc to prepare it to support all
available Texas Instruments HDC sensors (e.g. hdc1080, hdc2080).
Signed-off-by: Nikos Oikonomou <nikoikonomou92@gmail.com>
We are not interested in whether the close() call succeeds or
not when the connection is terminated.
Coverity-CID: 198878
Fixes#16569
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
On some systems the sample was failing validation because
the coverage data would be emitted before the sample had
a chance to print anything else.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Per guidelines, all statements should have braces around them. We do not
have a CI check for this, so a few went in unnoticed.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
It does make sense to initialize USB console after USB Device stack.
Note that the value is selected only if we specify USB_UART_CONSOLE
in prj.conf, not in menuconfig afterwards.
Fixes#16518
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This extends the UpdateHub library code to allow the
use of IPV6 for communication.
Signed-off-by: Christian Tavares <christian.tavares@ossystems.com.br>
This extends the UpdateHub library code to allow the
use of CoAPS/DTLS for communication.
Refs: #13039.
Signed-off-by: Christian Tavares <christian.tavares@ossystems.com.br>
UpdateHub is an enterprise-grade solution which makes simple to
remotely update all your embedded devices in the field. It
handles all aspects related to sending Firmware Over-the-Air(FOTA)
updates with maximum security and efficiency, while you focus in
adding value to your product.
Signed-off-by: Christian Tavares <christian.tavares@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
prj_tickless.conf lacks the CONFIG_PM_CONTROL_OS=y option which
results in the sample failing to build with this config as it leaves
sys_pm_ctrl_disable_state() and sys_pm_ctrl_enable_state()
undefined.
Add the relevant options from prj.conf to fix the build.
Tested on nrf52840_pca10056.
Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
This allows setting a custom pointer to be passed back to the complete
callback at expense of increasing the buffers in 4 bytes.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
main.c in the sample was registered to the logger as 'log'. Changed
to 'app'.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This changes the use of a static and fixed temperature value to using a
read_callback which will either return the previous dummy value or
gather real temperature data from a supported sensor (for now only
FXOS8700 which is available e.g. on a FRDM-K64F).
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
Hardware PWM make sense for servo control even in a sample, add HW PWM
choice for NRF52 family, which support it.
Signed-off-by: Aaron Tsui <aaron.tsui@outlook.com>
Refactor wpanusb sample using new descriptor API, use endpoint index
instead of hardcoded endpoint address.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Remove duplicated execution path for composite configuration, USB
device stack initialization is done inside stack for both cases.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
In order to unify the legacy and composite code, move the class and
vendor request handler buffer into the USB device code, just like in
composite mode. The option is renamed from USB_COMPOSITE_BUFFER_SIZE
into USB_REQUEST_BUFFER_SIZE and also replaces the USB_DFU_MAX_XFER_SIZE
and USB_HID_MAX_PAYLOAD_SIZE options.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
I2C_STM32_V1 and I2C_STM32_V2 are Kconfig symbols used to
select STM32 I2C driver variant based on I2C IP available on a
given STM32 SoC.
Being SoC dependent, they are automatically selected in soc/
if CONFIG_I2C is set. Then there is no need to define them at board
level, nor for a specific application like this is done in
some sample or test applications. Remove these definitions when
this is the case.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
As the prj_base.conf was renamed to prj.conf by commit
4e5300ba7f, the documentation
needs some fixing too.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
GATT long messages require buffers to store multiple packets. The actual
configuration for the bluetooth peripheral sample defines only two
buffers to store these messages. As the default ATT payload size is
18 bytes, the maximum payload size for a long ATT message is 36 bytes.
As the variable `vnd_long_value[]` has a defined size of 74 bytes, it
cannot be fully modified due to the 36 bytes limitation.
Set CONFIG_BT_ATT_PREPARE_COUNT=5 so all the maximum payload size goes
to 90 bytes and all the 74 bytes can be written to `vnd_long_value[]`.
Signed-off-by: Joao Cordeiro <jvcc@cesar.org.br>
on non-XIP system, SRAM is the default region, and relocated .data
section and .bss section of SRAM shouldn't be inserted between
_image_rom_start and _image_rom_end, because the memory region between
_image_rom_start and _image_rom_end will construct the mpu ro region.
Also for the newly added memory region on non-XIP system, the
relocated .text secition and .rodata section should also be mpu aligned.
Fixes: #16090.
Signed-off-by: Wentong Wu <wentong.wu@intel.com>
Instead of using the now removed overlay files, use the SHIELD=
command-line option for testing the WNC-M14A2A modem.
Signed-off-by: Michael Scott <mike@foundries.io>
Sample walk through:
1. CPU 0 will wake up CPU 1 after initialization
2. CPU 1 will send to CPU 0 an interrupt over MHU0
3. CPU 0 return the same to CPU 1 when received MHU0 interrupt
4. Test done when CPU 1 received MHU0 interrupt
The wake up second core and private core ID are soc specific.
Signed-off-by: Karl Zhang <karl.zhang@linaro.org>
Add a sample application that demonstrates how to use the ADXL362 with
data ready and threshold triggers.
Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
Add a minimal sample that showcases minimal ROM sizes. It can be built
in several configurations, all very restrictive when it comes to
features enabled in order to verify the fact that we can fit in small
devices and to be able to accurately measure the sizes of the kernel's
basic features.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit extends the CAN api can_send function by an argument
that is passed to the isr callback.
With this extension it is possible to distinguish between sent masseges
when they use the same callback.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
This commit extends the CAN api attach_isr function by an argument
that is passed to the isr callback.
With this extension it is possible to distinguish between filter matches
when they use the same callback.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
IWDG driver for STM32 doesn't support the callback parameter.
The patch adds necessary workaround for STM32.
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Otherwise, it can lead to warning like:
main.c:80:10: warning: format '%d' expects argument of type 'int',
but argument 2 has type 'socklen_t' {aka 'long unsigned int'}
[-Wformat=]
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
sntp_request() was deprecated and superceded by sntp_query(), which
provides better time resolution.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
sntp_request() was deprecated and superceded by sntp_query(), which
provides better time resolution.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Synchronising the init procedure to initialise the mesh
state only after the settings have been loaded.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
After receiving Generic Level Move set/set_unack message, generic
level state should move towards positive or negative extreme end
(which is depend upon sign of delta value) till it not get interruped.
This commit has introduced this feature.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
If Node Lightness is in downward transition & received Generic
onoff message to set state equal to 1 then Node transaction get
stopped in between. Ideally it should reach to default lightness
value if it is non-zero. This commit has solved this bug.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
This commit upgrade the implementation to reduce complexity in
algorithm. Previously there was different timers for lightness
as well as temperature transitions. But at time only single
transition is remain activated & hence there is no need
of multiple timer for each entiity.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Added .inf driver file for Windows.
CDC examples will now work on Windows.
Note:
This .inf is not signed and may cause problems during installation.
Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
Unique PID is required for each sample in order
to be recognized by host.
When creating a new sample:
- Add USB_PID_<SAMPLE_NAME>_SAMPLE
in samples/subsys/usb/usb_pid.Kconfig
- Create Kconfig file in your sample's subdirectory, containing:
config USB_DEVICE_PID
default USB_PID_<SAMPLE_NAME>_SAMPLE
source "Kconfig.zephyr"
Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
Add a sample application for showcasing the functionality of the
Holtek HT16K33 LED driver with keyscan functionality.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
The approved trademark name is Wi-Fi so update references to WiFi and
other spellings to Wi-Fi in documentation and Kconfig help strings.
(Note that use of spelling variatios of "wifi" in module names, CONFIG
names, link names and such are untouched.)
https://www.wi-fi.org/
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Adds required Kconfig options for flash driver.
Adds FatFS filesystem for flash disk.
Fixes#14459.
Note: As USB MSC does not support multiple disks (see #14937),
only one (flash by default, modify CONFIG_MASS_STORAGE_DISK_NAME
to "RAM" for RAM disk) will appear to host.
Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
Inside void main(void) result of function sensor_trigger_set() is not
checked which might result that function can't set sensor type
and that error can't be handled.
Coverity-CID: 186196
Signed-off-by: Maksim Masalski <maxxliferobot@gmail.com>
According to the Apple iBeacon spec chapter "2.1 Advertising Packet",
"beacons must use a non connectable undirected Advertising PDU,
ADV_NONCONN_IND". Refer to https://developer.apple.com/ibeacon/
Signed-off-by: Aaron Tsui <aaron.tsui@outlook.com>
settings_read_cb is defined to return ssize_t and not size_t. This
also eliminates several Coverity warnings.
Fixes#15765Fixes#15768Fixes#15771Fixes#15774Fixes#15778
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This makes use of BT_GATT_SERVICE_DEFINE to statically define services
for services that are not required to be dynamically registered.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Major changes are:
- Expose settings backend API to enable custom backend support.
- Add a new CONFIG_SETTINGS_CUSTOM backend to allow registering a custom
backend.
- Change api of the handlers h_set() routines to allow for
backend-specific read callbacks.
- Provide a customizable settings_backend_init() routine for custom
backends.
- Move runtime settings support to be its own backend.
Signed-off-by: François Delawarde <fnde@oticon.com>
Allow for including arbitrary data in net_icmpv6_send_echo_request()
that will be echoed verbatim by the receiver.
This allows to use ICMP echo for diagnostic use cases, e.g. by testing
packet framentation (large payload) or measuring round-trip-time.
Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
main function is not necessary.
And without main here, it is possible to import these
samples zperf files in another project.
Signed-off-by: Bub Wei <bub.wei@unisoc.com>
1. Output what steps the app performs, so it doesn't look to user
that it simply hanged.
2. Don't use infinite timeouts, because that will hang.
3. Clearly note which requests are for IPv4 vs IPv6 server.
4. Define IPv4 gateway. This sample is configured to run against
SNTP on local Linux host, but standard distros (e.g. Ubuntu) don't
run SNTP server by default, so usual outcome for running this sample
will be timeout. A realistic way to get successful output would be
to run it against a server on the Internet, for what a gateway is
required.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
The function net_pkt_get_info() is found in net_pkt.h and not
in buf.h. This caused
"implicit declaration of function ‘net_pkt_get_info’"
warning if CONFIG_NET_BUF_POOL_USAGE was enabled.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Migrate from "legacy" PCI support (drivers/pci) to new PCI(e) support.
The e1000 driver is merely for testing with QEMU and so should not be
a model for the use of PCI(e) functions. Consult instead "real-world"
PCI(e) drivers like the NS16550 UART (drivers/serial/uart_ns16550.c).
Signed-off-by: Charles Youse <charles.youse@intel.com>
In this commit, a config.h header file is added to support the case
when the NET_CONFIG_SETTINGS is not used. main.c is also modified to
enable platforms that do not support IPv6. These changes are necessary
in order to allow cc3220sf_launchxl support.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Sample code for AMS (Austria Micro Systems) ENS210 temperature and
relative humidity sensor.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
Sample code for AMS (Austria Micro Systems) Indoor Air Quality Sensor
reading VOC and equivalent CO2 values.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
In order to generalize the currently specialized nRF51 IC setup hook,
make the following changes:
- Generalize the hook to bt_ic_setup()
- Use a weak NOP version by default
- Move the currently existing one to the board folder
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Enable the GPIO reset pin feature of nrf52840_pca10090
on pin P1.02 and the wait NOP feature of the controller.
These are used to let nrf9160_pca10090 synchronize the
HCI communication with nrf52840_pca10090 controllers.
Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
The patch provides flash offsets appropriate for running
this sample on nrf9160_pac10090 targets.
As that sample is small one, it is done with assumption that image_1
flash partition is empty.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Write protection was not disabled prior erase call.
It used to work before only because nrf driver had not check
the protection before erase execution. This behavior was changed in
order to align to zephyr - which implied requirement for this test fix.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
To support mass storage over USB in RAM we need a board with
sufficient RAM. Fix failing tests for boards with low memory.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Enable harness so we can execute smoke tests on the hardware with
command line:
sanitycheck --device-testing --device-serial /dev/ttyACM0 -p <BOARD>
-T samples/subsys/usb/hid
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Fixed using chipselect with seperate chipselect GPIOs and how they were
referenced from/in DeviceTree.
Also configure the device during initialization so it's ready to go
after init.
Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
Project configuration to run the CAN sample with the MCP2515 attached
via SPI as the CAN controller.
Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
This commit enable Bluetooth SMP Service which will help
us to do Device Firmware Upgrade over thr air. By default
it is not enable.
Reference: $zephyr/samples/subsys/mgmt/mcumgr/smp_svr
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Add config overlay for cdc_acm+dfu composite configuration.
Manual configuration over menuconfig may be error-prone for
the user because then FLASH_LOAD_OFFSET and FLASH_LOAD_SIZE
should also to be set to appropriate values.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
In order to fit in SRAM, reduce the CONFIG_BT_MAX_CONN from 20 to 16 in
the configuration used for the BBC micro:bit.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Implement the Controller counterpart to CONFIG_BT_WAIT_NOP so that it
issues a NOP Command Complete event after booting up, to signal to the
Host that it is ready to receive HCI traffic.
Fixes#15333
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Currently coverage is enabled only in platforms which dont have
multiple memory regions. This sample was designed to emulate
different memory regions. This in conjunction with gcov which
might instrument data in different memory regions will not work
as expected. Therefore disabling gcov for this sample.
Fixes: GH-15107
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
We have actual tests now under tests/kernel/mem_protect/userspace
and tests/kernel/mem_protect/mem_protect that exercise all the
memory domain APIs. This old test is superfluous.
Fixes: #15178
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Update the files which contain no license information with the
'Apache-2.0' SPDX license identifier. Many source files in the tree are
missing licensing information, which makes it harder for compliance
tools to determine the correct license.
By default all files without license information are under the default
license of Zephyr, which is Apache version 2.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Unlike CONFIG_HW_STACK_PROTECTION, which greatly helps
expose stack overflows in test code, activating
userspace without putting threads in user mode is of
very limited value.
Now CONFIG_TEST_USERSPACE is off by default. Any test
which puts threads in user mode will need to set
CONFIG_TEST_USERSPACE.
This should greatly increase sanitycheck build times
as there is non-trivial build time overhead to
enabling this feature. This also allows some tests
which failed the build on RAM-constrained platforms
to compile properly.
tests/drivers/build_all is a special case; it doesn't
put threads in user mode, but we want to ensure all
the syscall handlers compile properly.
Fixes: #15103 (and probably others)
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
More buffers are need to build for sam_e70_xplained board
to work out of the box. Added board specific conf file.
Fixes#15096
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Patch 8af3df3519 changed logic and did not take into account 2 extra
bytes.
...
Precise data bus error
BFAR Address: 0x766e4900
***** Hardware exception *****
Current thread ID = 0x200004e8
Faulting instruction address = 0xddf4
Fatal fault in thread 0x200004e8! Aborting.
...
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Merge cb_usb_status_composite and cb_usb_status and use common
forward_status_cb for both composite and normal devices.
Fixes#14882
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
telnet_console driver is not compatible with new shell module, hence is
not working. Switch the telnet sample to use new TELNET shell backend.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
net_pkt_sendto uses size_t as parameter for len so the value would be
treat as unsigned which may cause and invalid memory to be read.
Fixes#14950#14955
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This patch enables the GPIO driver by default on all boards equipped
with an nRF SoC (all boards having `CONFIG_SOC_FAMILY_NRF=y` in their
`_defconfig` file).
In vast majority of cases the driver is needed, so it is more
convenient to enable it at board level than in particular
applications.
And if the driver is undesired for some reason, it can be still
disabled in the application config.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
There are two sensor samples be modified for a more explicit log when
no sensor connected or not connected correctly. Rather than a horrible
hardware fault, which may misleading beginner.
1. bme280
2. sx9500
Signed-off-by: Aaron Tsui <aaron.tsui@outlook.com>
Updated test harness to check for a second instance of
"Watchdog sample application". This is to confirm the
board did reset itself.
Signed-off-by: Cinly Ooi <cinly.ooi@intel.com>
The IV Index is always a 32-bit value, so using u16_t for it was
confusing. Create a define for it, similar to other constant values,
to get rid of this confusion.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Adding a section to the sample's documentation to give some specific
instructions on how to try it with TLS enabled. This should be helpful
for users who are not knowledgeable with regards to creating/setting up
TLS certificates.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Rename power managment subsystem Kconfig options describing minimum
residency to make them easier to identify with respective policy.
Following is a detailed list of string replacements used:
s/SYS_PM_SLEEP_(\d)_MIN_RES/SYS_PM_MIN_RESIDENCY_SLEEP_$1/
s/SYS_PM_DEEP_SLEEP_(\d)_MIN_RES/SYS_PM_MIN_RESIDENCY_DEEP_SLEEP_$1/
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
Add SYS_POWER_ prefix to HAS_STATE_SLEEP_, HAS_STATE_DEEP_SLEEP_
options to align them with names of power states they control.
Following is a detailed list of string replacements used:
s/HAS_STATE_SLEEP_(\d)/HAS_SYS_POWER_STATE_SLEEP_$1/
s/HAS_STATE_DEEP_SLEEP_(\d)/HAS_SYS_POWER_STATE_DEEP_SLEEP_$1/
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
This commit cleans up names of system power management functions by
assuring that:
- all functions start with 'sys_pm_' prefix
- API functions which should not be exposed to the user start with '_'
- name of the function hints at its purpose
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
There exists SoCs, e.g. STM32L4, where one of the low power modes
reduces CPU frequency and supply voltage but does not stop the CPU. Such
power modes are currently not supported by Zephyr.
To facilitate adding support for such class of power modes in the future
and to ensure the naming convention makes it clear that the currently
supported power modes stop the CPU this commit renames Low Power States
to Slep States and updates the documentation.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
This sample did not enable gpio driver, so nothing happens after flash
firmware into a board.
By enabling gpio driver to fix it.
Signed-off-by: Aaron Tsui <aaron.tsui@outlook.com>
Making a clean slate for some pylint CI tests. Only enabling relatively
uncontroversial stuff.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Add qemu ethernet driver overlays for big_http_download and
dumb_http_server samples, which are default integration samples/
tests for TCP stack. This change follows up after similar addition
of such overlays to other samples (and smsc911x overlay addition
to these samples).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Clarify what iPerf version was used when testing this sample
application. It was iPerf 2.0.9 which worked ok, for example
iPerf 2.0.13 did not work properly with UDP uploader (client)
mode.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Try to construct a proper iperf client header to the payload
as the server expects that. It is not sure if this is needed
or correct as there is no proper documentation for the iPerf2
protocol.
Fixes#14665
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Try to construct a proper iperf client header to the payload
as the server expects that. It is not sure if this is proper
way to do the iperf header as there is no documentation about
iPerf protocol anyway (except the iPerf source code).
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Instead of relying on overlays which requires to write overlay for
every board (100+) define console device name.
Fixes#14698
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
If there are several queued interrupts we can miss some of them. Use
while() loop to catch them all.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
The 14 individual cases that use these four config files are now
passing reliably when SMP is enabled, after the "Mark sleeping threads
suspended" scheduler fix. Turn it back on.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Checking the return of sensor_trigger_set and if it fails log the
problem and exits.
Coverity CID: 186196
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
net_pkt_read may fail in which case the error shall be reported back
instead of always assuming the whole packet was read.
Fixes#14817
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The dhcpv4-client is more usable if it has net-shell. For testing
with qemu_x86, the e1000 overlay config is very useful.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Changing the example to not use IPv6 when it is not configured,
given IPv6 is not enabled on some platforms such as cc3220sf_launchxl.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
A few more test cases that are measurably unreliable when run in SMP.
For the most part these work most of the time (though the semaphore
one was pretty borderline -- I measured about 25% failures), but are
measurably unstable against the backdrop of known qemu instability.
Something is clearly going on and we need to come back to these to fix
threadsafety issues.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
`CONFIG_NET_L2_BT` no longer forces required BT configuration, but
depends on a user to set a valid configuration instead. Hence, we
need to select a proper configuration in the overlay config file.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This patch adds the overlay when the echo-server is running on Linux and
echo-client is running on Qemu.
Fix: #14654
Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
And also to the relevant callbacks.
That parameter is not used anywhere so it is useless.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Now that legacy - and unrelated - function named net_pkt_get_data has
been removed, we can rename net_pkt_get_data_new relevantly.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Now that legacy functions are removew, let's rename the new functions by
removing the _new suffix.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This sample is often the first one used as reference for Bluetooth
Mesh, so it should have a good configuration as a starting point.
Comment out the LPN options to eliminate Kconfig warnings, since the
LOW_POWER option they depend on is not enabled. Also disable
INIT_STACKS since that's only needed for fine-tuning the app
configuration, and otherwise only causes unnecessary spam in the
console.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The sample was bitrotted because sample.yaml was missing and no
build checks were done, so we missed the case when TCP header
API function was removed. This is now fixed by using still available
UDP header API (to get the port numbers). Also fixing debug print
as it were giving compile warnings.
Fixes#14608
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The sanitychecker needs sample.yaml in order to compile test
the promiscuous mode sample application.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
It's not necessary for this sample to output to the user
(it uses printf) and saves over 5K of ROM size, eliminating
some build failures on Quark D2000.
Fixes: #14476
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The current flash configurations for all nRF52840's in Zephyr is
VERY constrained when it comes to allowing samples any space for
storage or custom areas. It only leaves the last 4 pages of flash
for "storage".
The nRF52840 is also capable of using OpenThread which defaults
to using the last 4 pages of flash for storing OpenThread-related
network data.
This means that while using OpenThread under any configuration
designed to use mcuboot partition slots, there is no space left
over for storage of any kind.
Let's adjust the partition table to set storage at 8 pages of
flash (32k). This fixes the conflict with OpenThread and leaves
room for future use cases that may arise.
Signed-off-by: Michael Scott <mike@foundries.io>
It was possible to freeze the application by pressing the user button
too frequently. This was likely due to the stack not keeping up with
the send requests and running out of buffers.
Add rate-limiting to the app, so that at most one message per 500ms
can be sent. Also add a user message if the user presses the button
too many times in rapid succession, and inform the other badges of
this misbehaving user.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Linking to API material requires knowing the pecularities of how
doxygen, sphinx, and breathe work. In an attempt to hide some of this
we're preparing the current docs to allow use of configuration defaults
that will let us more simply use a default role that will hunt for a
reference target in the various domains that are available by using a
default "role" of "all". This will let us use the simple notation
`functionname` or `typename` without fully specifying the reference as
:c:func:`functionname`.
This patch cleans up exising docs that were (incorrectly) using single
backtics where double backtics should have been used, and also found
some typos (such as a space between the role name and the reference,
such as :file: `filename`, and a missing colon such as
c:func:`functionname`)
This is a start to address issue #14313
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The existing device_set_power_state() API works only in synchronous
mode and this is not desirable for devices(ex: Gyro) which take
longer time (few 100 mSec) to suspend/resume.
To support async mode, a new callback argument is added to the API.
The device drivers can asynchronously suspend/resume and call the
callback function upon completion of the async request.
This commit adds the missing callback parameter to all the drivers
to make it compliant with the new API.
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
No need to build the net_pkt, just send the buffer directly.
Let's reuse already parsed ip/proto headers as well.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
No need to build the net_pkt, just send the buffer directly.
Let's reuse already parsed ip/proto headers as well.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Using new net_pkt r/w API and so on.
This sample would still need to be using socket API instead.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Configure lvgl defaults for imx rt boards in their respective board
defconfigs rather than the lvgl sample application.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The CANBUS sockets require "struct can_frame" to be used in order to be
compatible with Linux code.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The CANBUS sockets require can_filter to be used in order to be
compatible with Linux code.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Added a warning that will abort build without disks.
Added a default configuration for nrf52840_pca10056.
Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
This patch checks the return values of setsockopt.
Fixes: #14392, #14402
Coverity-CID: 195897, 195848
Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
Overhaul the Bluetooth documentation to split it into manageable units
and include additional information, such as architecture and tooling.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
As there is no shell submodules any more, the "zperf" command
needs to be written in every command.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Remove use of select to "force" enabling other configs in subsys/fs
and subsys/net/l2. The forcing will cause infinite kconfig recursion.
Signed-off-by: Thomas Stenersen <thomas.stenersen@nordicsemi.no>
Patch (3206568e43) changed network
interface numbering starts from 1. The index 0 is reserved.
So use api to get default interface index for packet socket sample.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
This commits adds an overlay file with the SOCKS5 symbol that is needed
to run MQTT with a proxy, and extends README with instructions on how to
use it with the default and custom settings.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
Update reserved function names starting with one underscore, replacing
them as follows:
'_k_' with 'z_'
'_K_' with 'Z_'
'_handler_' with 'z_handl_'
'_Cstart' with 'z_cstart'
'_Swap' with 'z_swap'
This renaming is done on both global and those static function names
in kernel/include and include/. Other static function names in kernel/
are renamed by removing the leading underscore. Other function names
not starting with any prefix listed above are renamed starting with
a 'z_' or 'Z_' prefix.
Function names starting with two or three leading underscores are not
automatcally renamed since these names will collide with the variants
with two or three leading underscores.
Various generator scripts have also been updated as well as perf,
linker and usb files. These are
drivers/serial/uart_handlers.c
include/linker/kobject-text.ld
kernel/include/syscall_handler.h
scripts/gen_kobject_list.py
scripts/gen_syscall_header.py
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
A new role :zephyr_file: is available that renders to a link to the file
or folder in GitHub. Find appropriate references using :file: and
convert to :zephyr_file: to take advantage of its linking capability.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The VLAN documentation had double wording and proper links to files
in github was missing, which did not look good in the rendered HTML
page.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
CONFIG_IEEE802154_CC2520_AUTO_ACK seems to creep back in, but has long
since be removed. We remove old references a few times.
Commit 2facf33f28 - "net: ieee802154: Remove old cc2520 AUTO_ACK
assignments".
Remove them again.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This patch adds more error checking and handling for socket APIs.
Fixes: #13885
Coverity-CID: 190928
Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
CONFIG_NET_DHCPV6 doesn't exist so remove references to it in the
sample, leave comments about TODO if/when this might exist.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
CONFIG_DCD_DSR does not exist so the code block associated with it would
never be built, so remove it.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
We need to set CONFIG_HW_STACK_PROTECTION=y, instead of the
internal symbol CONFIG_MPU_STACK_GUARD, in order for fatal.c
to be able to parse the error code. MPU_STACK_GUARD is,
anyway selected if HW_STACK_PROTECTION is set.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This example combines 2 HID classes and 2 CDC ACM classes to create
a composite, multi-instance device.
Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
Most of the basic tests trigger LEDs or expect button press and would
hang in device testing because we can't parse success or failure from
the console. Define harness for this with the intent to skip those in
sanitycheck device testing and until we have a better way to test those.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Some boards' configuration does not enable GPIO by default,
like nrf52_pca10056, it causes ASSERTION FAIL when running
this application. This fix is to enable GPIO by default for
the basic threads sample, like basic blinky sample does.
Signed-off-by: Aaron Tsui <aaron.tsui@outlook.com>
We are doing math of two 32-bit numbers and assigning into a 64-bit
result. Add explicit cast of one of the values being multipled to get
explicit promotion.
Fixes: #13883
Coverity CID: 190930
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The return from ipm_set_enabled wasn't assigned to 'status' so the check
right after the call to ipm_set_enabled() wasn't doing the right thing.
Fixes: #13881
Coverity CID: 190932
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Port all users of 'set_conf_file' to use the built-in rules
instead. This follows the convention-over-configuration principle to
make the system as a whole simpler and more consistent.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
(Chunk 1 of 3 - this patch was split across pull requests to address
CI build time limitations)
Zephyr has always been a uniprocessor system, and its kernel tests are
rife with assumptions and outright dependence on single-CPU operation
(for example: "low priority threads will never run until this high
priority thread blocks" -- not true if there's another processor to
run it!)
About 1/3 of our tests fail right now on x86_64 when dual processor
operation is made default. Most of those can probably be recovered on
a case-by-case basis with simple changes (and a few of them might
represent real bugs in SMP!), but for now let's make sure the full
test suite passes by turning the second CPU off. There's still plenty
of SMP coverage in the remaining cases.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
If bind() fails or TX thread cannot start, then cleanup the
socket by calling close()
Coverity-CID: 191003
Fixes#13824
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
commit ddf744deee ("drivers: pwm_nrfx: Use Device Tree label as
instance name") removed the config setting for PWM names and replaced
it with DT_NORDIC_NRF_PWM_PWM_*_LABEL.
This change is causing the blink_led and fade_led samples to break
when compiled for nRF52 boards.
Let's update the samples to use the DT setting.
Signed-off-by: Michael Scott <mike@foundries.io>
We have a great number of samples now, using different port numbers,
etc. Let them be self-documenting and print out port number used.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Added support for remote wakeup in hid_mouse example.
If rempote wakeup support is enabled, wakeup request
is performed on every button click when the bus in suspended state.
Signed-off-by: Paweł Zadrożniak <pawel.zadrozniak@nordicsemi.no>
The intent of this Kconfig is to allow libc stdout
functions like printf() to send their output to the
active console driver instead of discarding it.
This somehow evolved into preferring to use
printf() instead of printk() for all test case output
if enabled. Libc printf() implementation for both
minimal libc and newlib use considerably more stack
space than printk(), with nothing gained by using
them.
Remove all instances where we are conditionally
sending test case output based on this config, enable
it by default, and adjust a few tests that disabled
this because they were blowing stack.
printk() and vprintk() now work as expected for
unit_testing targets, they are just wrappers for
host printf().
Fixes: #13701
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
CPU_LPS_n name used to indicate a low power state is cryptic and
incorrect. The low power states act on the whole SoC and not exclusively
on the CPU. This patch renames CPU_LPS_n states to LOW_POWER_n. Also
HAS_ pattern for Kconfig options is used in favor of a non standard
_SUPPORTED. Naming of deep sleep states was adjusted accordingly.
Following is a detailed list of string replacements used:
s/SYS_POWER_STATE_CPU_LPS_(\d)_SUPPORTED/HAS_STATE_LOW_POWER_$1/
s/SYS_POWER_STATE_CPU_LPS_(\d)/SYS_POWER_STATE_LOW_POWER_$1/
s/SYS_POWER_STATE_DEEP_SLEEP_(\d)_SUPPORTED/HAS_STATE_DEEP_SLEEP_$1/
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
This commit removes dependency on SYS_POWER_LOW_POWER_STATES_SUPPORTED,
SYS_POWER_DEEP_SLEEP_STATES_SUPPORTED Kconfig options. Power management
SYS_POWER_LOW_POWER_STATES, SYS_POWER_DEEP_SLEEP_STATES options depend
now directly on specific power states supported by the given SoC. This
simplifies maintenance of SoC Kconfig files.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
Follow the pattern we have for other peripherals in that if the driver
class (CAN) is enabled than enable the driver for that class
(CAN_STM32). Also have the STM32 CAN driver depend on being on a STM32
SoC.
Remove setting of CONFIG_CAN_STM32 in any .conf files as it will get set
of CONFIG_CAN is set/enabled.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add missing CONFIG_GPIO required by the nRF52 board-specific Bluetooth
Mesh On/Off application sample.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
This is an integral part of userspace and cannot be used
on its own. Fold into the main userspace configuration.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
System workqueue stack was not large enough to handle DTLS handshake,
which lead to system crash.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
In order to follow the naming from Linux, change the name of
can_msg to zcan_frame, and can_msg_filter to zcan_filter.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add new "struct can_frame" which is compatible with Linux so that it
is easier to port socket-can applications from Linux.
Rename existing can_filter to can_msg_filter so that the name will
not conflict with Linux compatible can_filter struct.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This patch removes the free space calculation from nvs initialization.
The available space can be calculated if required using the routine
nvs_calc_free_space.
This patch also removes the locked state of nvs, it is not possible to
get in a locked state.
This patch adds an extra check on the sector_size configuration and only
allows operation on nvs when nvs has been initialized.
This patch also solves issue #13369, the usage of FLASH_ERASE_BLOCK_SIZE
has been replaced with the flash page api.
Changes:
Removed locked state and free_space from the nvs structure.
nvs_reinit(): has been replaced with by an internal only function
_nvs_startup().
nvs_write(): removed the possibility to place the file system in a
locked state, if to many gc operations are required it will return
-ENOSPC.
ssize_t nvs_calc_free_space(): introduced, calculates the free space
that is available in the nvs file system.
Removed define LOG_LEVEL.
Rebased to current master.
Signed-off-by: Laczen JMS <laczenjms@gmail.com>
Remove most unnecessary instances of `export` and `cmake` use that can
instead be replaced with `zephyr-app-commands` or similar. This is to
avoid documentation using different mechanisms to describe the same
actions and in preparation for documenting `west build` everywhere.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Reverted unwanted documentation change on usb dfu sample.
Changes was introduce accidentally within PR #13475
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Add more information about DNS resolver to documentation. Move
generic DNS information from the sample application into DNS
resolver documentation.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Remove DCACHE_WRITEBACK Kconfig variable from DMIC sample app project
Cache configuration is fixed and the cache operation routines
internally take appropriate action based on the cache configuration.
Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
Added more detailed information how to connect Zephyr instance
to host system like Linux desktop.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Macros are replaced by C++ friendly versions:
- SHELL_CREATE_STATIC_SUBCMD_SET by SHELL_STATIC_SUBCMD_SET_CREATE
- SHELL_CREATE_DYNAMIC_CMD by SHELL_DYNAMIC_CMD_CREATE
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
It is planned to deprecate SHELL_CREATE_STATIC_SUBCMD_SET macro
which is replaced by SHELL_STATIC_SUBCMD_SET_CREATE.
Additionally, removed irrelevant comments about alphabetical
ordering which is no longer needed.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit adds better description to the Kconfig options
configuring residency-based power policy.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
Some of power states used numerical suffix while otthers not.
This commit adds proper suffix to all power state names.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
f
This commit simplifies OS <-> Application interface controlling power
management. In the previous approach application-based PM required
overriding sys_suspend() and sys_resume() functions. As these functions
actually implemented power state change, in such case application
basically had to provide own implementation of all PM-related stuff,
which was not portable and hard to maintain.
This commit changes this scheme: The sys_suspend() and sys_resume()
are now system functions while the application could either use
built-in power management policies or provide its own. All details
of power mode switching are now handled by the OS.
Also, this commit cleans up the Kconfig options related to system-level
power management grouping them under common CONFIG_SYS_PM_ prefix.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
Documentation for a sample application to demonstrate audio
capture and playback on an Intel S1000 CRB connected to a
host over I2S.
Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
Sample application to demonstrate 2-way audio capture/playback from a
host connected over I2S to S1000
Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
This function conflicts with a function of the same name in mcuboot.
This happens when building USB DFU support into mcuboot.
DFU over USB uses image manager and mcuboot internals to manage images
downloaded to the device.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Use the state machine states to determine if the session has ended.
This way zperf will properly reply stat packet to remote client even if
duration of the session is non zero.
Also we don't need to update counter (received packet number) at end of
the session.
Note: if id < 0, it means session end, otherwise it's session ongoing.
(id is the first feild of application data from remote client).
Signed-off-by: Bub Wei <bub.wei@unisoc.com>
The net-app based echo-server/client applications were used for
various smoke testing purposes. As those two apps are now removed
we need to introduce the same support into sockets based echo-client
and echo-server applications.
Fixes#13300#13481
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Updated I2S sample app for Intel S1000 CRB to loopback
the audio from host in addition to playing audio out to codec
When AUDIO_PLAY_FROM_HOST=Y, audio from host is both looped back
and played out to codec
When AUDIO_PLAY_FROM_HOST=N, audio from host is looped back and
app generated ones are played out to codec.
Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
There are issues using lowercase min and max macros when compiling a C++
application with a third-party toolchain such as GNU ARM Embedded when
using some STL headers i.e. <chrono>.
This is because there are actual C++ functions called min and max
defined in some of the STL headers and these macros interfere with them.
By changing the macros to UPPERCASE, which is consistent with almost all
other pre-processor macros this naming conflict is avoided.
All files that use these macros have been updated.
Signed-off-by: Carlos Stuart <carlosstuart1970@gmail.com>
Update the filters that are extracting info from DT to use a define that
has a DT_ prefix so its clear that its coming from DT_. Also this lets
us remove any non-DT prefixed defines in the conf db.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
It could happen that bluetooth samples fail because of stored LTK
on device used to test the sample (eg smartphone).
Add a note in bluetooth sample doc to inform users of this trick.
Fixes#13034
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Added a sample app to play audio over I2S through an onboard
Audio DAC on an Intel S1000 CRB.
Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
In order to enable build of stm32f7 flash driver in sanitytests,
add nucleo_f746zg to flash_shell platform whitelist.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
If nvs sample is run once until max reboot value, the next time it is is
ran on the same board, it will not behave as expected as code will
read reboot counter set to max value and will stop there.
In order to avoid the operation to wipe the flash manually between
2 runs of the test, add a clean termination to the test by resetting
the reboot counter before exiting.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
On my build host (where apparently the Python has a different version
of yaml than CI) this test is producing schema faiulres from the YAML:
E: samples/drivers/counter/alarm/sample.yaml: can't load (skipping):
<SchemaError: error code 2: Schema validation failed:
- Value 'None' is not of type 'str'.
Path: '/tests/test/harness_config/regex/1'.: Path: '/'>
The bug seems to be that the regex must be a list of strings, and the
empty list element is being parsed as a python None. Just remove,
presumably the intent was an empty string, which is a noop in a regex
anyway.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit changes the names of SYS_POWER_DEEP_SLEEP* Kconfig
options in order to match SYS_POWER_LOW_POWER_STATE* naming
scheme.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
The SYS_POWER_LOW_POWER_STATE_SUPPORTED and SYS_POWER_LOW_POWER_STATE
suggests one low power state but these options control multiple
low power state. This commit uses plural in the names to indicate
that.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
This commit extends the power_mgr sample in order to demonstrate
power state forcing using the sys_pm_force_power_state() API.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
Use DT_FLASH_ERASE_BLOCK_SIZE prefixed defined instead of
FLASH_ERASE_BLOCK_SIZE as the non-DT version is deprecated.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The code has been using non DT_ prefixed defines for DT generated
defines. Switch to use DT_ prefixed ones as we want to deprecated
the non DT_ prefixed defines.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This application provides a full stack implementation for
communicating with the Google IOT Cloud. It leverages the
a JWT library to create JSON tokens which are then signed using
a RSA or ECDSA private key. The signed token is used to
authenticate with the Google IOT cloud servers. Once that is
accomplished, the application can subscribe, or publish data at
will.
Included in the application is a python script that can be used to
create RSA/ECDSA certificates and keys. The user will load the
certificate for the appropriate device on the Google IOT Cloud. The
private key is created by the script and stored in a C structure format
that is then consumed by the application. It is important to note that
any keys generated from the scripts SHOULD NOT BE STORED publicly.
Please refer to the README for more information.
Signed-off-by: David Brown <david.brown@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Shell will store only pointer to the prompt string instead of
copying it to the RAM buffer. It will save RAM memory and
it will simplify implementation of a new feature: "select"
command. When a command will be selected than shell will
display command syntax as a prompt.
Removed obsolete ASSERT check in a static function.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
This is hitting a stack overflow (probably the same reason xtensa is
also excluded -- both are stack-hungry platforms), but with CMSIS
there is a fixed cap of 512 bytes that can't be extended. So
whitelist this sample.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Add sample creating 2 serial USB ports and establishing communication
between those 2 ports.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
If appropriate configuration is enabled, assume (with the default
configuration) that the proxy server uses the same address as the broker
and the default 1080 port.
The default settings can be changed in the configuration header.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
This was never a long-term solution, more of a gross hack
to get test cases working until we could figure out a good
end-to-end solution for memory domains that generated
appropriate linker sections. Now that we have this with
the app shared memory feature, and have converted all tests
to remove it, delete this feature.
To date all userspace APIs have been tagged as 'experimental'
which sidesteps deprecation policies.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
CONFIG_APPLICATION_MEMORY was a stopgap feature that is
being removed from the kernel. Convert tests and samples
to use the application shared memory feature instead,
in most cases using the domain set up by ztest.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
IPv4 is not needed for packet socket sample. Previous commit
helps to remove dependencies.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Use the new i2c_write_read() wrapper to simplify the code.
Also add several overlays used to test the sensor on a variety of
boards, and conf file support for trigger testing.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Adds board configurations to support the mimxrt1050_evk and
mimxrt1060_evk boards in the lvgl sample.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Fixes the lvgl sample to use the same display device name as the lvgl
library rather than a hardcoded string.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
With this commit, it is now possible that if (for e.g.) lightness
transition is interrupted by temperature transition (which could
be instantaneous or non-instanstaneous) then as soon as temperature
transition get over, then algorithm would achieve target value
of lightness.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Add a sample demonstrating usage of the APA102 driver, heavily based
on led_ws2812. Tested on nucleo_l432kc with an Adafruit DotStar strip.
Signed-off-by: Marc Pignat <marc@absintheaudio.com>
There is a apa102 driver, and an upcomming patch will provide a sample
for using it, but let's keep the bitbang version which is intersting.
Signed-off-by: Marc Pignat <marc@absintheaudio.com>
Sample application which opens a packet socket and receives
every packet on the wire and send some dummy packet over
socket. Simple demo of how to use packet sockets.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Added sample to show disk access and FS api with
Fat filesystem and SDHC driver. Tested working with
nrf52840 (blip).
Signed-off-by: Tavish Naruka <docuser@docs.electronut.in>
This commit enhances the power_mgr sample by adding code
presenting power state locking API as well as its effect
on the decisions made by the Power Management Policy.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
Indicate that PWM is supported on several Nordic DK boards so that
the pwm_nrf5_sw and pwm_nrfx drivers are covered by CI builds.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Enable HW PWM driver instead of the SW one on nRF SoCs where the PWM
peripheral is present.
Default PWM instances are also enabled on Nordic DK boards so that it
is possible to build the basic fade_led sample for them without extra
adjustments.
After the above changes are applied, some configuration alterations
in basic samples blink_led and fade_led become no longer needed.
These are removed. And the blink_led sample is corrected so that it
works with the nRF HW PWM driver as well.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
To avoid confusion, callbacks using ordinal pin numbers
is going to be reverted. So the driver has to be re-worked
to expose multiple devices so each device has 32 pins.
Also fixes#12765
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Add section for build sanity check configuration with
CONFIG_USB_COMPOSITE_DEVICE enabled.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Add configuration for creating composite USB device with CDC ACM and
Mass Storage functions.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
New shell does not need either CONFIG_UART_CONSOLE
or interrupts support to be working. Only CONFIG_SERIAL
in combination with CONFIG_UART_SHELL_ON_DEV_NAME are required.
Updated sample yaml file accordingly.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
As we are removing net_app and net_pkt based libraries and
applications, CoAP legacy based libraries and apps are moved
to socket based implementations. So removing legacy CoAP.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
This commit fixes the following issues introduced when switching to
the new SPI API in commit e7de85b534:
- the SPI slave operating mode (and support for it) was not properly
selected (the setting was missing in the sample probably because
the old nRF SPI slave driver used in this sample was not checking
the requested mode at all)
- the `txmsg` buffer filled with 0xFF values in the `bt_tx_thread`
function was improperly used afterwards in `spi_send` to transmit
the slave header frame
- the common structures defining buffers for SPI transactions (`tx`
and `rx`) were modified in `spi_send` before the corresponding
semaphore was taken, resulting in data corruption
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Convert the hci_spi sample to get the SPI and GPIO settings from Device
Tree instead of Kconfig.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
The sample was defining a #define with a CONFIG_ prefix but this wasn't
coming from Kconfig. Change the define name not to conflict with the
Kconfig CONFIG_ namespace.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
As we want to remove dts dependency on Kconfig, we had a case based on
CONFIG_BOOTLOADER_MCUBOOT. From a DTS point of view that was just
getting the chosen property 'zephyr,code-partition' set. We can easily
move this to the actual dts files and remove the mcuboot.overlay.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
gpio_port_* functions are being deprecated. Convert boards/altera_max10
sample to use gpio_pin_* functions instead.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
If status is 0, both ip_hdr and proto_hdr will own a pointer to the
relevant IP and Protocol headers. In order to know which of ipv4/ipv6
and udp/tcp one will need to use respectively net_pkt_family(pkt) and
net_context_get_ip_proto(context).
Having access to those headers directly, many callbacks will not need
to parse the packet again no get the src/dst addresses or the src/dst
ports. This will be change after this commit.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Use auto-generated device tree macros in LPS25HB driver to avoid
usage of dts.fixup code for it.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Use auto-generated device tree macros in LSM6DS0 driver to avoid
usage of dts.fixup code for it.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
As example of echo_async_select added recently shows, we no longer
need to define a logger unconditionally in each source file. These
samples are intended to show Zephyr compatibility with POSIX sockets
API, so the less there're differences between Zephyr vs POSIX
ifdefs, the better.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
The LwM2M library has moved from the network application library
APIs to BSD socket APIs. Let's make the needed changes in the
LwM2M sample to follow those changes.
Signed-off-by: Michael Scott <mike@foundries.io>
Now that the security data can be loaded into and used from the
security / server objects, we can add support for LwM2M bootstrap.
This is a mode where initially a connection can be made to a server
which can update several LwM2M (including security and server
data) and then trigger a "bootstrap complete". Once this happens
the client will start it's connection process over but now with
the new information.
Signed-off-by: Michael Scott <mike@foundries.io>
In order to support bootstrap mode, we need to store server data
in the security / server objects. Once the connection to the
bootstrap server is made, it will clear these objects and add
new server connection data.
Signed-off-by: Michael Scott <mike@foundries.io>
As part of the migration from net_app APIs to socket APIs, let's
stop referencing the net_pkt fragments throughout the LwM2M library.
Establish a msg_data flat buffer inside lwm2m_message and use that
instead.
NOTE: As a part of this change we remove the COAP_NET_PKT setting.
The COAP library reverts to COAP_SOCK behavior.
This doesn't mean we use sockets in LwM2M (yet), it only means we
use the socket-compatible COAP library which parses flat buffers
instead of net_pkt fragments.
Signed-off-by: Michael Scott <mike@foundries.io>
Currently, this will select the needed configs for LwM2M and net_pkt.
During the migration to socket APIs, the net_pkt selections will change
to socket-based selects.
Signed-off-by: Michael Scott <mike@foundries.io>
As the net-app based echo samples are being removed, there's no use
referencing them any longer in their socket counterparts.
Additionally, overlay configuration descriptions were added in the
same manner original samples did.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The removed test does the same thing and runs on the same platforms
as already existing samples/boards/nrf52/power_mgr.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
This commit updates the README and sample.yaml in order to signal
that this demo works flawlessly on the nRF51 platform.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
This commit updates the power management sample in order to use
new features introduced by recent changes in the Zehyr Power
Management subsystem. Now, it shows how to use power management
policies as well as how to implement custom power modes.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
Since the lp3943 led driver still supports both DTS and non-DTS
configuration, we update the code to use DT_<COMPAT>_<INSTANCE>
defines for the CONFIG_HAS_DTS_I2C case.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Since the pca9633 led driver still supports both DTS and non-DTS
configuration, we update the code to use DT_<COMPAT>_<INSTANCE>
defines for the CONFIG_HAS_DTS_I2C case.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Since the lp5562 led driver still supports both DTS and non-DTS
configuration, we update the code to use DT_<COMPAT>_<INSTANCE>
defines for the CONFIG_HAS_DTS_I2C case.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit adds support in the sample to deal with the case when TLS
is offloaded and mbedtls is not necessary.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
This commit adds the necessary changes to allow the mqtt_publisher
sample to run on cc3220sf_launchxl.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
The original SNTP client library was designed for the net-app API, for
which it makes sense to have a callback function, which is called
asynchronously when an answer is received.
For the socket based interface, the callback is called just before
sntp_request() returns. It gets the status and the epoch_time in
parameter, however the status is already returned by sntp_request(). It
therefore make sense to replace the callback function by a pointer to
epoch_time.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
There are no longer per-partition initialization functions.
Instead, we iterate over all of them at boot to set up the
derived k_mem_partitions properly.
Some ARC-specific hacks that should never have been applied
have been removed from the userspace test.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Don't include net_app.h and net_buf.h, the first is deprecated, the
latter is low-level header, both shouldn't be used for socket apps.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Fixes the adt7420 sensor sample to fail gracefully if the sensor device
is not found and asserts are not enabled.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The public APIs for application shared memory are now
properly documented and conform to zephyr naming
conventions.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The v2018.10 release of OpenAMP reworks the API set and splits the
remoteproc vs rpmsg interfaces so one can use rpmsg without remoteproc.
This helps drastically reduce the code footprint utilized by OpenAMP.
The remote see around 4k reduction in code size.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
If Client send transition time values as 0x40 or 0x80 or 0xC0 then
this was cause the behind divide by zero exception during calculation
of transition->counter. This PR will solve this bug.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Removed foreground command functionality from shell source files.
Removed associated example.
Removed enter/exit command functions from the Bluetooth example
Updated project config files.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
The WNC-M14A2A modem is supposed to use HW flow control on the UART
connected to the MCU. In the past, we were able to bypass this
requirement by using only the LTE-M firmware which supported pulling
the CTS line high via "send-ok" gpio.
This does NOT work for the LTE firmware.
Now that MCUX UART driver supports hw-flow-control setting, let's use
it in the modem overlay so that regardless of modem firmware
(LTE vs. LTE-M) the sample will "just work".
Signed-off-by: Michael Scott <mike@foundries.io>
CONFIG_NET_CONTEXT_NET_PKT_POOL is used by Zephyr's TCP stack as
a way of keeping the original packet data when compression and
other l2 specific actions make the data unusable for retries.
LwM2M uses UDP and this option was never used.
Signed-off-by: Michael Scott <mike@foundries.io>
Convert ssd1306 display driver to use new defines so we can remove
the dts_fixup.h code for it. Also dropped "-i2c" from compatible.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Convert ssd1673 display driver to use new defines so we can remove
the dts_fixup.h code for it. Also dropped "-spi" from compatible.
Fix up references in reel_board dts and sample.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The app shared memory macros for declaring domains provide
no value, despite the stated intentions.
Just declare memory domains using the standard APIs for it.
To support this, symbols declared for app shared memory
partitions now are struct k_mem_partition, which can be
passed to the k_mem_domain APIs as normal, instead of the
app_region structs which are of no interest to the end
user.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Convert the lpd880x driver to use device tree and new DT_<COMPAT>
defines. Support both LPD8803 & LPD8806 device tree compats.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
SNTP client sample requests time sync on IPv4 and IPv6 addresses
using socket based SNTP client library.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
As networking libraries and protocols are moving to socket
based implementation, reworked SNTP client library to use sockets.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
We have now two code samples available for ArgonKey board:
1. sensors sample, fetching data from accel/gyro/mag,
barometer, humidity and proximity sensors
2. microphone sample, acquiring 5s audio @16KHz from the
on-board microphone.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Use auto-generated device tree macros in LIS3MDL driver to avoid
usage of dts.fixup code for it.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Use auto-generated device tree macros in LIS2MDL driver to avoid
usage of dts.fixup code for it.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Use auto-generated device tree macros in LSM6DSL driver to avoid
usage of dts.fixup code for it.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
The app is already sending period heart beat messages, and since it is
not designed to be used for such long times that would require IVI
Update, keep the secure network beacon sending disabled.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Suspend the mesh network after 30 minutes of inactivity. This should
help prolong the battery life of boards used at multi-day events, if
the user forgets to power off the device for the night.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Docs in the samples folder are a mixture of samples and sample indexes
of more samples, cluttering the index display. This change eliminates
the clutter, be we should reorganize the sample docs so we have a
consistent doc hierarchy (and improved organization).
Fixes: #12758
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Add a project configuration for nrf52840_pca10090 that will
route the nRF9160 interface pins to the nRF52840, and use them
for HCI over UART.
Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
The old legacy APIs use net-app library and as that is being
removed, then the dependencies need to be removed also.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This sample is made to demonstrate use of x-nucleo-ik01a2 shield.
It requires a board with Arduino i2c where it can be plugged on.
The sample has been tested on Nucleo F401RE board.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Share lis2dh driver among few accelerometer sensors that has
same register interface: LIS2DH, LIS3DH, LSM303DLHC, LIS2DH12,
LSM303AGR.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Supported PWM at pins A0, D3, D5 and D6 which are also Arduino
compatible. Also the onboard red LED can be used with PWM.
The basic/{fade_led, blink_led} samples to apply to this board
seemlessly and operate on the onboard red LED.
Also supported RTC.
Signed-off-by: Ioannis Konstantelias <ikonstadel@gmail.com>
This commit provides sample application for sensor lsm6dsl.
This sample has been tested on both 96b_argonkey board,
where lsm6dsl is connect to the micro thru SPI bus, and on
disco_l475_iot1 board, where instead it is connected to I2C bus.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
mbedTLS benchmark used 32-bit arithmetics for time calculations
(nanosecond resolution), which could overflow on slower platforms
on more time-consuming benchmark tests. In result, the benchmark
could give incorrect timing information. Using 64-bit arithmetics
prevents this issue.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add overlays for commonly used socket samples: big_http_download and
dumb_http_server. Can be used with:
make BOARD=mps2_an385 CONF_FILE="prj.conf overlay-smsc911x.conf"
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Split out the boards that utilize the FRDM-KW41Z as a seperate test
where we explicitly set the shield as an extra_args instead of having to
do it in the CMakeLists.txt file.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Rather than specifying SHIELD via Kconfig, we move it to being
specified via the command line, similar to board.
So we can do:
-DSHIELD=x_nucleo_iks01a1
or, for multiple shields:
-DSHIELD="x_nucleo_iks01a1 frdm_kw41z"
Following cmake change, update x_nucleo_iks01a1 sample in order
not to enable CONFIG option anymore but set SHIELD cmake option.
Last, update documentation to reflect this change.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add a configuration structure to sht3xd that holds instance-specific
parameters, implemented in a immutable statically allocated object
initialized with material from device tree binding aliases.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
We have a new power management system and those samples have been
written for specific boards and using the application based power
management subsystem. We are getting new tests/samples that are generic
with the new subsystem, so remove those in favor of the new ones.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This sample is linking the 'app' with 'subsys__bluetooth', which will
add zephyr/subsys/bluetooth to the include path of the app. But this
is unnecessary as the app already has this path on it's include path.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Legacy shell removed in order to avoid maintaining two shells
systems.
All examples and tests have been migrated to the new shell.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
Convert lsm303dlhc_accel & lsm303dlhc_magn sensor driver to use new
defines so we can remove the dts_fixup.h code for it.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Driver for networking device Microchip ENC28J60 is used as SPI slave,
moved to DTS type definition. Samples echo_client and echo_server use
this device on Arduino 101 board.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Update boards yaml file with arduino_i2c supported option
We exclude disco_l475_iot1 from the x_nucleo_iks01a1 sample since there
are duplicated sensors between the disco_l475_iot1 and shield. Until
Zephyr drivers can handle multiple sensors we need to have this exclude.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This board has headers for these buses so they should be made available
without requiring special overlays.
Also take advantage of the new Nordic auto-enable for peripherals,
which eliminates the need for special configuration.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
If Server receives re-transmitted message then it will not
transmit corresponding publish message for it.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Added app_gpio.c & no_transition_work_handler.c to reduce
burden on main.c. It will simplify & help to understand
overall architecture.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Simplified algorithm behind states binding & target values calculation.
This has improved code readability.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Disabled the CONFIG_COVERAGE for benchmarks and other tests.
This is needed because it interferes with normal behavior of the
test case.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Previously there was just "min_ram: 32", which took care about
suitable flash size implicitly. But now we have interesting boards
(e.g. lpcxpresso54114_m0) which tout RAM of 32K and Flash of 64K.
So, become more explicit about Flash requirement for the sample.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
These two tests are hitting a stack overflow on x86_64 (not entirely
surprisingly), but can't just increase stack size because there is an
assert in the CMSIS compatibility layer that stacks be under 512
bytes. Just disable for now.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This builds with a host compiler, not one from the SDK, and so no
newlib library is available. There is work to enable newlib detection
at and above the cmake level. This patch can be reverted when that
lands.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
No MPU support there yet. This test should really be predicated on a
kconfig variable, not architecture.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This patch adds a x86_64 architecture and qemu_x86_64 board to Zephyr.
Only the basic architecture support needed to run 64 bit code is
added; no drivers are added, though a low-level console exists and is
wired to printk().
The support is built on top of a "X86 underkernel" layer, which can be
built in isolation as a unit test on a Linux host.
Limitations:
+ Right now the SDK lacks an x86_64 toolchain. The build will fall
back to a host toolchain if it finds no cross compiler defined,
which is tested to work on gcc 8.2.1 right now.
+ No x87/SSE/AVX usage is allowed. This is a stronger limitation than
other architectures where the instructions work from one thread even
if the context switch code doesn't support it. We are passing
-no-sse to prevent gcc from automatically generating SSE
instructions for non-floating-point purposes, which has the side
effect of changing the ABI. Future work to handle the FPU registers
will need to be combined with an "application" ABI distinct from the
kernel one (or just to require USERSPACE).
+ Paging is enabled (it has to be in long mode), but is a 1:1 mapping
of all memory. No MMU/USERSPACE support yet.
+ We are building with -mno-red-zone for stack size reasons, but this
is a valuable optimization. Enabling it requires automatic stack
switching, which requires a TSS, which means it has to happen after
MMU support.
+ The OS runs in 64 bit mode, but for compatibility reasons is
compiled to the 32 bit "X32" ABI. So while the full 64 bit
registers and instruction set are available, C pointers are 32 bits
long and Zephyr is constrained to run in the bottom 4G of memory.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Add Accelerometer mouse by using fxos8700 accelerometer and using data
to control USB HID mouse.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
When used suitable config overlay, qemu_cortex_m3 with Ethernet
support can be started with just usual "make run".
An example of such overlay is included with samples/net/echo_server,
can be built and run with:
make BOARD=qemu_cortex_m3 \
CONF_FILE="prj.conf overlay-qemu_cortex_m3_eth.conf" run
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Added macro that generates simple report descriptor for mouse.
This improves the readability of hid-mouse sample.
Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
These were still running through Ethernet using generic
overlay-802154.conf thus creating a dedicated one.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Set BOARD variable in CMakeLists.txt for DMIC Sample App
Since this sample app is for intel_s1000_crb, setting BOARD
in CMakeLists.txt will eliminate the need to specify in
cmake command line every time during build.
Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
Check should be done with & instead of | otherwise it will always be
evaluated as 1/true regardless of the flags.
Fixes#12308
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The current OpenThread integration wants to download (from github) and
configure the OpenThread source tree every time the app is build. We
don't want to be doing this in quadruplicate every time sanitycheck is
run.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
These tests were defining a "test_kw41z" case, but that platform is
already whitelisted in the main ("test") case, and this one defines no
different behavior. It's just a dupe.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
With the new implementation we do not need a NULL terminated list
of kobjects. Therefore the list will only contain valid entries
of kobjects.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Move to latest cmake version with many bug fixes and enhancements.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
nucleo_l476rg uses I2C_3 rather than I2C_0, and uses special magic to
synthesize a corresponding define from a device tree node label. Update
the sample to use the Arduino binding if that's present.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
The Nordic TWIM driver uses DMA which requires that the source address
be located in RAM. If it isn't the transfer will rejected as invalid.
Provide a RAM address even though it's never dereferenced.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
0x77 is an available device address (and is the secondary address for
the BME280). 0x78 is a reserved address.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Exteneded shell sample with example how to use shell_fprintf from
any context with 'foreground' command.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
The test 'samples/application_development/code_relocation' was failing
in master because it was not declaring that it was defining additional
sections.
The CI error is attached below.
This patch fixes the CI failure by declaring in 'sample.yaml' that
these additional sections are expected.
FAILED:
qemu_cortex_m3/samples/application_development/code_relocation/test
has unrecognized binary sections: ['_SRAM2_RODATA_SECTION_NAME',
'_SRAM_TEXT_SECTION_NAME', '_SRAM_RODATA_SECTION_NAME',
'_SRAM_DATA_SECTION_NAME', '_CUSTOM_SECTION_NAME2']
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Fix misspellings in documentation (.rst, Kconfig help text, and .h
doxygen API comments), missed during regular reviews.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
blinky/button and disco samples are now using definitions
generated from boards dts files.
Update samples README files accordingly.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
The options selecting nRF drivers are now enabled by default when
an nRF SoC is selected as the build target.
The options selecting given hardware instances are now enabled at
the board level.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
The sample application to demonstrate dining philosopher's problem
implementation using CMSIS RTOS V2 APIs with semaphores and mutexes
as resources (forks).
The application makes use of CMSIS_RTOS_V2 APIs on threads, semaphores
and mutexes.
Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
Increase rx stack size for OpenThread overlay, as updated revision of
OpenThread requires more stack to operate.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
After this fix each LED will blink 5 times. Previously
LED_0 has been blining 6 times while others 5 times.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
Update zephyr integration of openthread to latest api as of 2018-12-17:
2a75d30684
Both echo_server and echo_client compile and are operational.
Signed-off-by: Martin Turon <mturon@google.com>
This application benchmarks the various cryptographic primitives
offered by mbed TLS.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
It is safe to assume that if X_GPIO_CONTROLLER is defined (hence
generated) X_GPIO_PIN should also be defined.
If this is not the case, this is an issue and letting the sample
build will reveal the issue.
Update the yaml filter to rely only on _GPIO_CONTROLLER #define's
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
In disco basic sample, same GPIO controller was used for LED0
and LED1, which is actually a particular case.
This change implements the general case, where LED0 an LED1 might
not have the same gpio controller.
Tested on nucleo_f429zi and frdm_k64f.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
In gpio driver sample, same GPIO controller was used for out pin
(LED0) and in pin (SW0), which is actually a particular case.
This change implements the general case, where button an led might
not have the same gpio controller.
Tested on nucleo_f429zi and frdm_k64f.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Removed get_report_cb as it was an incorrect implementation
of Get_Report request. Correct response would be returning
current report value, not report descriptor.
Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
Currently there is a mixed approach in prefixes from mbedTLS
configuration (MBEDTLS_ and TLS_). The latter was used in generic config
file and could bring up confusion that it can only be used with TLS
subsystem. Hence unify the approach to MBEDTLS_ prefix to avoid such
confusion.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
STM32 uart Kconfig instance flags were not following
same naming scheme than other drivers (i2c, spi, ..)
Update driver to use UART_X instead of UART_STM32_PORT_X
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Added right button, X and Y axis movement to HID mouse example.
Enabled only if board has enough buttons.
Added LED toggling notification when report is sent.
Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
Check result of fcntl() to catch any regressions in fcntl() handling
in Zephyr. To facilitate this, also merge block() and nonblock()
functions into single setblocking().
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Current application data size in echo_client sample does not fit into a
single datagram with DTLS enbled for default IPv6 MTU (1280 bytes). This
caused abrupt failure of the sample with DTLS enabled over 802.15.4 L2.
Decreasing the application data size allows it to fit into a single UDP
datagram after encapsulating it into DTLS record.
Additionally, finetune DTLS timeout on echo_server to match UDP
application timeout on echo_client (so that a single datagram loss
does not cauase DTLS session to end).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Now if Server receives re-transmitted messages from client then
it will not get completely ignored but respective GET & Publish
message will get release from Server side.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
As per Mesh Model Specification,
when a Server receives a Set message or a Set Unacknowledged message,
it shall set the state to the target field of the message,
unless the message has the same values for the SRC, DST, and TID
fields as the previous message received within the last 6 seconds.
This commit take care of this requirement.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
POSIX doesn't mandate such a header, only <fcntl.h>. <sys/fnctl.h>
is just an internal implementation detail of Newlib on which we should
not rely.
This makes it possible to build this sample against minimal libc.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Considering that IP can be set dynamically by DHCP
or statically before test previously, we could have
alternative way by supporting both setting IP and
existing IP.
Signed-off-by: Bub Wei <bub.wei@unisoc.com>
Since the Arduino 101 and the Quark SE C1000 are not actively developed
boards, default to other boards that are maintained and used.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit's implementation update Vendor Model dummy response
value in vnd_get() instead of vnd_set_unack().
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Removed bug which get introduced by PR:9521. Because of it
not able to save App's variable on SoC flash.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
The OpenAVNU gPTP daemon repository has changed so the compile
instructions were not working.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Do not limit to whitelisted boards, instead make it build/run for any
board that defines required DTS macros.
Simplified documentation and made it more generic. Remove HW setup and
made sample work with built-in LEDs and buttons.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Do not limit to whitelisted boards, instead make it build/run for any
board that defines required DTS macros.
Remove QMSI kconfigs and depend on DTS only.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Do not limit to whitelisted boards, instead make it build/run for any
board that defines required DTS macros.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Do not limit to whitelisted boards, instead make it build/run for any
board that defines required DTS macros.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
1. Modified fade_led PWM example to include
nRF HW PWM option.
2. Added fade_led nrf52_pca10040.overlay
in order to enable PWM node and choose
output PWM GPIO for channel 0. Channel 1
GPIO enable but not used in sample src.
Signed-off-by: Gaute Gamnes <gaute.gamnes@nordicsemi.no>
The Code need to be align after introduction of stream codec to
setting serialization subsystem.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Remove QEMU instructions as those do not work. Add native_posix
board instructions for running gPTP with linuxptp daemon.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This sample was creating objects from header file in the bss.
Fixed it by moving the objects to appropriate object files.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
This sample provides an example for using the code relocation
feature. This example will place text,data,bss from 3 files to
various parts in the SRAM. For this a custom linker file is used
which is derived from include/arch/arm/cortex_m/scripts/linker.ld.
Signed-off-by: Varun Sharma <varun.sharma@intel.com>
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
We get an intermittent fail when running on qemu_xtensa. Disable this
sample for now on that platform to allow sanitycheck / CI to pass for
other PRs.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Removed Console dependencies from shell uart backend.
Generated define: CONFIG_UART_SHELL_ON_DEV_NAME for each board.
Fixes#10191
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
Use generic logging macros LOG_*() instead of NET_*() as the
latter are mostly meant for internal networking stack use.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Remove network specific default and max log level setting
and start to use the zephyr logging values for those.
Remove LOG_MODULE_REGISTER() from net_core.h and place the
calls into .c files. This is done in order to avoid weird
compiler errors in some cases and to make the code look similar
as other subsystems.
Fixes#11343Fixes#11659
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add Bluetooth, 802.15.4 and OpenThread overlay configurations to socket
echo_client and echo_server samples.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Sample application to demonstrate usage of cmsis_rtos_v1 APIs
with dining philosopher's problem implementation.
This covers semaphores, mutex and thread APIs of CMSIS RTOS V1.
Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
Corrected state binding. With this commit Light Lightness
actual state would not cross its upper & lower limit.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Function names should have a verb as the last component.
As per this standard, rename some fuunctions names.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Due to recent changes some bugs had introduced in Gen. Level Move
GET & Publish functionalities. Now separatly introduced
gen_level_move_get() and gen_level_move_publisher() to resolved it.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
1. Created new shell module: shell_help.
2. Simplified command handlers with new shell print macros.
3. Removed help functions from command handlers.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
Removed printing command help from help handler. It is now
realized by the shell engine. This change saves a lot of flash
but still allows to print help in command handler with function
shell_help_print.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
Removing help "options" from shell API.
Currently SHELL_OPT macro is not used by users. What is more
commit: a89690d10f ignores possible options created in
command handler by the user. As a result they are not printed
in help message.
Second, currntly implemented "options" in command handlers options are
implemented without SHELL_OPT macro.
And last but not least this change will allow to implement
help handler in a way that user will not need to think about calling
functions printing help in a command handler.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
As it stands now, the console effectively works in raw mode, so all
messages should end with "\r\n". This was missed previously, because
the sample was run in QEMU, on top of POSIX cooked console. Running
on real hardware showed this issue.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Idle rate functionality has been implemented for HID USB class.
Bassed on Device Class Definition for Human Interface Devices 1.11.
Tested with USB3CV and host with idle rate.
Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
HID class now defaults to universal request callbacks in case they
are not provided by the application. This applies to following,
class-specific requests: Get_Report, Set_Report, Get_Idle, Set_Idle,
Get_Protocol and Set_Protocol.
Tested with USB3CV.
Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
Rephrase some help messages to decrease flash usage.
Deactivate shell history feature for test test_netusb_rndis
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
We are not expecting forever k_sleep in multithreading.
And k_sleep is empty in non-multihreading.
So remove invalid forever sleep to avoid the below issue.
ASSERTION FAIL [duration != (-1)] @ zephyr/kernel/sched.c:807
Please refer to _impl_k_sleep api in zephyr/kernel/sched.c:807
Signed-off-by: Bub Wei <bub.wei@unisoc.com>
Remove adhoc handling of BLE connection setup, rely on net_config for
that. Remove board-specific configs, instead have prt.conf and overlay
configs. Perform TLS setup once before main loop, to avoid errors.
Signed-off-by: Tavish Naruka <tavishnaruka@gmail.com>
context4/6 is initilalized in net_context_get function
which is restricted under CONFIG_NET_IPV4/IPV6 with
IS_EANBLED macro. So add the same macro check for
net_context_put function to avoid NET_ASSERT(context).
Signed-off-by: Bub Wei <bub.wei@unisoc.com>
If NET_IPV6 is disabled, build issue happens as below.
zephyr/samples/net/zperf/src/zperf_tcp_receiver.c: In function ‘zperf_tcp_rx_thread’:
zephyr/samples/net/zperf/src/zperf_tcp_receiver.c:171:9: error: ‘in6_addr_my’ undeclared (first use in this function)
&in6_addr_my->sin6_addr);
^~~~~~~~~~~
zephyr/samples/net/zperf/src/zperf_tcp_receiver.c:171:9: note: each undeclared identifier is reported only once for each function it appears in
zephyr/samples/net/zperf/src/zperf_tcp_receiver.c: In function ‘zperf_tcp_receiver_init’:
zephyr/samples/net/zperf/src/zperf_tcp_receiver.c:250:3: error: ‘in6_addr_my’ undeclared (first use in this function)
in6_addr_my = zperf_get_sin6();
^~~~~~~~~~~
*** [CMakeFiles/app.dir/src/zperf_tcp_receiver.c.obj] error 1
*** [CMakeFiles/app.dir/all] error 2
Signed-off-by: Bub Wei <bub.wei@unisoc.com>
Remove an unnecessary local variable to store the
return value, instead return directly thereby saving
few bits of memory.
Found using Coccinelle.
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
In Gen. OnOff Unack handler, gen_onoff_publisher(model) was
misplaced previously & now it is set to proper location.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Add a sample application for demonstrating automatic generation of
Character Framebuffer (CFB) font headers at build time.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Enable debug logging in the watchdog driver sample application to aid
in debugging watchdog drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
If transition time is not equal to Zero then & then only values
related to transition get calculated.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
If the first name is longer than HELLO_MAX sending would fail due to
there not being sufficient MIC space (or worse overrun the net_buf).
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This code was still incorrectly causing corrupt strings to be
generated. Now it should be correct.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Now if Gen. OnOff state set by client as '1' with some
transition time then value of Lightness will not jump to default
or last value instantly instead it would gradually increase during
that transition period.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Create independent function handlers for some Servers. This
would not initiate state binding if current state is equal to
Client requested state.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Inverse logic for onoff state while driving LED GPIO. For LED light on
GPIO pin is 0, 1 for LED light off.
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@codecoup.pl>
Start of Frame events can now be accessed from USB classes.
This will be useful when implementing idle rate functionality.
Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
Update the http_get sockets sample to enable association of secure
tags with certificate filenames.
This allows certificates and keys to be provisioned to the file
system on secure flash, without having to include the actual
certificates in the application.
Validated on the cc3220sf_launchxl board.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
Two separate folders and Kconfig options causing confusion on
CoAP and CoAP_SOCK implementations. This patch simplifies it.
Current CoAP Kconfig option moved to COAP_NET_PKT.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
System Power Management is only supported in Tickless Idle mode.
This patch modifies Kconfig dependencies to ensure System Power
Management option selects Tickless Idle one.
Fixes: #11046
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
This commit will take back changes made by previous commit
i.e. fad8ff39c3.
This is beacause k_sleep() based delay is not behaving as
expected while testing & take more time than expected.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
The disco_l475_iot1 has the Inventek eS-WiFi, so lets enable the sample
on the board. (This also gets us something that will build test the
eS-Wifi driver as part of sanitycheck).
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This adds common option to disable support for LE Data Length Update
procedure in controller and host.
This will reduce flash usage by compiling out le_data_len_change
event handler that will never be called if controller has been
compiled with BT_CTLR_DATA_LENGTH option disabled.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This adds common option to disable support for PHY Update
procedure in controller and host.
This will reduce flash usage by compiling out le_phy_update_complete
event handler that will never be called if controller has been
compiled with BT_CTLR_PHY option disabled.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
Since setting USB console port name is moved to DTS users have
problems enabling it. Notify user that the console is not set.
Fixes#10693
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Adds the virtualcom device to the nrf52840 SoC dts and adds a board
specific nrf52840_overlay.dts file, copied exactly from the
arduino101_overlay.dts file, to set the console device name
appropriately for the subsys/usb/console sample project.
There were no clear alternatives to add a usb_cdc: virtualcom device to
all known SoC devices with USB support as should probably happen.
There was also no clear alternatives to add a non-board specific overlay
to the example.
This fixes a specific problem with the nrf52840-dk board for this sample
project.
Signed-off-by: Tom Burdick <thomas.burdick@gmail.com>
With this commit now it is simple to understand flow of logic when
NODE receives any message & how it proceed things one by one.
Plus NODE will immediately send GET status to Client instead of
waiting for things which has less priority.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
In order to prevent failing tests on i.MX RT the following samples were
limited to a minimum 140k of flash: http_client, http_server,
socket/echo_client and sockets/echo_server.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
Add IMX IPM sample application. It reads the data sent to the
Messaging Unit and sends them back. It has been tested on Udoo Neo Full
board with the Cortex-A9 core running Linux and sending the data
into the Messaging Unit A and the Cortex-M4 running this sample Zephyr
application and reading the data from Messaging Unit B and sending it
back for Linux side to read it from Messaging Unit A.
Origin: Original
Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
Rename existing headers and sybols to mqtt_legacy, to allow new
implementation to keep old config and header names.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The show_sensors_data() function tries to access val[2] when
outputting the Z-axis value, so the array must have at least three
elements. This also triggered Coverity CID 189741.
Fixes#11482
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This comparison was always supposed to be > rather than >=. Fixing
this also fixes Coverity CID 189740.
Fixes#11483
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Let's expand the sanity build testing for the lwm2m_client by
doing the following:
- Add variant builds for DTLS, bluetooth and modem
- Check various combinations of hardware across each of these
variant builds: frdm_k64f, nrf52_pca10040, nrf52840_pca10056,
disco_l475_iot1
Signed-off-by: Michael Scott <mike@foundries.io>
When the WNC-14A2A modem binding was originally introduced, I thought
the base_label would shorten the define keeping the result short and
easily portable. Turns out with the latest changes, it has a side
effect of removing the "DT_*" prefix which is breaking the build.
Let's remove "base_label" from the modem binding and adjust all of
the dts_fixups referring to the WNC14A2A defines.
NOTE: This commit moves the left-over WNC14A2A dts_fixup defines from
the nRF52 soc into samples/net/lwm2m_client as the new values.
They will stay there until the modem can be re-configured as a shield.
Signed-off-by: Michael Scott <mike@foundries.io>
During the modem overlay move from the K64F board directory to the
LwM2M sample code, 2 DTS entries were dropped:
current-speed = <115200>;
status = "ok";
Without these entries the DTS defines for UART2 and CURRENT_SPEED
are missing from the generated_dts_board.h file.
Signed-off-by: Michael Scott <mike@foundries.io>
All drivers require DTS for their primary SPI settings.
Removing SPI_[0-9]_NAME config option added some more samples changes.
Usage of these options there was anyway not relevant.
Fixes#11064
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
We have cases with UART drivers where TX interrupt handling is not
bootstrapped properly on enabling them. To make such cases more
obvious, start this sample with console_write(), the output of which
wouldn't appear if that's the case. (Of course, the sample starts
with printk() exlaining what may happpen.)
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Remove the ifdef related to CONFIG_FS_FLASH_STORAGE_PARTITION. There
shouldn't be any harm in always having the partition around as we'll
just generate the defines related to and most applications will ignore
them.
Helps get one step closer to have DTS not depend on Kconfig.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The wncm14a2a modem is an add-on/shield and not part of the
nrf52840_pca10056 board and should be maintained and configured
outside of the board.
This needs to be moved to a shield, see #10965.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The wncm14a2a modem is an add-on/shield and not part of the nrf52840_mdk
board and should be maintained and configured outside of the board.
This needs to be moved to a shield, see #10965.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
echo_server can use up to 6 sockets therefore it needs more file
descriptors than the maximum default value specified.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
There are a small handful of samples that still utilize <board.h>
include, to minimize the use of <board.h> to these specific cases and
allow us to remove adding the board dir to the top level include search
path, we explicitly in each sample add the specific board dir it needs.
For the microbit cases these could be replaced by DTS support in the
future when the pwm_nrf5_sw supports DTS.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Now states which are bound have single timer that means
means for lightness variation there is one timer & for
temperature variation there is one timer.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Corrected mapping of message handler for Generic
Move Set, Generic Move Set Unack, Light CTL Set &
Light CTL Set Unack.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Removed extra blank line. Add new
bound_states_transition_type_reassignment() function in
transition.c to improve code readability & understanding.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
This edition would improve by default mesh network
performance. This is after testing with nRFMesh app
from Nordic Semiconductor.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Include regex pattern matching of console output
to determine the sample execution status.
Add fixture to determine the hardware dependency
if any. If FRAM is connected to board externally,
then with fixture, automation would be able to
identify the board with sensor to trigger the
execution.
Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
Regex pattern matching is included to match the
execution log from console to return test result
in automation.
Also add fixture to identify the external sensor
connected for automation framework to trigger test
cases on particular board which is connected with
required sensor.
Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
This commit would add the pull-up or pull-down on the switch pin and
makes it functional on the board where there is no external pull-up.
Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
We should let drivers or board code include soc.h directly so we can keep
board.h to local info for board specific code.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This can help find unused symbols. Those end up without a type if
'default' is used instead of 'def_bool', which generates a warning.
Search for "Kconfig.defconfig" in
https://docs.zephyrproject.org/latest/application/kconfig-tips.html for
a longer explanation.
Keep the 'def_bool' for the following symbols, which seem to be
deliberately defined only in Kconfig.defconfig files:
- ALTERA_AVALON_I2C
- ALTERA_AVALON_MSGDMA
- ALTERA_AVALON_PIO
- ALTERA_AVALON_QSPI
- ALTERA_AVALON_SYSID
- CLOCK_CONTROL_IMX_CCM
- CPU_EM4_DMIPS
- CPU_EM4_FPUDA
- CPU_EM4_FPUS
- FP_FPU_DA
- I2C_GECKO
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Change the sample to use a different controller device name per pin. We
shouldn't assume that on a given board that all the pins we are using
will be on the same GPIO controller device.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add a dts binding for the Atmel WINC1500 WIFI chip. Update the
quark_se_c1000_devboard to utilize this binding as well as the wifi
sample app.
We now get all the GPIOs related to the Atmel WINC1500 from the device
tree.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
These changes were obtained by running a script created by
Ulf Magnusson <Ulf.Magnusson@nordicsemi.no> for the following
specification:
1. Read the contents of all dts_fixup.h files in Zephyr
2. Check the left-hand side of the #define macros (i.e. the X in
#define X Y)
3. Check if that name is also the name of a Kconfig option
3.a If it is, then do nothing
3.b If it is not, then replace CONFIG_ with DT_ or add DT_ if it
has neither of these two prefixes
4. Replace the use of the changed #define in the code itself
(.c, .h, .ld)
Additionally, some tweaks had to be added to this script to catch some
of the macros used in the code in a parameterized form, e.g.:
- CONFIG_GPIO_STM32_GPIO##__SUFFIX##_BASE_ADDRESS
- CONFIG_UART_##idx##_TX_PIN
- I2C_SBCON_##_num##_BASE_ADDR
and to prevent adding DT_ prefix to the following symbols:
- FLASH_START
- FLASH_SIZE
- SRAM_START
- SRAM_SIZE
- _ROM_ADDR
- _ROM_SIZE
- _RAM_ADDR
- _RAM_SIZE
which are surprisingly also defined in some dts_fixup.h files.
Finally, some manual corrections had to be done as well:
- name##_IRQ -> DT_##name##_IRQ in uart_stm32.c
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
All labels containing "_<8-hex-digits>_" or "16550_<3or6-hex-digits>_"
in their names, assumed to be generated by the extracting script,
are updated with the DT_ prefix, to reflect the recent changes made
to the script.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
If shell UART backend was enabled and logger uart backend was
not explicitly disabled then both were used resulting in logs
being printed twice on terminal.
Patch modifies default state of log uart backend to depend on
state of shell uart backend.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Add a shell that implements "promisc [on | off] <interface>"
command to toggle promiscuous mode support.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Patch introduces sensor model to mesh badge application. Along with
model definition a sensor get message is implemented and handled on
server.
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@codecoup.pl>
This patch introduces new screen to mesh_badge application. Sensor
screen shows measurements from board sensors updated every 2 seconds.
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@codecoup.pl>
Convert the BMI160 to use Device Tree to get SPI and GPIO params instead
of Kconfig. Updated samples, tests, and arduino_101_sss board support
for this.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Changed LOG_MODULE_REGISTER and LOG_MODULE_DECLARE macros to take log
level as optional parameter. LOG_MODULE_DECLARE can now also be used
in static inline functions in headers. Added LOG_LEVEL_SET macro
which is used when instance logging API is used to indicate maximal
log level compiled into the file.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Couple of findings which were revealed after changing
LOG_MODULE_REGISTER macro:
- missing semicolons after LOG_MODULE_REGISTER()
- missing LOG_LEVEL defines
- other
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
The overlay-e1000.conf can be used for example with Qemu
which has support for e1000 ethernet driver.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Change the label GPIO_KEYS_BUTTON_0_GPIO_CONTROLLER that is generated
for the DT node directly to the corresponding one generated through
the "sw0" alias (i.e. SW0_GPIO_CONTROLLER) to make it consistent with
other DT related labels used in this code (SW0_* and LED?_*).
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Now that we set LED info in the device tree for all boards we don't need
to special case handle in the name/led pin (it comes from DT). We can
also remove include board.h.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This required wiring external daughter board by hand, it's not provided
by the board directly, let's remove this.
Applying the change on relevant samples.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
There is an mcr20a shield board for frdm_k64f which is easier to use
than wiring a cc2520 by hand. So let's remove this.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
The only difference between the F413xH and F413xG is flash memory size.
STMF413xH: 1536 Kbytes
STMF413xG: 1024 Kbytes
Signed-off-by: Benoit Leforestier <benoit.leforestier@gmail.com>
`shell_cmd_precheck()` function has the second argument as boolean
and currently we pass assignment expression instead of boolean
expression. Therefore, fix the expression by passing `argc == 2`
as the boolean argument.
Fixes#11099
Coverity-CID: 189507
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
This commit moves the BLE GATT Device Information service
from /samples/bluetooth/gatt to /subsys/bluetooth/services and adds
a Kconfig entry to enable and configure the service;
when enabled, it will register itself automatically.
Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
Issue found using Coccinelle. Semaphore is not required at all
in this application.
Fixes#11150
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Improved RX path to use ring buffer for incoming data instead of single
byte buffer. Improved TX path to use ring buffer. Added support for
asynchronous UART API (interrupts).
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
The way the code is structured the buffer is always guaranteed to be
large enough, however perform explicit termination anyway to avoid
Coverity warnings.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Tweak ROM usage of quark_se_c1000_devboard so that test_usbnet
test will pass. The board just disables network statistics as
that is not really needed here.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
We update 'blink_led', 'fade_led' and 'rgb_led' to support dt generated
defines for the PWM info needed for each. Since hexiwear_k64 supports
generating the info, moved the support for hexiwear_k64 to just use the
dt generated defines.
For 'blink_led' and 'fade_led' we use an alias in dt called 'pwm-led0'.
For 'rgb_led' we use aliases 'red-pwm-led', 'green-pwm-led' and
'blue-pwm-led'
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The wncm14a2a modem is an add-on/shield and not part of the frdm_k64f
board and should be maintained and configured outside of the board.
This needs to be moved to a shield, see #10965.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The task_profiler is not needed nor used by zperf so remove
it from CMakefile.
Fixes#11051
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The DTS changes introduced in 7ae220c845
changes the naming of GPIO related macros. This updates the usage
of previous macros via DTS fixup.
Fixes#10993
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Unify the function naming for various network checking functions.
For example:
net_is_ipv6_addr_loopback() -> net_ipv6_is_addr_loopback()
net_is_my_ipv6_maddr() -> net_ipv6_is_my_maddr()
etc.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The USB mass storage documentation was completely outdated. Rewrite it
using reStructuredText, and mentioning the two possible overlays.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Move configuration to overlay-netusb.sonf, enable zero-configuration,
working with LLMNR in Windows and avahi-autoipd in Linux.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Move the GPIO info for the buttons into the dts, this lets us match what
all other boards are doing. Update some sample & test code to use the
dts generated SW0_GPIO_CONTROLLER define instead of SW0_GPIO_NAME.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
We don't need board.h, but by including it we would end up picking up
stdio.h from somewhere which we need for sprintf. So just included
stdio.h and drop board.h
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
For blink_led, fade_led, and rgb_led, we only need board.h for the
hexiwear_k64 board. Remove other references to board.h and only
include it if we are building on hexiwear_k64
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The HID mouse sample uses the GPIO to read the state of a button, but
does not enable CONFIG_GPIO, causing the example to fail. Fix that.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Adds a new configuration to the peripheral_hr sample that utilizes the
frdm_kw41z as a ble controller shield.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Stop specifying that the 'remote' app should use the same board as the
root app.
Also, add assertions to make sure that the user does not try to
override the board that is specified in the app build scripts.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Stop specifying that the OpenAMP 'remote' app should use the same
board as the root app.
Also, add assertions to make sure that the user does not try to
override the board's that are specified in the app build scripts.
This fixes#10345
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Defined common publisher i.e. gen_level_publisher() for
all three gen. level related messahe handlers.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
The BBC micro:bit uses a baudrate of 115200 for the hci_uart
sample. Add a note about this to avoid any confusion.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
When using an IDE (e.g. Eclipse, Qt Creator), the project name gets
displayed. This greatly simplifies the navigation between projects when
having many of them open at the same time. Naming every project "NONE"
defeats this functionality.
This patch tries to use sensible project names while not duplicating
too much of what is already represented in the path. This is done by
using the name of the directory the relevant CMakeLists.txt file is
stored in. To ensure unique project names in the samples (and again, in
the tests folder) folder, small manual adjustments have been done.
Signed-off-by: Reto Schneider <code@reto-schneider.ch>
Add a new "heartbeat" message so that number of hops between nodes can
be discovered. Also add a statistics page which can be toggled using a
long key press, showing local information and the top message senders.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
If user aggresively vary the state then previous mechanism
failed to publish status of other bounded states since it
has to publish multiple things back to back.
This PR repair the things.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
If transition is in process, then as per current implementation bound
states only respond with Present value. But with this commit, now
bound states too would respond with present, target & remaining time
values in status response.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Redefine opcode values for Vendor Model to mimic like
Generic OnOff Server opcode values for sake of convenience.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Now in case of Generic Delta handler, if message with same TID
received after 6 seconds with same source address would consider
as new transaction instead of ignoring it.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
With this commit it is now possible to save some Mesh Model
Servers State on SoC flash. This impacts initialization &
state binding after NODE reset & that is why some additional
modification has done as per requirements & removed some
code & comments which are redundant as per current
implementation.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
In general, Bluetooth Mesh provisioning process could be failed
because of any reason. Using some h/w interrupt we can call
bt_mesh_reset() or something which will push device into factory
reset mode.
But with some actual products it is not always possible or feasible
to add extra h/w to achieve this goal.
This commit adds facility to push device into factory reset mode
using power reset. As per current implementation user have to
do 5 times reset so that gap between two consecutive reset
should not exceed 7 seconds.
Co-authored-by: Laczen JMS <laczenjms@gmail.com>
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
With this commit, IUT will send additional status responses
whenever required as per PTS requirements.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Separately defined functions for Servers. This would help
to send extra status responses whenever required.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
This updates documentation to account for the new shell which
does not support 'select' for command context anymore.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
The wifi shell sample asserts when trying to do a sleep
forever.
The sleep should not be necessary, so removing it.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
A few issues with the dts support for the SSD1306 display driver:
1. binding file mixed description & generation up together
- rename most uses of generation to description and add proper
generation field into yaml
2. Drop use of BASE_LABEL, this shouldn't be used by most bindings
3. dts defines that are being assumed in driver aren't correct. We
should be using a dts_fixup.h in the sample to map the generated
defines to those used in the driver. We remove the incorrect
defines that the driver assumes right now.
4. Fixup 'segment-remap' and 'com-invdir' properties that are booleans
in the binding file and associated code changes.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The "zperf udp download" optional port parameter was not properly
checked, the default port check branch was never reached.
Fix also the same issue in tcp download command.
Coverity-CID: 188881
Fixes#10758
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Change the default behaviour of the host network interface
setup. Now user needs to execute net-setup.sh script from
net-tools project to setup host ethernet interface. The script
needs to be run as a root user. Then zephyr.exe can be started
as a normal user.
Example:
cd net-tools
sudo ./net-setup.sh
This will create zeth network interface and set IP address and
routes properly. See other command line options by typing
./net-setup.sh --help
Old behaviour is still there if one enables
CONFIG_ETH_NATIVE_POSIX_STARTUP_AUTOMATIC=y
in which case one needs to use the command
sudo --preserve-env zephyr.exe
to start the Zephyr process.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Now that log processing happens in a separate thread, the
BT_STACK_EXTRA macro is not needed (since there's no significant
overhead), and therefore the BT_STACK macros become unnecessary as
well.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Provide basic commands for configuring/setting/reading GPIO ports.
> gpio conf ..
> gpio set ..
> gpio get ..
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Driver fxos8700 can also be used for the MMA8451
accelerometer and offers more functionality.
Revert the commit to avoid duplicate code.
This reverts commit 70a35e2346.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Add console harness support for USB mass storage test.
Also, using overlay config for DISK_ACCESS configuration
and accessing the different config file with different
method.
Signed-off-by: Ajay Kishore <ajay.kishore@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This flag is an indication to the timer driver that the OS doesn't
care about rollover conditions of the tick count while idling, so the
system doesn't need to wake up once per counter flip[1]. Obviously in
that circumstance values returned from k_uptime_get_32() are going to
be wrong, so the implementation had an assert to check for misuse.
But no one understood that from the docs, so the only place these APIs
were used in practice were as "guards" around code that needed to call
k_uptime_get_32(), even though that's 100% wrong per docs!
Clarify the docs. Remove the incorrect guards. Change the flag to
initialize to true so that uptime isn't broken-by-default in tickless
mode. Also move the implemenations of the functions out of the
header, as there's no good reason for these to need to be inlined.
[1] Which can be significant. A 100MHz ARM using the 24 bit SysTick
counter rolls over at about 6 Hz, and if it had to come out of
idle at that rate it would be a significant power issue that would
swamp the gains from tickless. Obviously systems with slow
counters like nRF or 64 bit ones like RISC-V or x86's TSC aren't
as affected.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
The existing API defined sys_clock_{hw_cycles,ticks}_per_sec as simple
"variables" to be shared, except that they were only real storage in
certain modes (the HPET driver, basically) and everywhere else they
were a build constant.
Properly, these should be an API defined by the timer driver (who
controls those rates) and consumed by the clock subsystem. So give
them function syntax as a stepping stone to get there.
Note that this also removes the deprecated variable
_sys_clock_us_per_tick rather than give it the same treatment.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Remove redundant 'sample' tag and add something that matches the
functionality and features being tested, demonstrated.
Avoid short abbriviations and using full names for fs.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add sample application for LSM303DLHC, ST MEMS
system-in-package featuring a 3D digital linear
acceleration sensor and a 3D digital magnetic
sensor.
Enable sample to build on stm32f3_disco board
during sanitycheck.
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
ROM consumption is higher with new shell which prevents
quark_se_c1000_devboard from building. Remove that board
from sanitychecker runs.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Use new shell instead of the legacy one. This commit also fixes
the configuration file mess and allows the program to be run on
more hardware.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
There were no shell commands implemented so remove the shell
support from this sample application.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Removed obsolete CONFIG_SYS_LOG_* and CONFIG_NET_DEBUG_* options
from various sample and test applications.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The conf file contained obsolete config options and it was
not really used. Cleaned also the sample.yaml file.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Previously, wifi-enabled samples were not built by sanitycheck for the
cc3220sf_launchxl.
This patch gets the sockets echo sample to build.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
Also, defines one LOG_MODULE_NAME for the simplelink WiFi driver, and
uses the same name for all files in this driver (module).
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
If user will enable shell than for each backend shell instance
will be created automatically.
Update all shell examples according to the new initialization
procedure.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
The $srctree environment variable gives the path relative to which
'(o)source' statements work (the current directory is used if $srctree
is unset). It is set to $ZEPHYR_BASE in cmake/kconfig.cmake, so there's
no need to qualify the source of Kconfig.zephyr in sample Kconfig files
(or in external projects).
All 'source's in Zephyr assume that the Zephyr root directory is used as
the srctree as well, and would break otherwise.
Remove the $(ZEPHYR_BASE)s to make it clearer that all 'source'
statements work relative to the Zephyr root. There was some user
confusion on IRC.
Also explain how things work in the documentation.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
usb_dc_status_callback() parameters are interface or configuration
numbers and should be const.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Refactor USB writes, start transfer only when device
is configured, the change makes it possible to work with native_posix
USB virtual controller.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Some terminals literally interprets shell output data. Hence to print
a message in new line shell needs to send `\r\n` each time. To minimize
flash usage user can now send `\n` as a line delimiter and shell will
automatically add missing CR character.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
This commit updates the mem_domain_apis_test sample and the
mem_protect test, so they can compile and execute in ARMv8-M
platforms, which do not support the P_RW_U_RO access permissions
combination (privileged read/write, unprivileged read-only). The
modification consists of, simply, selecting a different access
permission (P_RO_U_RO) when building for ARMv8-M MPUs with the
unmodified ARM MPU architecture.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>