Return -EAGAIN on k_sem_take() failure to take write lock, the error
code is similar to nrfx write_in_progress flag.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@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>
The UARTs are on the SoC, not the board, so move their descriptors
to the SoC-level. Also turn on auto IRQ detection as these are PCI-
attached and their IRQs are subject to change depending upon firmware
settings.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
If a UART is configured with IRQ == PCIE_IRQ_DETECT, then use the
pcie_wired_irq() to determine the IRQ at runtime, and install the
handler using the dynamic interrupt mechanism.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
The per-UART configuration is boilerplate that is becoming a maintenance
nightmare as it grows. A template file is created, and instances are
created as needed by cmake at build time.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
Firmware is supposed to set a register in PCI configuration space which
indicates the hardware IRQ that the endpoint is attached to.
A function is implemented which reads this register, and the PCIe shell
is updated to use it instead of doing it "manually".
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
I'm the de-facto maintainer of all things Apollo Lake these days,
and the Apollo Lake begins with the up_squared.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
Notably fix the wrong comment I added in commit 6f011c95c477: when
testing with QEmu sanitycheck does _not_ spawn QEmu; it relies on "make
run" instead.
Searching the code for "Spawning" now cycles directly to all the places
starting processes and threads.
- Sample -v -v verbose output (lines wrapped for commit message check)
Spawning QEMUHandler Thread for \
qemu_x86/samples/hello_world/sample.helloworld 'make run'
- native_posix example:
Spawning process /home/.../sanity-out/native_posix/\
/samples/hello_world/sample.helloworld/zephyr/zephyr.exe
Spawning BinaryHandler Thread for native_posix/\
samples/hello_world/sample.helloworld
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Fixes the compile errors in various platforms like:
* sam_e70_xplained (too few network buffers)
* galileo, cc3220sf_launchxl and mps2_an385 (missing random number
generator configuration options)
Fixes#15878
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Since west's main.py relies on the args tuple with the returncode
and the cmd, create the CalledProcessError using the correct
positional args.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The TI CC1352R LaunchPad (LAUNCHXL-CC1352R1) is a development kit that
features the CC1352R SoC.
Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
The TI CC26x2R LaunchPad (LAUNCHXL-CC26X2R1) is a development kit that
features the CC2652R SoC.
Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
Add initial support for the TI CC13x2 / CC26x2 series with the CC2652R
and CC1352R SoCs. The UART and GPIO peripherals are supported. Drivers
use the driverlib HAL from the TI CC13x2 / CC26x2 SDK.
Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
The default customer configuration (CCFG) provided by the
TI CC13x2 / CC26x2 SDK puts the configuration in a section different
than expected by Zephyr. It has been modified to use the appropriate
section.
Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
Add low level drivers (driverlib) and RF patches from the TI CC13x2 and
CC26x2 SDK. These sources have been added unmodified with the exception
of converting DOS to UNIX line endings.
The majority of these APIs are available in ROM and inclusion of the
headers will map functions that are not inline to the ROM versions.
Origin: Texas Instruments SimpleLink CC13x2 and CC26x2 SDK
License: BSD 3-Clause
URL: http://www.ti.com/tool/simplelink-cc13x2-26x2-sdk
Purpose: Provides HAL for TI CC13x2 and CC26x2 SoCs
Maintained-by: External
Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
No functional change expected.
This is motivated by the wish to abstract Zephyr's usage of toolchains,
permitting non-intrusive porting to other (commercial) toolchains.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
The '#if XIP' in the DTS file never worked properly,
causing the QEMU build to think it has much more RAM
then it actually has. If RAM overflowed, this would not
be caught by the build, instead there would be strange
crashes when the data copy takes place.
The QEMU targets themselves are not XIP, everything
is actually RAM, but the first 4 megabytes are
considered to be a memory-mapped flash region. This
is done to ensure that the XIP data copying infrastructure
doesn't bit-rot on x86. We are at the point where
a lot of things depend on this, so just select it in
the board Kconfig instead of enabling in the
defconfigs.
Fixes: #15835
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This test uses ztest anyway, the default should be fine
just like any other test running under ztest.
k_thread_create() uses a lot of stack, and the main
stack size is very small if ztest is enabled. Do it in
another ztest task instead.
We don't need to mess with the main thread's priority,
just have the alt thread run cooperatively.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
We are just at the knife edge with 512, with stack
overflows being observed with stack canaries enabled.
Given the special case for the idle thread stack size
on this arch, seems reasonable to increase it here
for that arch.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Add a new "boards" command that is able to list all the boards in the
upstream tree. There is currently no support for out-of-tree boards.
The command executes cmake to use the built-in CMake script,
boards.cmake, to list the boards, and then stores the information
retrieved and allows the user to present it in a user-definable format.
Fixes https://github.com/zephyrproject-rtos/west/issues/53
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Move the existing CMake and build functionality from the west repository
to zephyr. The rationale behind this move is that it's very tightly
coupled with the Zephyr build system and is only used by the extension
commands implemented in the zephyr tree.
If additional extension commands in third-party repos want to use the
functionality they can add $ZEPHYR_BASE/scripts/west_commands to the
Python system path.
The implmentations in the west repo will be deprecated.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Fix "arduino_i2c not found" issue, similar to #13708
Add arduino interfaces in dts to board nrf52_10040
Signed-off-by: Aaron Tsui <aaron.tsui@outlook.com>
Fix set configuration request for a configuration without
specific endpoint like USB DFU class.
The changes introduced in commit 2b58594e90
("usb: device: Use set_endpoint helper for set_config")
does not take into account that a configuration could only
contain control endpoint.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
When some header are included into C++ source file, this kind of
compilations errors are generated:
error: invalid conversion from 'void*'
to 'u32_t*' {aka 'unsigned int*'} [-fpermissive]
Signed-off-by: Benoit Leforestier <benoit.leforestier@gmail.com>
Fix the missing reset of Encryption Procedure state when the
peripheral responded with error reason as pin or key missing
which otherwise caused connection disconnection on next
reception of data or control packet.
Relates to #15570, and #15727.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Enables BT_CTLR if BT is enabled, connects shell-uart to uart0,
and enabled NRFX uart driver by default.
Signed-off-by: Tavish Naruka <tavishnaruka@gmail.com>
Initialize the Floating Point Status and Control Register when in
Unshared FP Registers mode (In Shared FP Registers mode, FPSCR is
initialized at thread creation for threads that make use of the FP).
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit removes the activation of the FP context
in ARM system boot. There is no need to do this, since
the FP context will be activated in the presence of
floating point instructions. We update the reference
documentation accordingly.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Under Unshared FP register mode we are not sharing the
FP context among different threads, so we do not need to
include the FP high registers bank in the thread.arch
container.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Under Unshared FP register mode we are not stacking the
FP context in exception entries, so we do not need to
include the FP registers bank in the exception stack
frame structure.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Under unshared FP registers mode the FP register bank is
meant to be used by a single thread context. Therefore,
there is no need for automatic stacking of the FP register
bank at exception entries, or context switch, as the
registers are not expected to be shared among multiple
contexts.
Under unshared FP registers mode we only need to clear the
FPSCR register once, before jumping to main(). However, we
initialize the FPSCR already at boot in case FP operations
need to be performed during boot.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
In ARM builds with FP services (CONFIG_FLOAT=y) but without user
mode support (CONFIG_USERSPACE=n) we do not need and should not
enable full-access to the FP co-processor. Instead, we should
enabled access by privileged code only.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This is a workaround for IOP issue, where peer rejects LLCP Slave
Connection Parameter Request with LMP Error Transaction Collision
error code even if previous request is complete at the instant.
Signed-off-by: Alexander Svensen <alsv@nordicsemi.no>
On some systems where you don't have access to `PATH` and you can't
set the `ENV{PATH}` variable. You need to be able to pass the path
to the west executable down to the python script so it is better
for it to be set explicitly than assuming that it exsists as a
part of the PATH/executables in the shell being called.
Signed-off-by: Sigvart M. Hovland <sigvart.hovland@nordicsemi.no>
Implementation of pinmux for the stm32mp157c_dk2 board.
Some UART pin mux definition has been added (mainly for
UART console and UART/SPI Arduino shield support).
This can be completed with pin mux for other stm32mp157c
UART.
Signed-off-by: Yaël Boutreux <yael.boutreux@st.com>
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>
Add support for stm32mp1 basic UART API with Zephyr.
UART Console and UART shell are also supported.
Async UART API and USART support is to be done.
Signed-off-by: Yaël Boutreux <yael.boutreux@st.com>
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>