That means that when mbedTLS will need functions like snprintf(),
printf(), a few others, they will be used from libc, as done
normally by most of software. Note that mentioned functions
aren't normally used on code paths doing TLS communication per se.
Instead, they are used by debug logging, additional "print info"
style functions, etc.
Before, when MBEDTLS_PLATFORM_NO_STD_FUNCTIONS was defined, those
functions were stubbed out, so silently didn't work as expected
(a specific symptom seen was that some debug messages were printed
as garbage, because an buffer on stack was passed to dummy snprintf
stub, which didn't do anything to it, and its uninitialized contents
were printed afterwards. Instead, the expectation was that an
application would call a "setter" function to set snprintf, etc.
implementations as provided by application itself.
For Zephyr, we clearly don't need to burden applications with such
setup, instead Zephyr, as an OS, provides integrated environment
were matters like that "just work". So, we just switch to libc-based
functions. If there ever will be usecases for
MBEDTLS_PLATFORM_NO_STD_FUNCTIONS, it can be made configurable later.
Fixes: #16303
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Execute the test binary from the output directory instead of directory
where sanitycheck was started.
This will ensure that any artifact created with a relative path by the
test binary will be placed in the output directory instead of creating
the artifact in the directory where sanitycheck was executed and prevent
any possible conflicts.
Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
Documentation moved to the right place.
The argument name of the macro is aligned between the macros.
Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
It is recommended that multibyte (burst) transfers are used to read
acceleration and temperature data. This ensures the data is concurrent
and complete.
Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
Enables the mcux lpi2c shim driver and pin muxes on the mimxrt1060_evk
board. Updates the board documentation and yaml supported list
accordingly.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Since there is no NFC antenna connector on the dongle and the pins
P0.09 and P0.10 that are dedicated to NFC functionality are in the
group of just a few ones available for external connections, it seems
more reasonable to configure these pins by default as regular GPIOs,
as users will most likely want to use them in this way.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
when kobject text area is greater than CONFIG_KOBJECT_TEXT_AREA,
there will be location counter backwards, change it to assert to
prompt configuring CONFIG_KOBJECT_TEXT_AREA larger.
Fixes: #16307.
Signed-off-by: Wentong Wu <wentong.wu@intel.com>
OpenThread uses CONFIG_OT_PLAT_FLASH_PAGES_COUNT to calculate the # of
pages at the end of flash to use for storing OpenThread settings.
This calculation has an off-by-one error which sets the offset for
the storage area as 1 page of flash too low.
For example, on nRF52840:
- default setting for CONFIG_OT_PLAT_FLASH_PAGES_COUNT is 4
- flash size is 1MB (0x100000)
- flash page size is 4096 (0x1000)
- expected offset is 0xfc000
Using the current logic we get an offset of: 0xfb000
Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/16339
Signed-off-by: Michael Scott <mike@foundries.io>
If we have something like:
#address-cells = <1>;
#size-cells = <0>;
intc: ioapic@fec00000 {
compatible = "intel,ioapic";
reg = <0xfec00000 0x100000>;
};
We should generate:
DT_INTEL_IOAPIC_FEC00000_BASE_ADDRESS_0
DT_INTEL_IOAPIC_FEC00000_BASE_ADDRESS_1
Instead we generated:
DT_INTEL_IOAPIC_FEC00000_BASE_ADDRESS
DT_INTEL_IOAPIC_FEC00000_BASE_ADDRESS_1
This was due to logic deciding if '_0' should be used not taking into
account #address-cells & #size-cells correctly.
Fixes: #16296
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
If the system sets its clock frequency at runtime, this is
stored in a variable that can't be directly read by user
mode. For this case only, add a system call to fetch its
value and modify the definition of
sys_clock_hw_cycles_per_sec() to use it.
Since this is now a system call, store in a temporary variable
inside z_ms_to_ticks(). The syscall overhead only applies
when called from user mode, other contexts are completely
inlined.
Added stub syscall header for mocking framework, to get rid
of inclusion errors.
Fixes: #16238
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The node name for device_id was device_id@0 it should be
device_id@80a00c to reflect the first register region
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
import linux-v5.1:Documentation/devicetree/bindings/vendor-prefixes.txt
Use vendor-prefixes.txt to check vendor prefixes
used in compatible strings and property names.
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Previous the register size was 1M, technically the there are only a
small handful of registers defined in the IOAPIC, so shrinking the size
to 4k, so its as most one page large.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The IOAPIC node shouldn't have been in the cpu container, especially
since the cpu container does:
#address-cells = <1>;
#size-cells = <0>;
So the reg field of the IOAPIC would be treated as 2 registers instead
of a register and size. Move IOAPIC node out of the CPU node fixes this
issue.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This tries to build gpio without any driver which fails at cmake time
like this:
CMake Error at ../../../cmake/extensions.cmake:378 (add_library):
No SOURCES given to target: drivers__gpio
Call Stack (most recent call first):
../../../cmake/extensions.cmake:355 (zephyr_library_named)
../../../drivers/gpio/CMakeLists.txt:3 (zephyr_library)
Remove TEST_USERSPACE workaround added in commit 3b53e69249 which
added gpio_handlers.c to the SOURCES.
Fixes#15232.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Introducing the macro toolchain_cc_warning_error_implicit_int which,
abstracts the implicit_int error flag thus leaving it to the toolchain
to decide whether this flag is needed or not.
The intent here is to abstract Zephyr's dependence on toolchains,
thus allowing for easier porting to other, perhaps commercial,
toolchains and/or usecases.
No functional change expected.
Signed-off-by: Danny Oerndrup <daor@demant.com>
The macros are named toolchain_cc_warning_error_misra_sane and
toolchain_cc_cpp_warning_error_misra_sane
These macros provide toolchain specific flag(s) relating to the MISRA
SANE configuration option.
The macros will place the flag(s) in a variable provided by caller,
which can then add to zephyr compile options.
The intent here is to abstract Zephyr's dependence on toolchains,
thus allowing for easier porting to other, perhaps commercial,
toolchains and/or usecases.
No functional change expected.
Signed-off-by: Danny Oerndrup <daor@demant.com>
Code refactored to allow calling of a proprietary rx demux function.
This will enable implementation of proprietary protocols and
functionality that is not yet public, while keeping a common zephyr
code base.
Signed-off-by: Asger Munk Nielsen <asmk@oticon.com>
Fixes USB3CV Tool tests. One case is enabling endpoints with Set
Interface after Set Configuration. In this case we report warning and
continue without returning error.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This patch fixes following bug:
After first GC operation the 1st sector had become scratch
and the 2nd sector had became write sector. After that NVS
was initialize (via reboot) again - it recognized the 1st
sector as write sector and 2nd as undone GC destination sector,
therefore it cleared 2nd sector and re-run GC, which implied data loss.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Test that k_usleep() allows sleep durations near the limit of what
the platform's tick rate will allow.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
Add k_usleep() API, analogous to k_sleep(), excepting that the argument
is in microseconds rather than milliseconds.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
Current z_impl_k_sleep() does double duty, converting between units
specified by the API and ticks, as well as implementing the sleeping
mechanism itself. This patch separates the API from the mechanism,
so that sleeps need not be tied to millisecond timescales.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
Move to a new guide which will expand on how to submit modules and how
to maintain them.
Also move topology documentation to repository management section where
it fits better.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
A conditional block to save a directed advertising report flag was
present three times. Remove two of the blocks.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
These definitions were left incorrect after a gpio-map change was
added to the PR introducing the boron support for the SARA-R4 modem.
Correct the gpio defintions here so that the boron build doesn't
break.
Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/16289
Signed-off-by: Michael Scott <mike@foundries.io>
builds@lists.zephyrproject.org archives the CI build results for every
and nightly build. Add references to this in the contribution
guidelines and introduction (pulled from README).
Also added a reference to the "Asking for Help" doc (there was a note to
add this once that doc was merged).
Fixes: #15652
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
GATT long messages require buffers to store multiple packets. The actual
configuration for the bluetooth peripheral sample defines only two
buffers to store these messages. As the default ATT payload size is
18 bytes, the maximum payload size for a long ATT message is 36 bytes.
As the variable `vnd_long_value[]` has a defined size of 74 bytes, it
cannot be fully modified due to the 36 bytes limitation.
Set CONFIG_BT_ATT_PREPARE_COUNT=5 so all the maximum payload size goes
to 90 bytes and all the 74 bytes can be written to `vnd_long_value[]`.
Signed-off-by: Joao Cordeiro <jvcc@cesar.org.br>
There was a missing break at the end of the high speed setup case,
so it would always return -ENOTSUP even when the high speed baud
was available.
Signed-off-by: Derek Hageman <hageman@inthat.cloud>