In order for check-compliance.py to be able to run cleanly out-of-tree,
set the repo (to be checked) path based on cwd, and refer to Zephyr and
its tools by the specific path set by ZEPHYR_BASE.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The net-shell "net allocs" command should print network buffer
allocations even if network packet debugging is not enabled.
This is how it used to work earlier but the behaviour got lost
at some point. So user needs to set CONFIG_NET_DEBUG_NET_PKT_ALLOC
in order to see the buffer allocations. The option will be enabled
by default if network packet log level is set to DBG.
The reason for a separate option is that the network packet debug
logging prints just too much data and it is very difficult to
track allocations when that happens.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
ioctl() just dispatches to the corresponding vmethod of an fd.
fcntl() handles fdtable-level operations (so far doesn't handle
actually, returning "not implemented" error), and forwards
fd-specific operations to ioctl vmethod just the same (i.e.
ioctl and fcntl operations share the same namespace, but otherwise
disjoint).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
As extend fdtable usage to more cases, there regularly arises a need
to forward ioctl/fcntl arguments to another ioctl vmethod, which is
complicated because it defined as taking variadic arguments. The only
portable solution is to convert variadic arguments to va_list at the
first point of entry from client code, and then pass va_list around.
To facilitate calling ioctl with variadic arguments from system code,
z_fdtable_call_ioctl() helper function is added.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
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>
Make sure that the link delay (propagation time) is calculated
same way as how Avnu/gptp is doing it with checks for rate ratio.
This is done like this in order to behave same way as their gptp.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This is useful info as otherwise we get no indication to user
if the packet is not created and not sent.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Neighbor rate ratio cannot be 0 as that would mean 0 packet
delivery time which is not plausible.
Add also some debugging to print current neighbor propagation
delay value.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
I2C transfers could simultaneous be called that would
cause an inconsistent state in NRFX I2C state (and HW).
The NRFX TWI driver would expect to be in state
`NRFX_DRV_STATE_INITIALIZED` while being in state
`NRFX_DRV_STATE_POWERED_ON`.
Signed-off-by: Olivier Martin <olivier.martin@proglove.de>
Fix the following warning that shows up in some NRF device tree files:
Warning (simple_bus_reg): /soc/pwm@4001C000: simple-bus unit
address format error, expected "4001c000"
Signed-off-by: Kumar Gala <kumar.gala@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>
This commit simplifies Kconfig options related to handling SoC series,
part numbers. This is a first step required to add remaining part
numbers to the existing configuration.
This change is possible since all SiLabs SoCs within a single series
have a very uniform structure.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
To enable the Hyperflash you have to physically modify the board and
this disables the QSPI. Since we plan on removing Kconfig from device
trees, its easier to treat the hyperflash as a separate board config
and thus it will get a dts to match.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
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>
When building with clang symbols from the runtime library, like
__divdi3 were not being resolved. To fix this we add the "library path
for the currently used compiler runtime library" to the link path.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Align 'clang' with 'gcc' by having it also use 'find_program' instead
of 'set' to assign toolchain paths.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Align 'clang' with gcc by having it also set CMAKE_C_COMPILER in the
'compiler' build script instead of the 'toolchain' build script.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
The 'llvm' and 'clang' build scripts have been named strangely. It is
more natural for 'clang' to be the compiler, and 'llvm' to be the
toolchain.
This commit rectifies this by renaming the files.
This also fixes#11187
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Since Voltage Reference block is not supported, the ADC does not work
properly on FRDM-KW41Z. Set voltage reference to alternate source
in frdm_kw41z_defconfig.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Improve initialization of the ADC.
After initialization with the default values, the clock source
of the ADC is asynchronous clock (ADACK) and clock divide ratio
is 8. The minimum conversion clock frequency is 1MHz.
Add clock divider selection and set default divide ratio to 1.
That sets the conversion clock frequency to approximately 5MHz.
Default configuration for the voltage reference is set to
external pins V_REFH and V_REFL. Depending on the MCU configuration
V_REFL may be connected to ground and V_REFH to VREF_OUT.
Since Voltage Reference block is not supported, the ADC does not work
properly on FRDM-KW41Z. Add voltage reference selection to fix it.
Enable self-calibration function as recommeded in Reference Manual.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
We had SEGGER support enabled by default previously, but the new
Kconfig option CONFIG_USE_SEGGER_RTT needs to be set as well now.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The lpcxpresso54114_m0 tends to be the secondary core so doesn't
typically have a UART setup for it. We had SEGGER support enabled by
default previously, but the new Kconfig option CONFIG_USE_SEGGER_RTT
needs to be set as well now.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The original version of get_binding didn't handle the case of having a
child node on a SPI or I2C device node. The example is a SPI flash and
having a partition node under that.
Re-work the binding lookup logic to first look in the master bindings
dict, and if not found there we assume it must be in the bus specific
dictionary, and we can use the parent node to find the bus type.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add board support for 96Boards STM32 Sensor Mezzanine board. This board
is one of the 96Boards Mezzanine board which can work standalone or on
top of the 96Boards Consumer Edition boards.
Below are some of the key features of this board:
1. STM32F446VE MCU
2. 96Boards high/low-speed connectivity
3. Arduino™ Uno revision 3 and Grove connectivity
4. Integrated MEMS sensors:
1. LSM6DS3H
2. LIS3MDL
3. LPS22HB
4. MP34DT01-M
5. On-board ST-LINK/V2-1 debugger/programmer
More information about this board can be found in the 96Boards product
page: https://www.96boards.org/documentation/mezzanine/stm32/
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
This is a temporary fix in one of the MDK files that is a part of nrfx
and it is expected to be replaced with the final solution in the next
update of nrfx.
Signed-off-by: Simen Tinderholt <Simen.Tinderholt@nordicsemi.no>
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This definition was needed to translate the old symbol used in MDK
for accessing the GPIO peripheral in nRF51 SoCs (NRF_GPIO) to the
one used for all newer SoCs (NRF_P0). Now the translation is done
in the HAL for GPIO (nrf_gpio.h).
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
In order to make use of the configurable bus width and burst size
options in memcpy mode, lets add configurations bits for the same.
This configuration is derived from the TRM of STM32F446xx Page No. 210
"Memory-to-memory mode" section and verified on 96Boards STM32 Sensor
Mezzanine board.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
CMake parses the Kconfig output for 'CONFIG_*' symbols and adds them
to the CMake namespace.
It does the same for DT, but has only been including 'CONFIG_' symbols
and been ignoring the 'DT_' symbols.
For DeviceTree to be useful, it's information needs to be accessible
from CMake, just like Kconfig is.
To this end we also introduce the 'DT_' symbols into the CMake
namespace.
This resolves#11109
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Generalize 'import_kconfig' to support parsing symbols with other
prefixes than 'CONFIG_'. This will eventually allow us to also import
'DT_' symbols into the CMake namespace.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Function name prefix is now configurable (by default only debug
messages are prefixed) and log macros can be simplified.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Function name prefix is now configurable (by default only debug
messages are prefixed) and log macros can be simplified.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Extended logger configuration to allow function name prefix for
messages with certain severity levels. By default only debug
messages are prefixed with function name.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
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>
Generic log message allocator was wrongly allocating single
chunk messages as initially it was intended to allocate only
multichunk messages. It resulted in invalid pointer being freed
on log message free. Issue detected by valgrind.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
The 0.9.5 SDK has support for the Cypress PSoC6 family. Add ablilty to
flash with openocd. I've only tested flashing hello_world on the m0.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>