Commit Graph

12 Commits

Author SHA1 Message Date
Hess Nathan aaec285cd5 coding guidelines: comply with MISRA Rule 12.1.
-added parentheses verifying lack of ambiguities

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-06-03 16:10:33 -04:00
Tom Burdick 0650a88bed llext: Rework hello_world test case to be "simple"
The simple test is there to test the API and simple extensions in
unison. Hello world was intended to be the first not the only extension
being tested.

Also refactors the entry thread to allow for usermode potentially by
passing the pointer to the function symbol rather than having it look it
up directly.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-03-09 14:44:23 +00:00
Gerard Marull-Paretas 5113c1418d subsystems: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all subsystems code to
the new prefix <zephyr/...>. Note that the conversion has been scripted,
refer to zephyrproject-rtos#45388 for more details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-09 12:07:35 +02:00
Flavio Ceolin 8cbda26cdd logging: log_minimal: Fix violations to rule 10.4
Logical AND operator accepts only unsigned type and operands.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-04-20 15:50:49 -04:00
Flavio Ceolin 3687021c83 logging: log_minimal: Fix violation to rule 14.4
Non-boolean essential type is being interpreted as a boolean.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-04-20 15:50:49 -04:00
Flavio Ceolin 8c5a9ffaab logging: log_minimal: Fix violations to 21.2 and 8.3
Just renaming the function parameter fix two violations, one is
caused because the parameter name is different from the declaration
the other violation is because the identifier was starting with
underscore.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-04-20 15:50:49 -04:00
Flavio Ceolin ed6e016251 logging: log_minimal: Fix violations to rule 10.4
Fix violations for the rule 10.4.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-04-20 15:50:49 -04:00
Spoorthy Priya Yerabolu 6d10db3ed6 Coding guideline: Fixing code violations for 21.13 Rule
Any value passed to a function in <ctype.h> shall be
representable as an unsigned char or be the value EOF.

So changed type of variable to unsigned char.

Signed-off-by: Spoorthy Priya Yerabolu <spoorthy.priya.yerabolu@intel.com>
2021-03-05 10:53:13 +03:00
Krzysztof Chruscinski e0392c5a86 logging: Cleaning up log minimal
Removed printk.h include from log_core.h.

Since LOG_PRINTK cannot be enabled with LOG_MINIMAL removed
support for both.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-02-28 17:12:29 -05:00
Aastha Grover 83b9f69755 code-guideline: Fixing code violation 10.4 Rule
Both operands of an operator in the arithmetic conversions
performed shall have the same essential type category.

Changes are related to converting the integer constants to the
unsigned integer constants

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
2020-10-01 17:13:29 -04:00
Josh Gao 9f2916b943 logging: fix LOG_HEXDUMP_* in C++.
Previously, there were two issues when attempting to use LOG_HEXDUMP_*
from C++:

First, gcc and clang in C mode both allow implicit pointer conversion
by default, but require -fpermissive, which no one should ever use, in
C++ mode. Furthermore, -Wpointer-sign, the warning emitted in C for
convertion between pointers to types of different signedness (e.g. char*
vs u8_t*) is explicitly disabled in Zephyr. Switch the various hexdump
functions to void*, which is guaranteed to work in both languages.

Second, the soon-to-be-standardized C++20 version of designated
initializers requires that the designators appear in the same order as
they are declared in the type being initialized.

Signed-off-by: Josh Gao <josh@jmgao.dev>
2019-12-18 21:54:18 +01:00
Andrew Boie 7e29c9da0b logging: add minimal implementation
The log mechanism, even in immediate mode, adds somewhere
between 1K-2K of footprint to applications that use it.

We want to standardize the logging APIs for all logging
within the kernel, but need to not let platforms with
very constrained RAM/ROM in the dust.

This patch introduces CONFIG_LOG_MINIMAL, which is a very
thin wrapper to printk(). It supports the APIs expressed
in logging/log.h.

This will be the new default for test cases.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-10-01 09:24:02 -04:00