The Kconfig sybmol referenced in the comment is called
CONFIG_RISCV_SOC_CONTEXT_SAVE not CONFIG_RISCV_SOC_CONTEXT.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
* MIN_DELAY: 1024 -> 512
* optimzie some code sequence
* fix a bug in setting the new timer limit value
* case: before set limit register with new value,
if counter rolls back to 0, the limit value should be
adjusted.
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
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>
Error code SL_ERROR_BSD_ESECUNKNOWNROOTCA is returned from sl_Connect()
when the root CA used is not part of the certificate catalog on the
network processor. We should warn the users about this and continue on,
given the connection is successful.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
This commit makes the necessary changes to allow the following tests
to run on cc3220sf_launchxl:
- mqtt_packet
- mqtt_publisher
- mqtt_subscriber
- mqtt_pubsub
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>
simplelink_socket() is not returning non-zero socket file descriptors
when it succeeds. This leads to socket() to always return socket fd 0,
even when the network processor returns a non-zero fd.
This commit fixes simplelink_socket() to return the correct socket fd
when it succeeds in getting one from the network processor.
Fixes#12650
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
The SSD1673 driver currently use k_busy_wait to wait for the
controller to finish the execution of a commmand. However a display
update command can take from a few hundreds of ms (default LUT) to
almost a second (initial LUT). k_busy_wait is just a spinning loop,
which prevents all the threads with lower priority to not be executed
during that time. That could be the case for example of the shell or
the log thread.
As the timing is not critical, it's better to use k_sleep instead,
allowing the CPU to process other threads. In the long term it might
even be better to use an interrupt there, but might not be that easy if
we want to support to various SoCs that can be connected to such a
display.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
cmsis provides intrinsic functions to configure processor special
function register like control, psp(process stack pointer). Let's use
these functions which are maintained in cmsis repository.
This patch uses cmsis function to:
- set process stack pointer(PSP)
- switch SP to PSP
- disable interrupts
It also moves stack initialization from assembly to C
Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
The smp_timer_init() was removed during timer re-write.
This results in undefined references error during compilation
when CONFIG_SMP=y. So add it back so we can compile for SMP.
The logic is updated from the previous version to the latest
in the driver.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
There was a false timeout error because we did not check the
return value correctly. This issue is seen now because code
flow in core IP stack is happening in different order than
before.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If the net_context functions are accessed from preemptive priority,
then we need to protect various internal resources.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
exti driver implementation does not fit all SoCs because
some EXTI ip does not match stm32_exti register map provided.
Instead of providing exti register map for all SoCs, use LL API
which abstracts IP variations and enable uniform use of the drivers
on all STM32SoCs.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
We had been search for <BOARD>.yaml, however its possible that doesn't
match anything and we actually use <BOARD>_defconfig in
boilerplate.cmake. So search for *_defconfig instead of *.yaml to
generate the <BOARD> list.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Use the new DT_<COMPAT>_<INSTANCE>_<PROP> defines to instantiate
devices. This commit adds also ability to define individual pin
locations on SoC series that support the feature. Definitions of GPIO
pins assigned to a given location have been moved from soc_pinmap.h file
to board DTS file.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
We get the following warning when buiding with gcc8:
error: 'packed' attribute ignored for type 'u32_t *'
{aka 'unsigned int *'} [-Werror=attributes]
Use UNALIGNED_GET() to access the data since we don't know the
alignment.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Validates the gpio pin number before using it to index into a
memory-mapped register array. Otherwise, a user could send a high pin
number and cause an out-of-bounds access.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
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>
PR #9522 series ending with commit c2c9265b7d ("tests: cmsis: Disable
two cmsis portability tests on x86_64") added -mx32 support for the
x86_64 ARCH and qemu_x86_64. While this was implemented in
"compiler/gcc/target.cmake" as fall back from cross-compilation to the
host compiler, it worked with a direct ZEPHYR_TOOLCHAIN_VARIANT=host
too.
Later, -lgcc was added to "compiler/host-gcc/target.cmake" by PR #12674
to fix the -m32 x86 build. This broke the x86_64 build when using
ZEPHYR_TOOLCHAIN_VARIANT=host because even "multilib" packages usually
don't feature the -mx32 version of libgcc.
Fix this by excluding -lgcc in compiler/host-gcc/target.cmake just like
compiler/gcc/target.cmake always did for x86_64.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This patchset introduces support for building a board specific custom
image for intel_s1000_crb. This pads the output binary (zephyr.bin)
with some additional data as required by the s1000 BootROM.
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
This patchset introduces support for building board specific custom
images. Any board which needs to build a custom image (a post-processed
zephyr.bin) should inject the post_build_command from a script in the
corresponding board directory.
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@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>
Create a reference page for each peripheral and move doxygen API
reference to the main documentation page.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
We get the following warning with sdk-ng:
drivers/sensor/lis2dh/lis2dh.c:210:38: error: bitwise comparison
always evaluates to false [-Werror=tautological-compare]
if ((value & LIS2DH_LP_EN_BIT_MASK) == 1 && ...
^~
The test needs to be:
(value & LIS2DH_LP_EN_BIT_MASK) == LIS2DH_LP_EN_BIT_MASK
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
pinmux dev isn't really used or supported. We only have one driver that
is implmeneted, and that driver isn't ever enabled.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Log backends (marked as autostart) are initialized late. By default
in logger thread which has the lowest priority. If log_panic() occurs
earlier no logs is printed because there is no backend enabled.
This patch fixes it by adding log_init() call to log_panic(). Log_init()
can be called multiple times.
This patch ensures that logs are printed if early panic occurs if
backend is configured to auto-start. This is not the case if shell
is acting as log backend.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
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>
Update to new OpenAMP v2018.10 release. This release allows us to
utilize just rpmsg without remoteproc. The API set has changed and
requires updates to the openamp sample. Additionally, the changes
in this release reduce the code size footprint, and support a static
allocation memory model.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The fix in commit e664c78b82 ("kernel/timeout: Fix recursive
spinlock in z_set_timeout_expiry()") missed a spot that had also been
introduced with recent locking work. The new
_get_next_timeout_expiry() implementation takes its own lock, which is
recursive when called from z_clock_announce(). Fix by calling the
wrapped implementation instead.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
There was an existing validation layer in the spinlock implementation,
but it was only enabled when both SMP and CONFIG_DEBUG were enabled,
which meant that nothing was using it. Replace it with a more
elaborate framework that ensures that every lock taken is not already
taken by the current CPU and is released on the same CPU by the same
thread.
This catches the much more common goof of locking a spinlock
recursively, which would "work" on uniprocessor setups but have the
side effect of releasing the lock prematurely at the end of the inner
lock. We've done that in two spots already.
Note that this patch causes k_spinlock_t to have non-zero size on
builds with CONFIG_ASSERT, so expect a little data and code size
increase. Worth it IMHO.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
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>