Commit Graph

4974 Commits

Author SHA1 Message Date
Gerard Marull-Paretas
667eeb11fb shell: fix MISRA 5.7 violations on struct shell
MISRA Rule 5.7 requires uniqueness of tag identifiers. Shell is
frequently problematic because many code uses `const struct shell
*shell`. This causes CI noise every time one of these shell files is
edited, so let's update all of them with `const struct shell *sh`
instead.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-14 12:21:08 +02:00
Keith Packard
7d4a7d79a8 doc/releases: Note "main" return type change for 3.4
Add a paragraph explaining the change from void main(void) to int
main(void) and the requirement for main functions to return zero.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-04-14 07:49:41 +09:00
Keith Packard
3a197934fc doc: Switch main return type from void to int.
As both C and C++ standards require applications running under an OS to
return 'int', adapt that for Zephyr to align with those standard. This also
eliminates errors when building with clang when not using -ffreestanding,
and reduces the need for compiler flags to silence warnings for both clang
and gcc.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-04-14 07:49:41 +09:00
Maurits Fassaert
6bfb663167 shell: backends: add SHELL_BACKEND_RTT_BUFFER option
This new configuration option, SHELL_BACKEND_RTT_BUFFER, allows selecting
an alternative buffer for the Shell's RTT backend. By default buffer 0 is
used, which conflicts with the default logging subsystem RTT backend
buffer.
This option is the counterpart to the logger's LOG_BACKEND_RTT_BUFFER.

Signed-off-by: Maurits Fassaert <maurits.fassaert@sensorfy.ai>
2023-04-13 11:43:28 +02:00
Yuval Peress
06d4a8be26 rtio: add mempool documentation
Add documentation about the mempool feature along with a few examples

Signed-off-by: Yuval Peress <peress@google.com>
2023-04-12 13:29:11 -04:00
Gerard Marull-Paretas
da9059bcf7 doc: regulators: improve introduction
Improve and update driver class introduction. Removed some outdated
information about on/off, mention PMICs, generalize *-supply properties,
etc.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-12 16:43:23 +02:00
Gerard Marull-Paretas
c1a46e21b1 doc: release-notes: inform about SYS_INIT changes
Inform about SYS_INIT callback signature change. Also mention the
provided utility script to automatically migrate existing projects.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-12 14:28:07 +00:00
Jamie McCrae
16ada3e7a7 doc: services: device_mgmt: Fix doc issues
Fixes some issues with the documentation for MCUmgr.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-04-12 14:25:30 +02:00
Anders Storrø
fc49ad3ac6 Bluetooth: Mesh: Shell: Align parameter docs
Aligns Bluetooth mesh shell parameter documentation to use the
same syntax, abbrevations and formating.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2023-04-12 13:04:42 +02:00
Anders Storrø
1026ec5b38 Bluetooth: Mesh: Shell: Change pub cmd period arg
Changes the implementation and documentation in config client shell
command for Config Model Publication Set and Config Model Publication
Virtual Address Set to accept period resolution and period steps as
separate arguments to make it more user friendly.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2023-04-12 13:04:42 +02:00
Marc Herbert
087add3baf docs/build-flash-debug: expand one-time CMake arguments section
- Change "re-run CMake" to "re-run CMake configuration steps" because
  `west build -v ...` displays `cmake --build ...` every time which can
  confuse non-experts.

- Explain what is the actual issue with re-configuring: it makes the
  incremental builds slower. But not much slower:

```
   $ west  build -b qemu_x86 samples/hello_world/ -DCONFIG_OUTPUT_STAT=y
   [133/133] Linking C executable zephyr/zephyr.elf
   $ west  build -b qemu_x86 samples/hello_world/ -DCONFIG_OUTPUT_STAT=y
   [16/16] Linking C executable zephyr/zephyr.elf
```

- Explain that the best solution is to simply skip to the next section

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-04-12 08:59:12 +02:00
Jamie McCrae
65101ec683 doc: release: 3.4: Add note on nRF RTC system timer stop support
Adds a note that the system timer stop function has now been
implemented for the nRF RTC timer driver.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-04-11 12:02:47 +02:00
Huifeng Zhang
2080bd702b doc: net: Add more info for Arm FVP user mode networking
Added more detailed information about Arm FVP user mode networking and
how to use it.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-04-11 11:27:05 +02:00
Marc Herbert
fad2da39aa intel_adsp: move west sign from west flash to earlier west build
Invoking `west sign` in `west build` accelerates twister because `west
build` is run in parallel, see rationale in superseded and very
different (CMake-based) PR #52942.

To maximize backwards compatibility:
- `west sign` is optional in `west build`
- `west flash` will sign (again) if any rimage --option is passed

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-04-10 22:04:47 -04:00
Yuval Peress
80d70b4e96 rtio: Add cqe per each sqe in transaction
Update the policy such that every completed sqe has a parallel cqe.
This has the primary purpose of making any reads in the sqe visible
to the consumer (since they might have different buffers).

Signed-off-by: Yuval Peress <peress@google.com>
2023-04-10 18:34:43 -04:00
Dmitrii Golovanov
f31aab58d5 twister: Add configurable flashing timeout
Use explicit flash command execution timeout at DeviceHandler
instead of the hardcoded value of 60 sec.

When a HW platform executes test cases right after the flash command,
the test case remaining timeout is affected by how much time the flash
operation consumes. Some simulation platforms need to spend significant
amount of time on each 'flash' cycle, usually adding the same delay on
each test case.

This improvement adds two new command line options and device map fields:

  --device-flash-timeout - for the flash operation timeout
  ('flash-timeout' device map field).

  --device-flash-with-test - to indicate that the platform flash
  command also runs a test case, so the overall timeout should be
  calculated as a sum of the flash timeout and the current test case
  timeout to receive all console output from the platform
  ('flash-with-test' device map field).

The device map field values override command line values for the
particular platform where configured.

Default behavior is backward compatible: flash operation fixed timeout
is 60 sec. not including the test case timeout.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2023-04-08 18:37:33 +02:00
Tomasz Bursztyka
31c8042e5b doc: Add NVMe documentation in storage service part
NVMe disks are supported, let's provide some documentation about the
driver and how to enable it.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2023-04-07 13:28:47 +02:00
Dawid Niedzwiecki
4ef47888ef ec_host_cmd: add UART backend
Add a new backend for Host Commands that uses UART. The backend bases
asynchronous UART API.

The UART backend is mainly used by FPMCU.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2023-04-07 13:05:59 +02:00
Fabio Baltieri
14df8fa88f docs: release: 3.4: add input subsystem notes
Add the release notes covering the input subsystem work so far.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-04-07 11:30:14 +02:00
Hake Huang
148c0e1773 doc: twister: test-config: enhance test config
update twister document on how to use test config

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2023-04-06 14:23:32 -05:00
Anas Nashif
b6bf269cc6 docs: remove intel_cavs platforms from docs
Remove references to dropped CAVS platforms.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-04-06 18:51:56 +02:00
Seppo Takalo
9772e03b8f doc: Document LwM2M pause and resume states
Add lwm2m_engine_pause() and lwm2m_engine_resume() and their
states into the state machine description.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-04-05 12:49:31 +00:00
Benjamin Cabé
e6f5c5ea4e doc: Add old toolchain pages to redirects
The toolchain pages have been living in develop/ for a while now.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-04-04 10:53:02 -07:00
Manuel Arguelles
7bdf6479bf doc: release-notes: fix fs_mount() return code
Document fixes done for #56378.

Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
2023-04-04 18:22:10 +02:00
Bjarki Arge Andreasen
ae36da516a boards/posix/native_posix: Add emulated RTC device driver
The emulated RTC device driver is used to emulate a real
RTC device. Note that it is not a replacement for the
native_rtc module, which is used to control simulated time,
get time from the host system, etc.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-04-04 17:03:38 +02:00
Bjarki Arge Andreasen
ac697d153d tests/drivers/rtc: Add unit tests for RTC devices
This test suite adds tests for the following:

- Setting and getting time
- Validating time is incrementing correctly
- Validating behavior of alarms with callback disabled
- Validating behavior of alarms with callback enabled
- Validating update callback

The test suite uses the devicetree  alias rtc to find
the device to test.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-04-04 17:03:38 +02:00
Bjarki Arge Andreasen
b557a1d711 include/drivers: Add RTC API header and handlers
This commit adds the rtc.h header file which contains
API functions for real-time-clocks, which are low power
devices which track and represent broken-down time.

It also changes one line of doxygen documentation in the
maxim_ds3132.h file to place it in its own group.

The handlers for use of the API from userspace is also
added with this commit.

The API is split into one mandatory section, setting and
getting time, and three optional sections, alarms, update
event callback, and clock calibration.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-04-04 17:03:38 +02:00
Ivan Herrera Olivares
1cc226a283 doc: testing: Fix testing expectations example
This fixes a typo in the testing framework docs where the
ZTEST_EXPECT_SKIP MACRO seems to be referring to the wrong function.

Signed-off-by: Ivan Herrera Olivares <ivan.herreraolivares@gmail.com>
2023-04-04 14:31:52 +02:00
Abe Levkoy
255bb6b5fc doc: application: development: Organize debugging
Clarify the debugging section by adding subsections for the GDB client
and server. Add information about reading the system console while
debugging. Make formatting a bit more consistent generally.

Signed-off-by: Abe Levkoy <alevkoy@google.com>
2023-04-04 13:35:03 +02:00
Jamie McCrae
79d3eed9b8 doc: services: mcumgr: Fix Kconfig name
Fixes missing CONFIG_ prefixes from Kconfig options and fixes
wrong names.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-04-04 11:51:43 +02:00
Jamie McCrae
992986eb5e doc: release: 3.4: Add note on MCUmgr fs_mgmt improvements
Adds details on the update fs_mgmt features for faster
uploads/downloads and new Kconfig entries added.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-04-04 11:51:43 +02:00
Jamie McCrae
20417bfaeb doc: services: mcumgr: Add fs_mgmt updates and file close command
Adds information on updated fs_mgmt functionality and describes
the new optional file close command.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-04-04 11:51:43 +02:00
Jamie McCrae
a8164b705a doc: kconfig: setting: Add "fragment" to text
Adds "fragment" to the Kconfig text, this is because these files
are known as Kconfig fragments, and when searching the
documentation for this, all you get are irrelevant results instead
of this page - which is by far the most important one.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-04-04 11:50:46 +02:00
Fabio Baltieri
08d1b33d07 doc: troubleshooting: update the save-temps instructions
Update the save-temps instruction to mention the new kconfig option
instead of setting EXTRA_CFLAGS directly.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-04-02 22:07:22 -04:00
Keith Short
24d5bac58f docs: Add BC1.2 driver documentation
Add BC1.2 driver documentation landing page.

Signed-off-by: Keith Short <keithshort@google.com>
2023-03-30 17:34:36 -04:00
Andrei Emeltchenko
3a6f64b872 doc: edac: Update EDAC / IBECC documentation
Update EDAC documentation and add IBECC documentation.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-30 17:33:41 -04:00
Chris Friedt
56e1a39703 doc: release: 3.4: note removal of beaglev_starlight_jh7100
This board unfortunately did not make it to production.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2023-03-30 17:31:27 -04:00
Henrik Brix Andersen
4d9e131151 doc: peripherals: fuel_gauge: align title with the rest of the docs
Align the title for the fuel gauge peripheral API with the rest of the
documentation.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-03-30 13:38:41 +00:00
Jordan Yates
738b75171b doc: pm: device_runtime: document new devicetree flag
Document the new devicetree flag and provide an example of how to use
it.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-03-29 12:21:13 -04:00
Jamie McCrae
37c1e79f70 doc: release: 3.4: Add note on west signing extending
Adds a note that the west signing file can now be replaced.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-29 15:53:50 +00:00
Jamie McCrae
221e8bf198 doc: develop: west: sign: Add details on extending signing
Adds details on how to extend/replace the CMake files used for
west sign operations.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-29 15:53:50 +00:00
Henrik Brix Andersen
281871ca4d doc: peripherals: sort ToC according to subpage titles
Sort the peripherals table of contents according to the titles of the pages
included.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-03-29 09:48:13 +00:00
Henrik Brix Andersen
0ae32479b7 doc: peripherals: unify title strings
Unify the peripheral documentation title strings to the format
"<class> [(acronym)] [Bus]".

Including both the full name of the peripheral class and an acronym makes
the documentation more user friendly as some of the acronyms are less
well-known than others.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-03-29 09:48:13 +00:00
Dominik Ermel
cbacf4ce87 doc/device_mgmt/mcumgr/img: Correct note on "upgrade" parameter
The note previously mentioned that, when "upgrade" flag is present,
uploaded image version can not be lower than version of a running
application; this has been corrected as uploaded image should
have version higher than running, as "upgrade" only flag makes
no sense when same version is uploaded.
Additionally note that Zephyr does not support this feature has
been removed, as MCUmgr library within Zephyr does actually
perform the version check when "upgrade" flag is set.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-03-29 11:31:19 +02:00
Jamie McCrae
fc683e568f docs: release: 3.4: Add MCUmgr shell input timeout note
Adds details of the new MCUmgr shell transport input expiration
functionality.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-29 11:30:55 +02:00
Jamie McCrae
f0e42234b3 doc: device_mgmt: smp_groups: smp_group_1: Add upload hash note
Adds a note that the upload response hash is partially
optionally from the point of view of MCUboot's serial recovery.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-29 11:30:36 +02:00
Fabio Baltieri
f8468ee76e doc: input: add a reference to the kscan adapter driver
Add a reference to the kscan input adapter to the input documentation
page.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-03-28 20:57:53 -04:00
Marti Bolivar
ee4b134dd6 doc: add snippets documentation
Document this new build system feature.

Since its purpose is customizing application builds, the logical place
for the main body of documentation is in a new snippets/ directory in
doc/build/. Create that directory and add its initial documentation.

Like boards and samples, however, we expect people to write
documentation for each snippet within the directory that defines the
snippet itself. Therefore, add a new top-level snippets/ directory and
stub out the documentation needed to document individual snippets as
well.

Add documentation and cross-references in other required places as
well.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2023-03-26 16:12:41 +02:00
Dominik Ermel
0d95e1684c doc/release-notes/3.4: Note on CONFIG_MCUBOOT_CMAKE_WEST_SIGN_PARAMS
Note on addition of Kconfig option
CONFIG_MCUBOOT_CMAKE_WEST_SIGN_PARAMS.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-03-24 09:04:49 +01:00
Anders Storrø
2356195ae7 Doc: Bluetooth: Mesh: Add RPR docs
Adds documentation for the Remote provisioning server and client
models.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2023-03-23 15:43:29 +01:00