Use the exported CMake toolchain file instead of a custom and broken one.
Slightly modify the C++ example code to introduce modern tools like auto keyword and shared_ptr
Signed-off-by: Philippe Leduc <philippe.leduc@mailfence.com>
This commit moves the flake.lock and flake.nix files from root and
Documentation/ to the tools/ directory, according to @anchao's
suggestion in PR #16763.
Updates documentation to reflect this change.
Signed-off-by: Côme VINCENT <44554692+comejv@users.noreply.github.com>
Root flake now only contains dependencies needed for building the NuttX
firmware. The Documentation flake contains the dependencies needed for
running `make html`.
Updated the documentation accordingly.
Signed-off-by: Côme VINCENT <44554692+comejv@users.noreply.github.com>
This commit expands RPC support for the OP-TEE driver using 2 files:
1) drivers/misc/optee_rpc.c
* Add support for RPCs that can be handled directly by the kernel.
* Can delegate RPC handling to optee_supplicant.c for RPCs that
need userspace interaction.
2) drivers/misc/optee_supplicant.c
* Enable communication between the userspace TEE supplicant and the
kernel driver.
Additional changes were needed to the following files:
1) drivers/misc/optee.c
* Add ioctls used SOLELY by the userspace TEE supplicant.
* Register /dev/teepriv0 if the supplicant is enabled in Kconfig
* Add OPTEE_ROLE_CA and OPTEE_ROLE_SUPPLICANT conditionals to
differentiate paths, between a normal Client Application (CA)
and the TEE supplicant.
* Change some functions from static to "public" to reuse them
in other C files.
* Adjust optee_to/from_msg_param() to work with RPCs.
2) drivers/misc/optee_smc.c
* Call the RPC handler from optee_rpc.c
3) drivers/misc/optee_msg.h
* Add definition needed for RPCs
4) drivers/misc/tee.h
* Add ioctl definitions
* Add TEE_SHM_SUPP flag, checked when unregistering supplicant
memory.
5) Documentation/guides/optee.rs
* Add documentation for RPCs and the supplicant.
6) drivers/misc/{CMakeLists.txt, Make.defs}
* Account for the new files.
7) drivers/misc/Kconfig
* Add DEV_OPTEE_SUPPLICANT option to enable/disable the supplicant
driver.
Signed-off-by: Theodore Karatapanis <tkaratapanis@census-labs.com>
This commit introduces a new guide in that details how to set up a reproducible development environment for NuttX using Nix flakes.
The guide covers:
- Prerequisites for using Nix flakes.
- Steps to enter the NuttX development shell.
- Benefits of using the Nix flake (reproducibility, simplified onboarding, dependency management).
- An overview of the contents.
A link to this new guide has also been added in index.rst to ensure discoverability.
Signed-off-by: Côme VINCENT <44554692+comejv@users.noreply.github.com>
Rewrite parts of the two ELF guides to use scripts included in the
export archive and modernize some deprecated tools and Bash idioms.
Also add the new sphinx_collapse extension to the docs build config.
Signed-off-by: Niccolò Maggioni <nicco.maggioni+nuttx@gmail.com>
Previous implementation was not compatible with GlobalPlatform
API in the following ways:
- Registered mem IDs would begin from negatives when it should
have been greater than or equal to 0
- Register IOCTL would return 0 on success, when it should have
been returning a file descriptor.
- Register IOCTL would expect the user-space client to specify
TEE_SHM_* flags dictating its behaviour when in fact, libteec
never specifies flags.
This commit fixes all those issues. It uses nuttx/idr.h instead
of a linked list, and it uses `file_allocate` to provide file
descriptors for registered shared memory. Upon close(fd), the
memory is de-registered and freed accordingly. It also updates
the documentation accordingly.
Signed-off-by: George Poulios <gpoulios@census-labs.com>
The guide:
- explains the different OP-TEE transports available
in NuttX
- gives brief instructions on how to enable the OP-TEE
driver
- documents the IOCTLs supported, and
- shows typical usage in a NuttX app
Signed-off-by: George Poulios <gpoulios@census-labs.com>
Move debug related pages from Guides to a separate top level page.
This way all pages related to debugging will be in one place
which is more user friendly.
Related Github issue: https://github.com/apache/nuttx/issues/15667
Signed-off-by: raiden00pl <raiden00@railab.me>
The NuttX GDB python plugin has been moved to tools/pynuttx/nxgdb.
Update all documentation including this path.
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
Summary:
- Added a section on editor integration for Rust development in NuttX, focusing on VS Code and rust-analyzer
- Provides steps to configure `.vscode/settings.json` to recognize Rust project structure and optional settings for custom target specifications
Impact:
- Enhances developer productivity by providing better IDE support for Rust in NuttX
- No impact on existing functionality; the guide is purely informational and configuration-based
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Summary:
- Added a section to the Rust guide that explains how to use the `RUSTFLAGS` environment variable to specify the target CPU for optimization.
- Provides examples and instructions for setting `RUSTFLAGS` for different CPU models, such as Cortex-M33 and Cortex-M55, to generate performance-optimized code.
Impact:
- Enhances the developer's ability to produce more efficient Rust applications on NuttX by leveraging CPU-specific optimizations.
- No runtime or functional changes; only documentation improvements to guide users in optimizing their build configurations for specific hardware.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Summary:
- Updated the Rust guide documentation to include X86 and X86_64 platforms in the supported platforms list.
- Ensured that the guide provides accurate and up-to-date information for developers using these new platforms.
Impact:
- Expands the platform support section of the Rust guide, making it more inclusive and useful for a wider range of developers.
- No functional changes to the code itself; this update only affects the documentation.
- Enhances the usability of the guide by providing necessary setup and configuration details for the X86 and X86_64 architectures.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Summary:
Please refer to https://github.com/rust-lang/rust/pull/135757
- Updated the supported platforms list in the Rust guide to reflect that ARMv7-A and AArch64 are ready
- Removed the "WIP" (Work In Progress) label from ARMv7-A and AArch64 in the supported platforms section
Impact:
- Provides accurate information to developers about the current state of Rust support for ARMv7-A and AArch64 platforms
- Aligns the documentation with the latest developments in the Rust ecosystem
- No functional changes to the codebase, only documentation updates
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Summary:
- Fixed a typo in the Rust guide ("Pleae" -> "Please")
- Improved list formatting for better readability and consistency
Impact:
- Improves documentation quality and readability
- Ensures users have complete and accurate configuration information
- Maintains consistency with the actual requirements for Rust development in NuttX
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
It will be used to distinguish between hardware KASan and software KASan. Hardware KASan does not need to use plug-in
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
Add a new guide documenting how to integrate Rust with NuttX, including:
- Prerequisites and supported platforms
- Setup instructions for Rust toolchain
- Required NuttX configurations
- Example build and run instructions for RISCV32 target
The guide provides an experimental but working example of running
a Rust application on NuttX using the rv-virt:nsh board.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
* Add a migration warning to the update release system and the elf
programs documentation pages. This is just to add a papertrail from
where the documentation originate in case of error during the migration
process.
* Improve the building nuttx with app out of source tree
* Add new guide pages
* Building uclibc++
* Custom app directories
* Debugging ELF loadable modules
* Multiple NSH sessions
* NSH network link management
* RAM & ROM disks
* Reading CAN messages
* Remove device drivers with NSH
Add a migration warning to the update release system and the elf
programs documentation pages. This is just to add a papertrail from
where the documentation originate in case of error during the migration
process. Also fix a bit of formatting in the pages
I think the guy who wants to port NuttX is expected to understand NuttX kernel code and related configurations,
but the getting enough knowledge needs to read the kernel codes deeply.
To reduce the time for NuttX beginner who wants to port,
I tried to make the guide (how to port) based on my porting journey.
This is a follow-up to 366c8a5d94 (PR-15102).
* Documentation/guides/zerolatencyinterrupts.rst
(Title): Make title case consistent.
(Getting Back into the Game, Maskable Nested Interrupts): Clarify discussion
about priorities.
(Cortex-M3/4 Implementation): The first half of a sentence was deleted in
366c8a5d9 because the Kconfig that was described there no longer exists:
CONFIG_ARMV7M_USEBASEPRI. Write a new beginning for this sentence that
matches current implementation.
(Disabling the High Priority Interrupt): Change "cannot" to "must not be
allowed to" to improve clarity.
(Configuring High Priority Interrupts): Change "to NVIC" to "in NVIC" to
improve clarity.
syslog_putc() have a lot of duplicate logic with syslog_write().
remove syslog_putc() and reuse syslog_write() to simplify syslog printing.
Signed-off-by: chao an <anchao@lixiang.com>