Commit graph

10 commits

Author SHA1 Message Date
Kumar Gala a1b77fd589 zephyr: replace zephyr integer types with C99 types
git grep -l 'u\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/u\(8\|16\|32\|64\)_t/uint\1_t/g"
	git grep -l 's\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/s\(8\|16\|32\|64\)_t/int\1_t/g"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-08 08:23:57 -05:00
Kumar Gala a8171db6a6 doc: Fix warnings associated with 'unbalanced grouping commands'
Builds of docs with doxygen 1.8.16 has a number of warnings of the form:
'warning: unbalanced grouping commands'.  Fix those warnings be either
balancing the group command or removing it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-12-12 12:39:35 -06:00
Alberto Escolar Piedras 6cd70a5f85 logging: Fix undefined macro warning
Fix undefined macro warning if
CONFIG_LOG or
CONFIG_LOG_RUNTIME_FILTERING are not selected

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-07-24 16:34:31 -04:00
Patrik Flykt 4344e27c26 all: Update reserved function names
Update reserved function names starting with one underscore, replacing
them as follows:
   '_k_' with 'z_'
   '_K_' with 'Z_'
   '_handler_' with 'z_handl_'
   '_Cstart' with 'z_cstart'
   '_Swap' with 'z_swap'

This renaming is done on both global and those static function names
in kernel/include and include/. Other static function names in kernel/
are renamed by removing the leading underscore. Other function names
not starting with any prefix listed above are renamed starting with
a 'z_' or 'Z_' prefix.

Function names starting with two or three leading underscores are not
automatcally renamed since these names will collide with the variants
with two or three leading underscores.

Various generator scripts have also been updated as well as perf,
linker and usb files. These are
   drivers/serial/uart_handlers.c
   include/linker/kobject-text.ld
   kernel/include/syscall_handler.h
   scripts/gen_kobject_list.py
   scripts/gen_syscall_header.py

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2019-03-11 13:48:42 -04:00
Krzysztof Chruscinski f75d11adb2 logging: Handle nios2 global pointer register issue
Nios2 is trying to use global pointer register to access variables
smaller than 8 bytes. GPR range is limited to 64 bytes and apparently
does not handle well variables placed in custom sections.

Current workaround is to increase logger structures (const and dynamic)
size (+8 bytes for dynamic, +4 bytes for constant). Then GPR is not
used and application can be linked. The downside is increase of memory
usage:
- ROM: <num_of_log_modules>*4 bytes
- RAM: <num_of_log_modules>*8 bytes (if runtime filtering is enabled)

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-11-10 12:38:29 -05:00
Flavio Ceolin 67ca176754 headers: Fix headers across the project
Any word started with underscore followed by and uppercase letter or a
second underscore is a reserved word according with C99.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-09-17 15:49:26 -04:00
Krzysztof Chruscinski c12fa740a2 logging: Remove log.h including in headers limitation
Added macro trick which evaluates macro when used and not
when header file is included. After this change order of
defining LOG_LEVEL and including log.h is no longer fixed.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-07-19 10:05:00 -04:00
Krzysztof Chruscinski 927c1470da logging: Internal logger headers cleanup
Moved declarations and macros which are used in log_core from
log_instance.h to log_core.h. Moved log level defines from
log.h to log_instance.h because log.h is not recommended to
be included in headers (contrary to log_instance.h).

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-07-19 10:05:00 -04:00
Krzysztof Chruscinski 67d6987324 logging: Fix fail when log locally disabled
When log is locally disabled then structures associated with the module
are not created. Logger API macros were evaluating those structues even
when log was disabled for given module. That resulted in compilation
error. Macros has been improved to not touch those structures when
log is disabled for given module.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-07-11 10:31:59 -04:00
Krzysztof Chruściński bbeef4155c logging: subsystem major redesign
Adding new implementation of logging subsystem. New features
includes: support for multiple backends, improving performance
by deferring log processing to the known context, adding
timestamps and logs filtering options (compile time, runtime,
module level, instance level). Console backend added as the
example backend.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2018-06-29 10:16:45 +02:00