Commit graph

156 commits

Author SHA1 Message Date
Côme VINCENT
c36d067603 tools/nix: move nix flakes to tools/
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>
2025-08-28 10:04:01 +08:00
Côme VINCENT
bd90132cd6 tools/nix: split flake into root and Documentation
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>
2025-08-12 20:17:23 +08:00
Theodore Karatapanis
707cdaf42e drivers/misc/optee: Expanded RPC support.
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>
2025-08-06 02:29:33 +08:00
Alan Carvalho de Assis
e745b8ec7f Doc: Remove MOTD string from nsh shell on simulator
Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-07-30 12:01:56 +08:00
Côme VINCENT
ec64401c62 docs: Add Nix flake development environment guide
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>
2025-07-26 20:55:29 +08:00
Niccolò Maggioni
2399702a28 docs: Update the ELF guides
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>
2025-06-11 23:11:08 +08:00
Niccolò Maggioni
d651726b57 docs: Add missing CFLAGS to the ELF guides
As reported in apache/nuttx-apps#1828

Signed-off-by: Niccolò Maggioni <nicco.maggioni+nuttx@gmail.com>
2025-06-11 23:11:08 +08:00
Lars Kruse
57a7cb503a Documentation: fix spelling 2025-05-15 11:33:41 +08:00
George Poulios
a2a689fee0 drivers/misc/optee: Fix GP API compatibility
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>
2025-05-13 10:14:01 +08:00
George Poulios
16143b82b3 Documentation/guides/optee: Add an OP-TEE guide
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>
2025-05-09 10:29:26 +08:00
Lars Kruse
b333ad3ab5 style: fix typos
Thanks, codespell!
2025-04-30 13:45:46 +08:00
Valentyn Korniienko
af6c33e010 Corrected configure.sh call in customboards.rst 2025-04-29 15:30:28 -03:00
raiden00pl
9394962cf6 Documentation: move debug pages to a separate top level page
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>
2025-03-24 20:23:47 +08:00
Neo Xu
05e1cb736c doc: add GDB Plugin commands table
Add a table of commands we extend using GDB python API.
Add irqinfo command documentation.

Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2025-02-18 11:16:17 -03:00
Neo Xu
504c3dddf0 doc: update GDB python plugin path
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>
2025-02-18 11:16:17 -03:00
Huang Qi
285a846af1 docs: Add editor integration guide for Rust development in NuttX
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>
2025-02-14 13:23:13 -03:00
Huang Qi
df65980273 docs: enhance Rust guide with CPU optimization instructions
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>
2025-02-12 15:23:28 -03:00
Huang Qi
081588c1c5 docs: update rust guide to include X86 and X86_64 support
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>
2025-02-12 15:23:28 -03:00
wangmingrong1
49460518a9 Doc: Fortify Instructions
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-01-23 15:36:14 +08:00
wangmingrong1
7774271ad6 Docu: Stack overflow check
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-01-23 14:14:38 +08:00
Huang Qi
de4135afdd Documentation: Update supported platforms for Rust guide
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>
2025-01-21 10:59:08 +08:00
Huang Qi
685f3ab20c Documentation: Fix typo and list format in Rust guide
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>
2025-01-20 17:41:52 +08:00
chao an
71a37b4f2d Documentation: clean up of CONFIG_NSH_LINELEN define
Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-01-15 23:17:51 +08:00
wangmingrong1
df7d062713 kasan/kconfig: Add config CONFIG_MM_KASAN_INSTRUMENT
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>
2025-01-14 14:01:48 +08:00
Huang Qi
a8ba833cde Documentation: Add Rust integration guide for NuttX
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>
2025-01-09 15:43:10 +08:00
Ludovic Vanasse
c55c2511ad Doc: improve and add documentations for the guide section of the wiki
* 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
2024-12-30 12:32:42 +08:00
Ludovic Vanasse
b02a0758a7 Doc: add migration warning to updating release system and elf programs
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
2024-12-29 23:40:57 +08:00
Ludovic Vanasse
04c7391162 Doc: loading ELF program
Migrate the Updating a release System with ELF programs with child pages
to official wiki
2024-12-29 14:23:27 +08:00
Matteo Golin
b15cd35bb0 docs/porting: Create a porting guide for the BCM2711 and organize porting case studies into their own directory. 2024-12-27 21:50:19 -03:00
Masanari Iida
02828921db Documentation/guides: Fix typos in port_arm_cm4.rst
This patch fixes spelling typos in port_arm_cm4.rst
2024-12-20 23:09:40 -05:00
Takuya Miyasita
f66c4a0733 Documentation/guides: add the guide:how to port.
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.
2024-12-12 21:52:24 +08:00
Nathan Hartman
5607eece84 Documentation: Tweak text about Zero Latency Interrupts
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.
2024-12-11 01:27:48 +08:00
Xiang Xiao
366c8a5d94 Documentation: Remove CONFIG_ARMV7M_USEBASEPRI from code base
since the basepri is always used without any configuraion

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-12-10 10:42:32 -05:00
Alan Carvalho de Assis
2cc838aa40 Doc: Fix kernel thread API
Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-12-10 09:28:20 +08:00
wangmingrong1
9555f9ff55 arm64/mte: Add support for arm64 mte
For details, please refer to the kernel's introduction to this at "https://docs.kernel.org/arch/arm64/memory-tagging-extension.html" and Android's introduction to this at "https://source.android.com/docs/security/test/memory-safety/arm-mte"

Of course, there is also the following detailed principle introduction
https://developer.arm.com/-/media/Arm%20Developer%20Community/PDF/Arm_Memory_Tagging_Extension_Whitepaper.pdf

The modification of this patch is only to merge the simplest MTE function support. In the future, the MTE function will be integrated into the kernel to a greater extent, for example, hardware MTE Kasan will be supported in the future.

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-12-02 11:04:11 -03:00
Neo Xu
224a8f4b28 Documentation: fix nuttxgdb related commands
Now we should load tools/gdb/gdbinit.py script

Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-11-25 18:43:23 -03:00
chao an
238cddde3a drivers/syslog: remove implement of syslog_putc()
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>
2024-11-15 19:46:36 +08:00
Ludovic Vanasse
2c2a794240 Doc: Migrate Smaller Vector Tables
Migrate
https://cwiki.apache.org/confluence/display/NUTTX/Smaller+Vector+Tables
to official wiki

Signed-off-by: Ludovic Vanasse <ludovicvanasse@gmail.com>
2024-10-28 09:35:07 +08:00
Ludovic Vanasse
2e2ec9afa4 Doc: Replace link from old wiki to new wiki in signaling events from int
Signed-off-by: Ludovic Vanasse <ludovicvanasse@gmail.com>
2024-10-28 09:35:07 +08:00
Ludovic Vanasse
2532a79c13 Doc: Migration Signaling Semaphores and priority inheritance
Migrate
https://cwiki.apache.org/confluence/display/NUTTX/Signaling+Semaphores+and+Priority+Inheritance
to official wiki

Signed-off-by: Ludovic Vanasse <ludovicvanasse@gmail.com>
2024-10-28 09:35:07 +08:00
Ludovic Vanasse
a5e714a71e Doc: Migrate Signaling Events from Interrupt Handlers doc
Migrate
https://cwiki.apache.org/confluence/display/NUTTX/Signaling+Events+from+Interrupt+Handlers
to official wiki

Signed-off-by: Ludovic Vanasse <ludovicvanasse@gmail.com>
2024-10-28 09:35:07 +08:00
raiden00pl
a099c6328e Documentation: update notes about nrf52840 and Renode
update notes about nrf52840 and Renode
2024-10-27 17:24:17 +08:00
raiden00pl
8b9337fb52 Documentation: add some notes about running NuttX on Renode
add some notes about running NuttX on Renode
2024-10-26 19:37:10 +08:00
Ludovic Vanasse
d73d34b1a0 Doc: Migrate Semihosting
Migrate https://cwiki.apache.org/confluence/display/NUTTX/Semihosting to
official wiki

Signed-off-by: Ludovic Vanasse <ludovicvanasse@gmail.com>
2024-10-21 09:23:07 +08:00
Ludovic Vanasse
aef4d78e70 Doc: Migrate Porting drivers to stm32f7
Migrate
https://cwiki.apache.org/confluence/display/NUTTX/Porting+Drivers+to+the+STM32+F7
to official wiki

Signed-off-by: Ludovic Vanasse <ludovicvanasse@gmail.com>
2024-10-21 09:23:07 +08:00
Ludovic Vanasse
9cf3cae3a2 Doc: Migrate Platform Directories
Migrate
https://cwiki.apache.org/confluence/display/NUTTX/Platform+Directories
to the official wiki

Signed-off-by: Ludovic Vanasse <ludovicvanasse@gmail.com>
2024-10-21 09:23:07 +08:00
Ludovic Vanasse
b0679cbeee Doc: Migrate NuttX Protected Build
Migrate
https://cwiki.apache.org/confluence/display/NUTTX/NuttX+Protected+Build
to official wiki

Signed-off-by: Ludovic Vanasse <ludovicvanasse@gmail.com>
2024-10-20 17:36:40 -03:00
Ludovic Vanasse
e9548e46b9 Doc: Migrate Integrating with Newlib
Migrate
https://cwiki.apache.org/confluence/display/NUTTX/Integrating+with+Newlib
to official wiki

Signed-off-by: Ludovic Vanasse <ludovicvanasse@gmail.com>
2024-10-20 17:36:40 -03:00
Ludovic Vanasse
035faaccc7 Doc: Migrate IPv6
Migrate https://cwiki.apache.org/confluence/display/NUTTX/IPv6 to
official wiki

Signed-off-by: Ludovic Vanasse <ludovicvanasse@gmail.com>
2024-10-20 17:36:40 -03:00
Ludovic Vanasse
e9c107e0ba Doc: Migrate logging to a ram buffer
Migrate
https://cwiki.apache.org/confluence/display/NUTTX/Logging+to+a+RAM+Buffer
to official wiki

Signed-off-by: Ludovic Vanasse <ludovicvanasse@gmail.com>
2024-10-20 17:36:40 -03:00