Picolibc doesn't always use an __errno function, preferring to use TLS
errno variable instead as that's more efficient. But, that means
applications shouldn't dig through the original errno abstraction to
use the underlying implementation directly.
Signed-off-by: Keith Packard <keithp@keithp.com>
The normative spec says this returns `pthread_t`, not `void *`.
It's probably better to simply `#include <pthread.h>` outside
of this file explicitly (due to current non-standard prefixed
path in Zerphy) than to re-declare it with a potentially
conflicting signature.
Signed-off-by: Chris Friedt <cfriedt@meta.com>
Used by Zephyr's TI CC13xx/CC26xx ADC driver which requires
additional functions not found inside the SOC ROM (e.g.,
`AUXADCEnableSync` errata workaround).
Signed-off-by: Stancu Florin <niflostancu@gmail.com>
The TI HAL requires certain definitions, e.g. DeviceFamily_XYZ to be
present when compiling, as some public headers require them. Instead of
manually injecting them to every file because one of its includes
requires it, just insert global level definitions. This makes sure
they'll be made available where necessary without the need of individual
hacks.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Update the HAL to TI SimpleLink SDK 4.40.
Retains Zephyr-specific patches.
Note: PRCMPowerDomainStatus was renamed to PRCMPowerDomainsAllOn, so Zephyr
drivers will require updating!
Signed-off-by: Stancu Florin <niflostancu@gmail.com>
These sources are required for CC13xx/CC26xx on-chip flash driver which
makes use of TI's HAL functions and some of them are not inside ROM.
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Zephyr has prefixed all of its includes with <zephyr/...>. While the old
mode can still be used (CONFIG_LEGACY_INCLUDE_PATH) and is still enabled
by default, it's better to be prepared for its removal in the future.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Zephyr has prefixed all of its includes with <zephyr/...>. While the old
mode can still be used (CONFIG_LEGACY_INCLUDE_PATH) and is still enabled
by default, it's better to be prepared for its removal in the future.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Instead of using `#include <posix/time.h>`, just use `#include <time.h>`.
Required-by zephyrproject-rtos/zephyr#43998
Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
The API has changed to:
pm_constraint_set: pm_policy_state_lock_get
pm_constraint_release: pm_policy_state_lock_put
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The constraints API offered by TI HAL is meant to be used externally,
for example, when implementing a policy using their policy mechanism
(not used on Zephyr). The API is likely designed for systems where a
thin RTOS is used (e.g., FreeRTOS, TI-RTOS?), places where you basically
get a Kernel and a few services around, but not a system like Zephyr
where you also get, for example, a power management subsystem. This
means that it gets difficult for an RTOS like Zephyr to use such HAL
APIs while using its own constraints API. The first question is why we
allowed such kind of HAL code to be part of upstream Zephyr. It
certainly does useful things, but it is also uses a HAL infrastructure
which is hardly exportable to an RTOS like Zephyr. Part of the
Power_init() code, for example, should likely be in a clock controller
driver, where Zephyr APIs can be used.
This patch forwards PM state constraints to Zephyr, so that we don't
need hacks on the Zephyr side like allowing re-implementations of the
constraints API.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
IRQ_CONNECT() requires that all parameters be known at compile-time, but
that is not the case with the interrupt priority. Instead, use
irq_connect_dynamic() which allows runtime arguments.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Temporarily revert the change from
9b56312f9a as zephyrproject-rtos#24873
is not yet merged, and without it, build errors would occur while
running sanitycheck.
Signed-off-by: Vincent Wan <vwan@ti.com>
Minor tweaks to the SlNetSock code to avoid errors/warnings
when building for Zephyr, due to its stricter build flags and its
idiosyncrasies around its posix implementations.
Signed-off-by: Vincent Wan <vwan@ti.com>
Bring in SlNetSock and its associated modules from the TI CC32xx
SimpleLink SDK 4.10.00.07. SlNetSock is a module that implements a
higher-level, BSD-socket-like abstraction that has the ability to
support multiple network interfaces. When used on top of the native
SimpleLink WiFi Host Driver API, it provides extra network-related
functionality such as getaddrinfo(), which is necessary for addressing
zephyrproject-rtos/zephyr#11890
Origin: Texas Instruments cc32xx SimpleLink SDK
License: BSD 3-Clause
URL: http://www.ti.com/tool/download/simplelink-cc32xx-sdk
Purpose: Provide access to SlNetSock functions for TI CC32XX SoC
Maintained-by: External
Signed-off-by: Vincent Wan <vwan@ti.com>
Support for patching radio core for BLE
Also, correct use of
zephyr_sources_ifdef -> zephyr_library_sources_ifdef
Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
RFCC26X2_multiMode.c references Temperature_getTemperature()
but source/ti/drivers/temperature/TemperatureCC26X2.c was not
previously linked in.
Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
rfc.c should be added back to the list of files in driverlib to be
compiled, as it is needed by IEEE 802.15.4 driver.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Fixing build warnings that are seen as an extra pair of braces is
missing around the initializer for a structure which first field
is another structure.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Update the HAL to new TI SimpleLink SDK, including driverlib, rf
patches and TI drivers.
Add the temperature driver in order to support new changes in the
Power Manager.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Replace DT_ARM_CORTEX_*_0_CLOCK_FREQUENCY with a PATH based reference
to cpu@0 (DT_PATH(cpus, cpu_0)) and than getting the clock_frequency
property:
DT_ARM_CORTEX_*_CLOCK_FREQUENCY ->
DT_PROP(DT_PATH(cpus, cpu_0), clock_frequency)
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Remove hacks that were introduced when it was not possible to include
this header earlier, and directly include the header from Zephyr. This
would allow new changes (such as the recent change to modify
clock_gettime() into a syscall) to be reflected in the HAL.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
When creating or constructing a semaphore, the count passed in is
incorrectly being ignored. We need to fix SemaphoreP_create/construct
to pass the initial count to k_sem_init().
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
This commit fixes ClockP to use correct struct size, to set the correct
period and timeout in call to k_timer_start, and to deal with NULL
parameters in ClockP_construct.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Implementing a few functions that are necessary for the RF driver
to build:
- ClockP_getTimeout
- ClockP_isActive
- ClockP_destruct
- SemaphoreP_construct
- SemaphoreP_constructBinary
- SemaphoreP_destruct
- HwiP_post
- HwiP_setFunc
- HwiP_destruct
Zephyr expects interrupts to stay disabled when running hooks during
resume. Hence we must modify Power_sleep to leave interrupts disabled.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
This commit updates the dpl layer for Zephyr to support the Power
manager module on the CC13x2/CC26x2 family of devices.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>