Andy Ross wanted to override a choice selection from a board defconfig
file in a prj.conf, but this could trigger the
assigned-value-didn't-take warning, because the choice symbol set to y
in the board defconfig file ends up as n after another choice symbol is
selected.
(Note: Setting any choice symbol to y is enough to make it the choice
(user) selection. There's no need to set the other symbols to n.)
Fix the warning by checking choices at the choice level rather than at
the level of individual choice symbols. This also makes the warning a
bit more informative in general for choice symbols.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
These two tests ask for lots of priority levels, more than the 32
maximum allowed by SCHED_MULTIQ (which is by design: if you have
requirements like that DUMB or SCALABLE are better choices due to the
RAM overhead of MULTIQ), so the build will fail on boards that defined
MULTIQ as default.
Don't let the platform choose the scheduler backend, ask for SCALABLE
explicitly.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Have qemu_cortex_m3 use the traditional multiqueue scheduler by
default, to be sure it gets test coverage.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Zephyr 1.12 removed the old scheduler and replaced it with the choice
of a "dumb" list or a balanced tree. But the old multi-queue
algorithm is still useful in the space between these two (applications
with large-ish numbers of runnable threads, but that don't need fancy
features like EDF or SMP affinity). So add it as a
CONFIG_SCHED_MULTIQ option.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Make these "choice" items instead of a single boolean that implies the
element unset.
Also renames WAITQ_FAST to WAITQ_SCALABLE, as the rbtree is really
only "fast" for large queue sizes (it's constant factor overhead is
bigger than a list's!)
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
The previous default, CONFIG_ETH_MCUX_0_RANDOM_MAC, result in a random
MAC address changed each reboot. As reboots happen quite often during
development, while Ethernet peers usually cache existing MAC addresses
in ARP cache, this led to situation when a board after reboot didn't
respond to pings or any other connection attempts for random amount of
time (upo to 10-20s). This was quite confusing and looked like some
problem in driver/hardware/connection/whatever.
Instead, introduce new option, CONFIG_ETH_MCUX_0_UNIQUE_MAC, to make
MAC address from MCU unique identification register. This results in
randomized/unique MAC address which is also stable over reboots and
avoids the situation described above.
Fixes: #3187
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Address Sanitizer helps finding issues related to memory: buffer
overflows, usage of uninitialized memory, etc. This is available in
both Clang and GCC for a while, and, since the POSIX port is only
meant for testing, this will help find issues.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
This patch adds basic support and documentation for the STM32F723E-DISCO
board, with GPIO, USART, I2C and USB support. Two USARTs are enabled,
the VCP one for the console and the Arduino one. The GPIOs are
configured for the 3 LEDs and the button available on the board.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
The STM32F723 has more interrupts than the STM32F746 due to the
additional SDMMC controller. Besides that the changes are very
similar to the ones of the STM32F746.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Fix possible null pointer dereference if the device
descriptor is not complete.
Fixes: #8700
Coverity-ID: 186841
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
memcpy copies upto (rc-1)th index but the write of NULL character
to the string is at (rc+1)th index skipping (rc)th index.
The fix addresses this as well.
CID: 186491
Fixes Issue #8280
Signed-off-by: Subramanian Meenakshi Sundaram <subbu147@gmail.com>
Older Git versions still do not support the -C argument for specifying
the working directory. Switch to using cmake WORKING_DIRECTORY instead.
This fixes#7287 again after commit 5e7e1cb.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Define the pinmuxing for I2Sx_CK, I2Sx_SD and I2Sx_WS wires (with
'x' in the range 1 to 5). The multiplexing has been selected in
accordance to the ArgonKey board requirements.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
By default gPTP is not run over VLAN but if needed that can be
done by setting CONFIG_NET_GPTP_VLAN and CONFIG_NET_GPTP_VLAN_TAG
options.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
A small helper function will return information whether
a given network interface has VLAN enabled or not.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Unconditional CONFIG_BT_SPI_BLUENRG flag activation was generating
a systematic warning.
Move it in Kconfig.defconfig file to avoid the warning
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
The ArgonKey board has 12 leds controlled by TI LP3943 led
controller. Add the support in the BSP.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
This commit updates the compile options in cmake to distinguish
between ARMv8-M Mainline MCUs with or withouth the optional DSP
extension. A new Kconfig option: ARMV8_M_DSP, is introduced, to
signify the use of an ARMv8-M MCU with DSP support.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
When we enabled SEGGER support on the nRF51 series SoCs, this sample
started to fail due to small amount of memory avaiable on some nRF51
SoCs. This commit updates the min_ram property in order to exclude
failing boards from the build.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
All chips from nRF51 and nRF52 series support Segger RTT,
so we can enable it if given series is used.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
This is a public macro which calculates the size to be allocated for
stacks inside a stack array. This is necessitated because of some
internal padding (e.g. for MPU scenarios). This is particularly
useful when a reference to K_THREAD_STACK_ARRAY_DEFINE needs to be
made from within a struct.
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
Type of num_bytes unnecessarily limits number of possible
bytes in the burst transmissions. Replace num_bytes type
u8_t with u32_t.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Now that it is possible to easily add Kconfig options from command
line, we do not need to always compile native_posix with coverage.
This was done only to have it set easily for sanity_check.
So do not select it anymore, and let users choose if they
want coverage dumps or not.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Now that the native_posix board is not built by default
with coverage, and that sanitycheck has an option to set it to,
let's explicitly tell sanitycheck to build unit tests and
for the native_board with coverage enabled.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Added a new command line options to sanitycheck:
--enable-coverage which will compile for native_posix
with CONFIG_COVERAGE set, and unit tests accordingly.
+
Now -C --coverage implies also --enable-coverage.
Background:
After 608778a4de
it is possible to add Kconfig options from command
line during the cmake invocation.
So we can use it to set CONFIG_COVERAGE for the native_posix
target when we need to instead of relaying on it always
being compiled with coverage enabled.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
The user name aescolar-ot was changed to aescolar so this
file needs to be updated accordingly
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Since the PCA10040 contains the required DC/DC circuitry, enable it by
default while keeping it configurable. This reduces power consumption
during radio activity.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Since the PCA10040 contains the required DC/DC circuitry, enable it by
default while keeping it configurable. This reduces power consumption
during radio activity.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Tests and samples are not part of the Zephyr code and should not
contribute to the final coverage reports. This will allow us to get
exact numbers about what is being covered or not in CI without the need
to go and look into files individually.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add sample application for NXP PCA9633 LED driver. This application
test the 4 LEDs by doing the following:
- turn on LEDs
- turn off LEDs
- set the brightness to 50%
- turn off LEDs
- blink the LEDs
- turn off LEDs
The application is based on the stm32373_eval board and expects to have
a PCA9633 LED driver on the bus I2C-1 at the address 0x62.
Signed-off-by: Sebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>
Add support for NXP PCA9633 an I2C 4-bit LED driver.
Supported blinkink period: 41ms to 10667ms
Supported brightness value: 0 to 100%
This driver supports the following APIs:
1. led_blink
2. led_set_brightness
3. led_on
4. led_off
Signed-off-by: Sebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>
This commit cleans up source files in soc/nrf51 soc/nrf52
folders by removing unnecessary header inclusions.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit removes the inclusion of kernel_includes.h from
the nRF51 and nRF52 soc.h headers. This prevents from an
inclusion cycle formation on soc.h. In the wake of
kernel_includes.h removal, necessary header files have been
added in several source files to be able to compile Zephyr for
nRF5x SOCs.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Do not clear pending PDELAY_REQ pointer when sending a new one.
Unref the state->tx_pdelay_req_ptr first and only then set the
new pointer value. This will prevent buffer leak if we miss the
response from the peer.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Make sure that the calculated ratio values are used just once.
Without this, if the ratio is even insignificantly larger than 1, the
actual clock quickly drifts to really large numbers. This causes the
sync procedure to restart too often.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
The problem with the previous approach was that the response timestamp
callback which calls net_pkt_unref could be skipped if the callback was
already registered for another packet. The net_pkt_ref function was
always called which led to memory leaks.
This commit simply disallows handling multiple pdelay requests at once.
If the timestamp callback is already registered, the received request
will not be handled.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
The issue was that the length field of the tlv extension in the sync
follow up packets was wrong. It is supposed to skip the length of the
header of that extension. The easiest fix was separating the header and
the actual contents into separate structs and that's what this commit
does.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
As the PTP clock should return the correct time, use that
instead of zephyr uptime for time as that has only ms accuracy.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>