Shell macro SHELL_DEFINE no longer needs new line character.
Specification has been updated accordingly.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
Extending logger to support logging transient strings (with %s).
With dedicated call (log_strdup), string is duplicated to a buffer
from internal logger pool. Logger implicitly manages the pool.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
1. Remove old shell documentation.
2. Create documentation for new shell module.
3. Fix shell.h comments to be able to generate
API documentation.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
A blank line is needed after '.. code-block::', or the code gets
misinterpreted as RST parameters:
...doc/subsystems/logging/logger.rst:168: WARNING: Error in
"code-block" directive:
maximum 1 argument(s) allowed, 9 supplied.
.. code-block:: none
module = FOO
module-str = foo
source "subsys/logging/Kconfig.template.log_config"
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Rather than having some implied name for the logging name, explicitly
pass it in the macros LOG_MODULE_REGISTER & LOG_MODULE_DECLARE.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Instead of documenting in rst, pull the API from USB Device Core Layer
header.
Fixes: #5702
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Fixes issue with USB subsystem doc not pulling from header
doxygen comments of USB Device Controller code.
Fixes: #5702
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This removes these network sample applications
samples/net/coaps_client
samples/net/coaps_server
as they are using low level mbedtls APIs. You should use
preferably socket based or net-app based applications.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Move to more generic tracing hooks that can be implemented in different
ways and do not interfere with the kernel.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Rather than having some implied name for the logging name, explicitly
pass it in the macros LOG_MODULE_REGISTER & LOG_MODULE_DECLARE.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This finishes refactor of splitting off net_config library name from
net_app library, started in c60df1311, c89a06dbc. This commit makes
sure that Kconfig options are prefixed with CONFIG_NET_CONFIG_
instead of CONFIG_NET_APP_, and propagates these changes thru the
app configs in the tree.
Also, minor dependency, etc. tweaks are made.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
On flash NVS was stored one entry after another including the metadata
of each entry. This has the disadvantage that when an incomplete write
is performed (e.g. due to power failure) the complete sector had to be
rewritten to get a completely functional system.
The present rewrite changed the storage in flash of the data. For each
sector the data is now written as follows: the data itself at the
beginning of the sector (one after the other), the metadata (id, length,
data offset in the sector, and a crc of the metadata) is written from
the end of the sector. The metadata is of fixed size (8 byte) and for
a sector that is completely occupied a metadata entry of all zeros is
used.
Writing data to flash always is done by:
1. Writing the data,
2. Writing the metadata.
If an incomplete write is done NVS will ignore this incomplete write.
At the same time the following improvements were done:
1. NVS now support 65536 sectors of each 65536 byte.
2. The sector size no longer requires to be a power of 2 (but it
still needs to be a multiple of the flash erase page size).
3. NVS now also keeps track of the free space available.
Signed-off-by: Laczen JMS <laczenjms@gmail.com>
The nvs module has some disadvantages for larger block size. The data
header and slot are taking up to much space. A rewrite is proposed that
reduces the used storage space for systems with write block size > 4.
The data storage in flash is now one unit consisting of: data_length,
data_id, data and data_length again in a multiple of the write block
size. The data_length at the end is used to validate the correctness of
the flash write and also allows to travel backwards in the filesystem.
As a comparison, on a system with block size 8 byte, a 32 bit values
now fits 1 block including the metadata (length and id). This used to
be 3 blocks.
The data_length will occupy 1 byte if the data length is less than 128
byte, it will occupy 2 byte if the data length is 128 byte or more. The
data length is limited to 16383 byte.
Each write to flash is verified by a read back of the data.
The read performance is improved because reading is done backwards so
the latest items are found first.
When the filesystem is locked it can be unlocked by calling
reinit(), this will clear flash and setup everything for storage.
add sample documentation - README.rst
Update dtsi to include erase_block_size, use erase_block_size in sample
Update prj.conf to include CONFIG_MPU_ALLOW_FLASH_WRITE
Signed-off-by: Laczen JMS <laczenjms@gmail.com>
The runtime filters (both aggregated and per-backend) are all getting
initialized to the default level CONFIG_LOG_DEFAULT_LEVEL. This is not
correct behavior: the initial runtime setting for each source ID
should match its compile-time level setting.
Otherwise, setting CONFIG_LOG_RUNTIME_FILTERING=y changes the logging
behavior for messages that pass the compile time filter check, but not
the runtime check (this currently happens when LOG_LEVEL=4, since
CONFIG_LOG_DEFAULT_LEVEL=3).
Fix this by initializing all filters to their module's compile time
settings. Also make sure that filters are set up before backends are
activated, to avoid race conditions.
Fix a stray documentation typo while we are here.
Signed-off-by: Marti Bolivar <marti@foundries.io>
The documentation says a module can be split up over multiple files,
but there's no good way to do that. In the file with the
LOG_MODULE_REGISTER() call, the definitions of the module's state
variables serve as declarations that LOG_DBG(), etc. can use. But in
other files making up the module, no such declarations are available,
and the macro expansion bombs out spectacularly and confusingly.
Fix this by adding a LOG_MODULE_DECLARE() macro which other files in
the module can use to declare the internal state used by the log
module, so that LOG_DBG() etc. work properly.
Keep the documentation up to date.
Signed-off-by: Marti Bolivar <marti@foundries.io>
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>
Documenting new logger features: waking up processing thread
and internal logger processing thread.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Add TSN (Time Sensitive Networking) description to networking
overview document. Also make sure that gPTP documents are linked
together properly.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Added a new command line options to sanitycheck:
--enable-coverage which will compile for native_posix
with CONFIG_COVERAGE set, and unit tests accordingly.
+
Now -C --coverage implies also --enable-coverage.
Background:
After 608778a4de
it is possible to add Kconfig options from command
line during the cmake invocation.
So we can use it to set CONFIG_COVERAGE for the native_posix
target when we need to instead of relaying on it always
being compiled with coverage enabled.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Add gPTP information to documentation.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Julien Chevrier <julien.chevrier@intel.com>
Sphinx only displays API documentation for items within the specified
doxygen defgroup, and importantly, not the subgroups of this defgroup.
If you define a defgroup with defgroup children, you need to tell Sphinx
to display API information about the child defgroups too. (If the
parent defgroup has no entities of it's own, you can leave that out.)
This patch replaces the (empty) display of the parent defgroup with that
of its two child defgroups.
It also fixes an unnecessarily long text line while I was in there.
Fixes: #7666
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Majority of "accessing Internet" setup is the same for both QEMU and
real boards connected to host, mention that explicitly. Be more
precise that networking settings require net_app_settings API, not
entire net_app. Finally, add information about DNS setup for the
samples requiring it.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Zephyr supports fatfs, nffs and fcb as storage layer. fatfs and nffs
are less suited for application in memory restricted IC's. fcb has a
smaller footprint but has a complex api.
The proposed module is a module with a even smaller footprint compared
to fcb and a simple interface for reading and writing entries. The
module provides wear levelling of flash. This allows the module to be
used not only to store configuration settings but to store device state
(e.g. state of a light switch over reboots) of a zephyr device.
Fixes buffer overflow by introducing maximum read length in nvs_read()
and nvs_read_hist().
Fixes nvs_write() not to reflash the same data. Allows the user to do
call nvs_write() for all defined entries without worries about flash
wear.
Fixes garbage collection error where wrong data could be copied.
Add nvs_delete() to allow deleting a stored entry. A deleted entry will
not be copied to a new flash sector
Include flash wear information in the README.md documentation
0/25 Update module after reviewers remarks, added documentation to
nvs.h, removed README.md by nvs.rst in doc/subsystems folder
04/26 Update module after reviewers remarks, updated nvs.rst, added more
documentation to samples/subsys/nvs/src/main.c, updated doxygen info
in nvs.h (hope this time it works).
04/26 Update subsystems.rst to include nvs.restart
04/27 Updated nvs.c and nvs.h to avoid a possible flash deletion loop
when the file system is full.
04/29 Updated nvs_write to detect and ignore deletes of non-existing
items
05/06 Update NVS module to return standard error codes, removed low
level API, added configuration options. NVS now uses the board dts to
determine the flash storage location (FLASH_AREA_STORAGE_OFFSET).
05/06 Update nvs.rst. Updated intendation and added intermediate
variables in nvs.c to make the code easier to read.
05/06 Update nvs.rst.
05/07 Update nvs.rst
05/08 Changed the API to a more standard file system API.
05/08 Removed cnt_max from nvs_read() as it is not used.
05/08 Removed #ifdef(CONFIG_NVS_LOG) from nvs_priv.h, now the module can
be build with debugging off.
05/09 Removed configuration options for SECTOR_SIZE, SECTOR_COUNT and
MAX_ELEM_SIZE. It is now easy to support multiple NVS filesystems on
one or multiple devices. Changed logging to support newlib systems.
Thanks to Olivier Martin for reporting and proposed changes.
Signed-off-by: Laczen JMS <laczenjms@gmail.com>
The document talks of settings_handler fields such
as ch_name and ch_set, whereas the actual names
are name, h_set, etc.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
With the introduction of --list-tests to sanitycheck, a few rules have
been added to how to declare test suites.
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>