Add enum to list what values of maximum-speed are exceptable since
enum's get represented as strings in DT. This also allows us to
generate a code enum to correspond to the string.
We also introduce include/dt-bindings/usb/usb.h which is a hand coded
definition of the enum. We don't have a great way to generate this
right now, however it would be better if we did.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add specific enum generation support related to usb 'maximum-speed'
property. This will generate a define with _ENUM with the integer
value of the enum as its ordered in the YAML. The assumption right
now is that there's a matching enum in the code.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
When using the procedure Read By Type the response may contain multiple
instances so it needs to be parsed properly. When dealing with long
values only the beggining will be read, for the remaining bytes the
application should issue another bt_gatt_read with offset so Read Blob
procedure is used as recommended by the spec:
BLUETOOTH CORE SPECIFICATION Version 5.1 | Vol 3, Part F page 2312:
The Read Blob Request would be used to read the remaining octets of a
long attribute value.
Fixes#16107
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
With -O0 optimizion, gcc compiler doesn't inline "static inline"
marked function. So when function call return from function
set_and_switch_to_psp which is to switch sp from MSP to PSP, the
ending "mov sp, r7" instruction will overwrite the just updated
sp value(PSP) with the beginning stack pointer(should be MSP)
stored in r7 register, so the switch doesn't happen. And it causes
unpredictable problems in the initialization process, the backward
analysis for this problem can be found on Github issue #15794.
Fixes: #15794.
Signed-off-by: Wentong Wu <wentong.wu@intel.com>
If host is NULL and ai_flags are AI_PASSIVE in a call to
getaddrinfo(), need to return "any" address.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Allows specifying the 'overlap' argument in IntelHex::merge().
This is identical to the --overlap argument in hexmerge.py, which
is bundled with IntelHex.
Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
The value of GPIO_INT_ACTIVE_LOW is 0, so the bit checking if statement
is never executed. Use GPIO_INT_ACTIVE_HIGH when checking this bit.
Fixes#16162
Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
- Make the 'C++ Standard' choice depend on CPLUSPLUS, so that it only
shows up when C++ support is enabled.
Also check that CPLUSPLUS is enabled before checking the standard in
the top-level CMakeLists.txt, to avoid triggering an assert.
- The 'C++ Options' menu now contains just CPLUSPLUS and its indented
children. Remove one menu level by removing the menu and turning
CPLUSPLUS into a 'menuconfig' symbol. Also change the prompt from
"Enable C++ support for the application" to just "C++ support for the
application", to make it consistent with e.g. "Logging".
- Factor out the common CPLUSPLUS dependency with an 'if CPLUSPLUS'.
- Order symbol properties more consistently with other Kconfig files,
with the prompt at the top, etc.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Let's not mess with CommandContextError here, as the APIs have gotten
messed around a bit in various versions. Just use log.die() as that
will work with current and future west versions, and is clearer anyway.
Fixes west 247.
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
The current order makes no sense. Move it earlier in the order, so the
catch-all page appears last.
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
Grammar and formatting improvements, as well as changes requested in
review that weren't made (in particular, the ones recommending using
"pip3 show -f west" to see where west is installed instead of listing
common places that might not be right.
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
If reception was longer than rx timeout, UART_RX_RDY event
would provide data with delay, and synchronise at buffer end.
This change makes sure that all data is given to user when timeout
occurs.
Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
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>
MHU (Message Handling Unit) enables software to raise interrupts to
the processor cores. It is enabled in SSE 200 subsystems.
This patch aims to implement inter processor communication.
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>
Zephyr requires braces on every code block that a keyword introduces, so
list the complete set in the documentation.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add LiteX with softcore CPU VexRiscV SoC definitions and default
configurations.
Signed-off-by: Filip Kokosinski <fkokosinski@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
Add LiteX interrupt controller driver and bindings for this device.
Signed-off-by: Filip Kokosinski <fkokosinski@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
Add LiteX timer driver with bindings for this device.
Signed-off-by: Filip Kokosinski <fkokosinski@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
Add LiteX UART driver with bindings for this device.
Signed-off-by: Filip Kokosinski <fkokosinski@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
Adding missing erase-block-size entries for the flash-controller
nodes in the nrf52810 and nrf52811 .dtsi files.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Move flash-controller and SRAM node definitions under SoC node.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Add an option for building with newlib-nano library.
The newlib-nano library for ARM embedded processors is a part of the
GNU Tools for ARM Embedded Processors.
Add mem_alloc tests with newlib nano.
Signed-off-by: Benoit Leforestier <benoit.leforestier@gmail.com>
The 'Console' menu contains just 'config CONSOLE_SUBSYS' and its
indented children.
Remove one menu level by removing the 'Console' menu and turning
CONSOLE_SUBSYS into a 'menuconfig' symbol.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This commit fixes a build error, when building with
CONFIG_ARM_SECURE_FIRMWARE=y. The error was introduced
in #15930 (6f19d0), where we added internal structure
to the exception stack frame struct.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This menu contains just the IMG_MANAGER symbol and its children. Remove
one menu level by making IMG_MANAGER a top-level 'menuconfig' symbol
instead.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
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>
The CONFIG_CLOCK_CONTROL and CONFIG_NRF_RTC_TIMER were
unconditionally selected when enabling any nRF SoC. But since
timers can be disabled in the kernel, depend instead on
CONFIG_SYS_CLOCK_EXISTS, which is only defined when kernel
timer support is included.
Note that ideally we would enable CONFIG_NRF_RTC_TIMER only, and
that would select CONFIG_CLOCK_CONTROL (on which the RTC timer
depends) but there is a circular Kconfig dependency that prevents
us from doing so.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
When compiling the kernel with CONFIG_SYS_CLOCK_TICKS_PER_SEC=0,
the CONFIG_SYS_CLOCK_EXISTS internal variable is unset.
This completely disables timer handling in the kernel, but a couple of
spots missed the required conditional compilation.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Reduced Kconfig for counter with nRF TIMER and RTC. Added overlays
for TIMER and RTC configuration in the counter test.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Port fix for #14044 from legacy LL to split LL.
The master is using unknown rsp to terminate slave side initiated
procedures that has collided with the encryption procedure initiated by
the master.
We need to handle an unknown response that is sent in unencrypted during
the encryption procedure, even though we have already set up to receive
encrypted packets.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Remove comment stating that UNKNOWN_RSP during encryption procedure
is a workaround.
The core spec mandates that connections should not be dropped if
receiving this control packet during encryption procedure.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Use the new math_extras functions instead of calling builtins directly.
Change a few local variables to size_t after checking that all uses of
the variable actually expects a size_t.
Signed-off-by: Jakob Olesen <jolesen@fb.com>
The implementation of the <misc/math_extras.h> functions will use the
portable C code when PORTABLE_MISC_MATH_EXTRAS is defined before
including the header.
Use this feature macro to make sure that the unit test always tests the
portable functions in addition to the ones using builtins for the
current compiler.
Signed-off-by: Jakob Olesen <jolesen@fb.com>
When available, use the GCC / Clang builtins to implement the
math_extras functions. Otherwise, use the portable versions.
Signed-off-by: Jakob Olesen <jolesen@fb.com>
Compilers based on Clang provide a __has_builtin(x) macro which can be
used to detect in the preprocessor if a given builtin function is
supported by the compiler.
For other compilers (notably GCC), we provide an alternative definition
of HAS_BUILTIN(x) that depends on the toolchain-specific header file to
declare which builtin functions are supported based on the current
compiler version.
Signed-off-by: Jakob Olesen <jolesen@fb.com>