You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2026/03/24 01:39:49 UTC

(nuttx) branch master updated (e09048cc886 -> 07058280247)

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


    from e09048cc886 style: Fix "is is" typo across the codebase.
     new 9424c3ac3b5 Documentation: update nxscope doc
     new 1741126ae70 boards/qemu-intel64: add nxscope demo for jumbo config
     new cbe59b0328c boards/nrf52832-dk: add nxscope examples (UART and RTT)
     new 07058280247 boards/nrf53/thingy53: add sensor scope example

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../applications/examples/nxscope/index.rst        |  82 ++++++-
 .../applications/logging/nxscope/index.rst         | 243 ++++++++++++++++++---
 .../applications/system/adcscope/index.rst         |  21 ++
 .../applications/system/sensorscope/index.rst      |  18 ++
 .../arm/nrf52/boards/nrf52832-dk/index.rst         | 111 +++++++++-
 .../platforms/arm/nrf53/boards/thingy53/index.rst  |  47 ++++
 .../arm/stm32f4/boards/stm32f4discovery/index.rst  |   7 +
 .../platforms/sim/sim/boards/sim/index.rst         |  13 ++
 .../nrf52832-dk/configs/nxscope_rtt/defconfig      |  60 +++++
 .../{mrf24j40_mac => nxscope_uart}/defconfig       |  54 +++--
 .../{rgbled_cpuapp => sensors_cpuapp}/defconfig    |  46 ++--
 .../qemu/qemu-intel64/configs/jumbo/defconfig      |  11 +
 12 files changed, 627 insertions(+), 86 deletions(-)
 create mode 100644 Documentation/applications/system/adcscope/index.rst
 create mode 100644 Documentation/applications/system/sensorscope/index.rst
 create mode 100644 boards/arm/nrf52/nrf52832-dk/configs/nxscope_rtt/defconfig
 copy boards/arm/nrf52/nrf52832-dk/configs/{mrf24j40_mac => nxscope_uart}/defconfig (50%)
 copy boards/arm/nrf53/thingy53/configs/{rgbled_cpuapp => sensors_cpuapp}/defconfig (63%)


(nuttx) 04/04: boards/nrf53/thingy53: add sensor scope example

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 070582802479b4914ba20f3246305aadd0807e79
Author: raiden00pl <ra...@railab.me>
AuthorDate: Mon Jun 10 13:08:59 2024 +0200

    boards/nrf53/thingy53: add sensor scope example
    
    add sensor scope example for thingy53
    
    Signed-off-by: raiden00pl <ra...@railab.me>
---
 .../platforms/arm/nrf53/boards/thingy53/index.rst  | 47 ++++++++++++++
 .../thingy53/configs/sensors_cpuapp/defconfig      | 72 ++++++++++++++++++++++
 2 files changed, 119 insertions(+)

diff --git a/Documentation/platforms/arm/nrf53/boards/thingy53/index.rst b/Documentation/platforms/arm/nrf53/boards/thingy53/index.rst
index 4988a71bc53..8f903b1a50a 100644
--- a/Documentation/platforms/arm/nrf53/boards/thingy53/index.rst
+++ b/Documentation/platforms/arm/nrf53/boards/thingy53/index.rst
@@ -90,6 +90,53 @@ rpmsghci_sdc_cpunet
 This configuration enables RPMSG Bluetooth HCI server on the network core which
 can be accessed using RPMSG Bluetooth HCI client on the application core.
 
+sensors_cpuapp
+--------------
+
+Configuration demonstrating sensor data stream using NxScope.
+See :doc:`/applications/system/sensorscope/index` for more details.
+
+Device detection with ``nxscli`` client::
+
+    $ nxscli serial /dev/ttyACM0 pdevinfo
+    INFO:nxscli:enable (0, <class 'nxscli.plugins.devinfo.PluginDevinfo'>, {})
+    INFO:nxscli:connecting to nxs device...
+    INFO:nxscli:connected!
+    INFO:nxscli:started <nxscli.plugins.devinfo.PluginDevinfo object at 0x7f16bdec5d30>
+
+    Device Summary
+      Channels:         6
+      Divider support:  no
+      Ack support:      no
+      Flags:            0x00
+      RX padding:       0
+
+    Stream
+      Connected:        yes
+      Started:          no
+      Overflow count:   0
+      Bitrate:          0.0 B/s
+
+    Channel State
+      Applied enabled:  none
+      Buffered enabled: none
+
+    Channels
+    +----+---------------+-------+-----+-------+----+-----+
+    | ID | Name          | Type  | Dim | Valid | En | Div |
+    +====+===============+=======+=====+=======+====+=====+
+    |  0 | sensor_accel0 | FLOAT |   3 | yes   | no |   0 |
+    |  1 | sensor_accel1 | FLOAT |   3 | yes   | no |   0 |
+    |  2 | sensor_gyro0  | FLOAT |   3 | yes   | no |   0 |
+    |  3 | sensor_ir0    | FLOAT |   1 | yes   | no |   0 |
+    |  4 | sensor_mag0   | FLOAT |   3 | yes   | no |   0 |
+    |  5 | sensor_rgb0   | FLOAT |   3 | yes   | no |   0 |
+    +----+---------------+-------+-----+-------+----+-----+
+
+    closing...
+    INFO:nxscli:disconnecting from nxs device...
+    INFO:nxscli:disconnected!
+
 Flash & Debug
 =============
 
diff --git a/boards/arm/nrf53/thingy53/configs/sensors_cpuapp/defconfig b/boards/arm/nrf53/thingy53/configs/sensors_cpuapp/defconfig
new file mode 100644
index 00000000000..c829f195b19
--- /dev/null
+++ b/boards/arm/nrf53/thingy53/configs/sensors_cpuapp/defconfig
@@ -0,0 +1,72 @@
+#
+# This file is autogenerated: PLEASE DO NOT EDIT IT.
+#
+# You can use "make menuconfig" to make any modifications to the installed .config file.
+# You can then do "make savedefconfig" to generate a new defconfig file that includes your
+# modifications.
+#
+# CONFIG_DEV_CONSOLE is not set
+# CONFIG_SYSLOG_DEFAULT is not set
+CONFIG_ARCH="arm"
+CONFIG_ARCH_BOARD="thingy53"
+CONFIG_ARCH_BOARD_COMMON=y
+CONFIG_ARCH_BOARD_THINGY53=y
+CONFIG_ARCH_CHIP="nrf53"
+CONFIG_ARCH_CHIP_NRF5340=y
+CONFIG_ARCH_CHIP_NRF5340_CPUAPP=y
+CONFIG_ARCH_CHIP_NRF53=y
+CONFIG_ARCH_STACKDUMP=y
+CONFIG_ARCH_STDARG_H=y
+CONFIG_BOARDCTL=y
+CONFIG_BOARDCTL_MKRD=y
+CONFIG_BOARDCTL_USBDEVCTRL=y
+CONFIG_BOARD_LOOPSPERMSEC=5500
+CONFIG_BUILTIN=y
+CONFIG_CDCACM=y
+CONFIG_CDCACM_RXBUFSIZE=256
+CONFIG_CDCACM_TXBUFSIZE=256
+CONFIG_DEBUG_ASSERTIONS=y
+CONFIG_DEBUG_FEATURES=y
+CONFIG_DEBUG_FULLOPT=y
+CONFIG_DEBUG_SYMBOLS=y
+CONFIG_EXAMPLES_NXSCOPE=y
+CONFIG_EXAMPLES_NXSCOPE_SERIAL_PATH="/dev/ttyS0"
+CONFIG_EXPERIMENTAL=y
+CONFIG_FS_PROCFS=y
+CONFIG_IDLETHREAD_STACKSIZE=2048
+CONFIG_INIT_ENTRYNAME="nsh_main"
+CONFIG_INIT_ENTRYPOINT="sensorscope_main"
+CONFIG_INTELHEX_BINARY=y
+CONFIG_LOGGING_NXSCOPE=y
+CONFIG_MM_REGIONS=2
+CONFIG_NDEBUG=y
+CONFIG_NRF53_HFCLK_XTAL=y
+CONFIG_NRF53_I2C2_MASTER=y
+CONFIG_NRF53_SPI1_MASTER=y
+CONFIG_NRF53_UART0=y
+CONFIG_NRF53_USBDEV=y
+CONFIG_NRF53_USE_HFCLK192M=y
+CONFIG_PREALLOC_TIMERS=4
+CONFIG_RAMLOG=y
+CONFIG_RAM_SIZE=524288
+CONFIG_RAM_START=0x20000000
+CONFIG_RAW_BINARY=y
+CONFIG_RR_INTERVAL=200
+CONFIG_SCHED_WAITPID=y
+CONFIG_SENSORS=y
+CONFIG_SENSORS_ADXL362=y
+CONFIG_SENSORS_BH1749NUC=y
+CONFIG_SENSORS_BH1749NUC_UORB=y
+CONFIG_SENSORS_BMI270=y
+CONFIG_SENSORS_BMI270_UORB=y
+CONFIG_SENSORS_BMM150=y
+CONFIG_START_DAY=26
+CONFIG_START_MONTH=3
+CONFIG_SYMTAB_ORDEREDBYNAME=y
+CONFIG_SYSTEM_I2CTOOL=y
+CONFIG_SYSTEM_READLINE=y
+CONFIG_SYSTEM_SENSORSCOPE=y
+CONFIG_SYSTEM_SENSORSCOPE_CDCACM=y
+CONFIG_SYSTEM_SENSORSCOPE_FETCH_INTERVAL=100000
+CONFIG_SYSTEM_SENSORSCOPE_SERIAL_PATH="/dev/ttyACM0"
+CONFIG_SYSTEM_SENSORSCOPE_STREAMBUF_LEN=2048


(nuttx) 01/04: Documentation: update nxscope doc

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 9424c3ac3b5e239371274b0a66b8fb13c455bf0c
Author: raiden00pl <ra...@railab.me>
AuthorDate: Mon Mar 23 13:08:57 2026 +0100

    Documentation: update nxscope doc
    
    update various nxscope doc
    
    Signed-off-by: raiden00pl <ra...@railab.me>
---
 .../applications/examples/nxscope/index.rst        |  82 ++++++-
 .../applications/logging/nxscope/index.rst         | 243 ++++++++++++++++++---
 .../applications/system/adcscope/index.rst         |  21 ++
 .../applications/system/sensorscope/index.rst      |  18 ++
 .../arm/stm32f4/boards/stm32f4discovery/index.rst  |   7 +
 .../platforms/sim/sim/boards/sim/index.rst         |  13 ++
 6 files changed, 350 insertions(+), 34 deletions(-)

diff --git a/Documentation/applications/examples/nxscope/index.rst b/Documentation/applications/examples/nxscope/index.rst
index 1853689f5df..fc81dc65096 100644
--- a/Documentation/applications/examples/nxscope/index.rst
+++ b/Documentation/applications/examples/nxscope/index.rst
@@ -2,4 +2,84 @@
 ``nxscope`` NxScope library example
 ===================================
 
-TODO
+The ``nxscope`` example demonstrates the basic usage of the NxScope
+library for real-time data streaming.
+
+See :doc:`/applications/logging/nxscope/index` for more details about
+the NxScope library and host-side tools.
+
+This application initializes a set of example channels and starts a thread
+that generates various waveforms (sine waves, counters, etc.) to be streamed
+to a host client.
+
+Configuration
+=============
+
+To use this example, enable ``CONFIG_EXAMPLES_NXSCOPE=y``. The available
+configuration options depend on the interface selected in the ``nxscope``
+configuration.
+
+Common Options
+--------------
+
+- ``CONFIG_EXAMPLES_NXSCOPE_STREAMBUF_LEN``: NxScope stream buffer size.
+- ``CONFIG_EXAMPLES_NXSCOPE_RXBUF_LEN``: NxScope RX buffer size.
+- ``CONFIG_EXAMPLES_NXSCOPE_MAIN_INTERVAL``: Main loop interval in microseconds.
+- ``CONFIG_EXAMPLES_NXSCOPE_FORCE_ENABLE``: Automatically enable all channels
+  and start streaming on startup.
+- ``CONFIG_EXAMPLES_NXSCOPE_CHARLOG``: Demonstrate sending text messages over
+  a dedicated channel (channel 19).
+
+Serial Interface Options
+------------------------
+
+These options are available when ``CONFIG_LOGGING_NXSCOPE_INTF_SERIAL=y``:
+
+- ``CONFIG_EXAMPLES_NXSCOPE_SERIAL_PATH``: Device path (e.g. ``/dev/ttyUSB0``).
+- ``CONFIG_EXAMPLES_NXSCOPE_SERIAL_BAUD``: Baud rate for the serial interface.
+- ``CONFIG_EXAMPLES_NXSCOPE_CDCACM``: Enable USB CDC/ACM serial transport
+  support.
+
+UDP Interface Options
+---------------------
+
+These options are available when ``CONFIG_LOGGING_NXSCOPE_INTF_UDP=y``:
+
+- ``CONFIG_EXAMPLES_NXSCOPE_UDP_PORT``: Local UDP port for the NxScope
+  interface.
+
+Timer Options
+-------------
+
+These options are available when ``CONFIG_EXAMPLES_NXSCOPE_TIMER=y``:
+
+- ``CONFIG_EXAMPLES_NXSCOPE_TIMER_PATH``: Device path for the hardware timer.
+- ``CONFIG_EXAMPLES_NXSCOPE_TIMER_INTERVAL``: Timer interval in microseconds.
+- ``CONFIG_EXAMPLES_NXSCOPE_TIMER_SIGNO``: Signal number for timer
+  notifications.
+
+Command-Line Arguments
+======================
+
+The example accepts the following command-line arguments:
+
+- ``-i <stream_interval_us>``: Data sampling thread interval in microseconds.
+  Overrides the default value (``CONFIG_EXAMPLES_NXSCOPE_TIMER_INTERVAL``
+  if timer is used, otherwise 100us).
+- ``-m <main_interval_us>``: Main loop interval in microseconds.
+  Overrides the default value (``CONFIG_EXAMPLES_NXSCOPE_MAIN_INTERVAL``).
+
+Supported Channels
+==================
+
+The example initializes 32 channels to demonstrate different data types and
+capabilities:
+
+- **Channels 0-7**: Standard integer types (uint8 to int64).
+- **Channels 8-9**: Floating point types (float and double).
+- **Channels 10-15**: Fixed-point types (b8, b16, b32).
+- **Channel 16**: Vector of floats (3-phase sine waveform).
+- **Channel 17**: Vector of floats with metadata.
+- **Channel 18**: No-data channel with metadata.
+- **Channel 19**: Character channel for text logs (if enabled).
+- **Channel 20**: Critical channel (if enabled).
diff --git a/Documentation/applications/logging/nxscope/index.rst b/Documentation/applications/logging/nxscope/index.rst
index 7a4cbbdb751..bb661bb319f 100644
--- a/Documentation/applications/logging/nxscope/index.rst
+++ b/Documentation/applications/logging/nxscope/index.rst
@@ -1,43 +1,220 @@
-===========================
-``nxscope`` NxScope Library
-===========================
+===============
+NxScope Library
+===============
 
-This library provides real-time data logging functionality for NuttX.
+NxScope provides real-time data logging by buffering samples into up to 255
+virtual channels (vector, point, or text data) and streaming them through
+custom protocols and interfaces. It supports remote control via commands,
+timestamping, sample rate dividers, and critical non-buffered channels.
 
-The principle of action is to accumulate data gathered in virtual channels
-and periodically send buffered data through a dedicated interface packed
-with a custom protocol.
+Use Cases
+=========
 
-Supported features:
+- Real-time sensor data streaming and visualization.
+- Control system telemetry (PID tuning, state monitoring).
+- High-frequency signal capture (ADC).
+- Remote debugging and live variable tracking.
 
-- up to 255 channels possible
-- support for standard data types and user-specific data (``enum nxscope_sample_dtype_e``)
-- support for vector data or point data
-- support for character-based channels (text messages)
-- support for channel metadata - can be used to enumerate samples or timestamp
-- stream buffer overflow detection (``NXSCOPE_STREAM_FLAGS_OVERFLOW``)
-- remote control with commands (``enum nxscope_hdr_id_e``)
-- protocol and interface implementation can be different for control commands and stream data
-- (optional) support for user-specific commands (``NXSCOPE_HDRID_USER`` and ``struct nxscope_callbacks_s``)
-- (optional) support for samples divider (``CONFIG_LOGGING_NXSCOPE_DIVIDER``)
-- (optional) support for ACK frames (``CONFIG_LOGGING_NXSCOPE_ACKFRAMES``)
-- (optional) support for user-defined types (``CONFIG_LOGGING_NXSCOPE_USERTYPES``)
-- (optional) support for non-buffered critical channels (``CONFIG_LOGGING_NXSCOPE_CRICHANNELS``)
+Configuration
+=============
 
-A custom interface and a custom protocol can be implemented with
-``struct nxscope_intf_s`` and ``struct nxscope_proto_s`` structures.
+- ``CONFIG_LOGGING_NXSCOPE_INTF_SERIAL`` – Serial port interface
+- ``CONFIG_LOGGING_NXSCOPE_INTF_UDP`` – UDP interface (over Ethernet)
+- ``CONFIG_LOGGING_NXSCOPE_INTF_DUMMY`` – Dummy interface (for debug)
+- ``CONFIG_LOGGING_NXSCOPE_PROTO_SER`` – Default serial protocol (CRC-16)
+- ``CONFIG_LOGGING_NXSCOPE_DIVIDER`` – Sample rate divider support
+- ``CONFIG_LOGGING_NXSCOPE_ACKFRAMES`` – ACK frames for set requests
+- ``CONFIG_LOGGING_NXSCOPE_USERTYPES`` – Support for user-defined frames
+- ``CONFIG_LOGGING_NXSCOPE_CRICHANNELS`` – Support for non-buffered channels
 
-Supported interfaces:
+Implementation
+==============
 
-1. a serial port: ``logging/nxscope/nxscope_iser.c``
-2. a dummy interface for debug purposes: ``logging/nxscope/nxscope_idummy.c``
+- Serial interface: ``apps/logging/nxscope/nxscope_iser.c``
+- UDP interface: ``apps/logging/nxscope/nxscope_iudp.c``
+- Dummy interface: ``apps/logging/nxscope/nxscope_idummy.c``
+- Default serial protocol: ``apps/logging/nxscope/nxscope_pser.c``
 
-A default serial protocol is implemented in ``apps/logging/nxscope/nxscope_pser.c``
-It just packs NxScope data into simple frames with a CRC-16 checksum.
+Serial Protocol
+---------------
 
-External tools
---------------
+The default serial protocol (``nxscope_pser.c``) uses a simple frame format
+with a header, data payload, and a CRC-16 footer.
 
-- `Nxslib <https://github.com/railab/nxslib>`_ - a Python (3.10+) client library for NxScope devices,
-- `Nxscli <https://github.com/railab/nxscli>`_ - a Python (3.10+) command-line interface for NxScope,
-  supporting data capture and visualization
+Frame Format
+~~~~~~~~~~~~
+
++----------+-----------+-----------+------------+-------------+
+| SOF (1B) | Len (2B)  | ID (1B)   | Data (nB)  | CRC-16 (2B) |
++==========+===========+===========+============+=============+
+| ``0x55`` | u16 (LE)  | u8        | ...        | u16 (BE)    |
++----------+-----------+-----------+------------+-------------+
+
+- **SOF**: Start of Frame, always ``0x55``.
+- **Len**: Total frame length (including header and footer) in little-endian.
+- **ID**: Frame type identifier (see ``enum nxscope_hdr_id_e``).
+- **Data**: Variable length data payload.
+- **CRC-16**: CRC-16-XMODEM (polynomial ``0x1021``) of the header and data.
+
+Frame Types
+~~~~~~~~~~~
+
+The following frame types are defined in ``enum nxscope_hdr_id_e``:
+
++----------------------------+----+--------------------------------------------+
+| Type                       | ID | Description                                |
++============================+====+============================================+
+| ``NXSCOPE_HDRID_STREAM``   | 1  | Real-time stream data                      |
++----------------------------+----+--------------------------------------------+
+| ``NXSCOPE_HDRID_CMNINFO``  | 2  | Get common info (chmax, flags, padding)    |
++----------------------------+----+--------------------------------------------+
+| ``NXSCOPE_HDRID_CHINFO``   | 3  | Get channel info (name, type, etc.)        |
++----------------------------+----+--------------------------------------------+
+| ``NXSCOPE_HDRID_ACK``      | 4  | ACK/NACK response for set requests         |
++----------------------------+----+--------------------------------------------+
+| ``NXSCOPE_HDRID_START``    | 5  | Start or stop the data stream              |
++----------------------------+----+--------------------------------------------+
+| ``NXSCOPE_HDRID_ENABLE``   | 6  | Enable or disable specific channels        |
++----------------------------+----+--------------------------------------------+
+| ``NXSCOPE_HDRID_DIV``      | 7  | Set samples divider for channels           |
++----------------------------+----+--------------------------------------------+
+| ``NXSCOPE_HDRID_USER``     | 8  | User defined frames                        |
++----------------------------+----+--------------------------------------------+
+
+Examples
+========
+
+The following applications in NuttX demonstrate the use of the NxScope library:
+
+1. :doc:`../../examples/nxscope/index` - Basic streaming example.
+
+2. :doc:`../../industry/foc/index` - Real-time FOC (Field Oriented Control)
+   telemetry.
+
+3. :doc:`../../system/adcscope/index` - ADC data visualization.
+
+4. :doc:`../../system/sensorscope/index` - Sensor data streaming.
+
+Supported Boards
+================
+
+Several board configurations in NuttX use the NxScope library:
+
+- **nrf52832-dk:nxscope_rtt**: Uses Segger RTT as the transport interface.
+  This allows for high-speed data streaming without using a physical UART
+  or USB cable (requires a J-Link debugger).
+
+- **nrf52832-dk:nxscope_uart**: Uses a physical UART interface with a high
+  baud rate (1Mbps) for data streaming.
+
+- **stm32f4discovery:nxscope_cdcacm**: Uses USB CDC/ACM for the transport
+  interface, providing a standard serial connection over USB.
+
+- **qemu-intel64:jumbo**: Uses the UDP interface for high-speed data streaming
+  over an emulated Ethernet connection.
+
+- **thingy53:sensors_cpuapp**: Uses USB CDC/ACM with the :doc:`sensorscope
+  <../../system/sensorscope/index>` application to stream data from
+  on-board sensors.
+
+- **sim:nxscope**: A configuration for the NuttX simulator that allows for
+  easy testing and development of NxScope-related features on a host PC.
+
+External Tools
+==============
+
+- `Nxslib <https://github.com/railab/nxslib>`_ - Python client library.
+
+- `Nxscli <https://github.com/railab/nxscli>`_ - Core command-line interface.
+
+- `Nxscli-mpl <https://github.com/railab/nxscli-mpl>`_ - Matplotlib extension
+  for nxscli.
+
+- `Nxscli-pqg <https://github.com/railab/nxscli-pqg>`_ - PyQtGraph extension
+  for nxscli.
+
+Nxscli Quick Start
+------------------
+
+The `Nxscli <https://github.com/railab/nxscli>`_ is a Python tool used to
+interface with NxScope-enabled devices. It uses a plugin-based architecture
+to capture, store, and visualize data.
+
+.. note::
+   This is a quick command reference only. For a detailed description of all
+   supported features, plugins, and configuration options, please visit the
+   official repositories.
+
+.. note::
+   A graphical user interface (GUI) for ``nxscli`` is currently under
+   development and will be available soon.
+
+1. **Installation**:
+
+   .. code-block:: bash
+
+      # Core tool
+      pip install nxscli
+      
+      # Matplotlib extension (optional)
+      pip install nxscli-mpl
+      
+      # PyQtGraph extension (optional)
+      pip install nxscli-pqg
+
+2. **Interface selection**:
+
+   Select the interface to connect to your device:
+
+   .. code-block:: bash
+
+      # Serial port
+      nxscli serial <serial-port> ...
+      
+      # Segger RTT
+      nxscli rtt <rtt-target> <rtt-buffer-index> <rtt-buffer-size>...
+      
+      # UDP (Ethernet)
+      nxscli udp <target-ip> <target-port> ...
+
+      # Simulated/Dummy interface
+      nxscli dummy ...
+
+3. **Device information**:
+
+   To display information about the connected NxScope device and its
+   available channels:
+
+   .. code-block:: bash
+
+      # Serial interface
+      nxscli serial /dev/ttyACM0 pdevinfo
+
+4. **Data capture**:
+
+   Configure channels and capture samples:
+
+   .. code-block:: bash
+
+      # Print samples from channels 0 and 1 via serial
+      nxscli serial /dev/ttyACM0 chan 0,1 pprinter
+
+5. **Visualization**:
+
+   NxScope supports live visualization using Matplotlib or PyQtGraph:
+
+   .. code-block:: bash
+
+      # Live plot from serial using Matplotlib
+      nxscli serial /dev/ttyACM0 chan 0,1 m_live
+
+      # Live plot from serial using PyQtGraph
+      nxscli serial /dev/ttyACM0 chan 0,1 q_live
+
+6. **Data streaming**:
+
+   To stream data over UDP (e.g., to PlotJuggler):
+
+   .. code-block:: bash
+
+      nxscli serial /dev/ttyACM0 chan 0,1 pudp 0
diff --git a/Documentation/applications/system/adcscope/index.rst b/Documentation/applications/system/adcscope/index.rst
new file mode 100644
index 00000000000..589320f28ff
--- /dev/null
+++ b/Documentation/applications/system/adcscope/index.rst
@@ -0,0 +1,21 @@
+====================================
+``adcscope`` NxScope ADC data stream
+====================================
+
+Streams ADC data from an ADC driver via ``NxScope``.
+
+See :doc:`/applications/logging/nxscope/index` for more details about
+the NxScope library and host-side tools.
+
+Configuration
+=============
+
+Enable ``CONFIG_SYSTEM_ADCSCOPE`` and configure the following:
+
+- ``CONFIG_SYSTEM_ADCSCOPE_ADC_PATH``: ADC device path (e.g. ``/dev/adc0``).
+- ``CONFIG_SYSTEM_ADCSCOPE_SERIAL_PATH``: Serial device path (e.g. ``/dev/ttyUSB0``).
+- ``CONFIG_SYSTEM_ADCSCOPE_FETCH_INTERVAL``: ADC data fetch interval in microseconds.
+- ``CONFIG_SYSTEM_ADCSCOPE_MAIN_INTERVAL``: Main loop interval in microseconds.
+- ``CONFIG_SYSTEM_ADCSCOPE_STREAMBUF_LEN``: NxScope stream buffer size.
+- ``CONFIG_SYSTEM_ADCSCOPE_CDCACM``: Use CDC/ACM serial transport.
+- ``CONFIG_SYSTEM_ADCSCOPE_SWTRIG``: Use software trigger for ADC (``ANIOC_TRIGGER``).
diff --git a/Documentation/applications/system/sensorscope/index.rst b/Documentation/applications/system/sensorscope/index.rst
new file mode 100644
index 00000000000..5fd48e47b3f
--- /dev/null
+++ b/Documentation/applications/system/sensorscope/index.rst
@@ -0,0 +1,18 @@
+==========================================
+``sensorscope`` NxScope sensor data stream
+==========================================
+
+Streams data from the sensor framework via ``NxScope``.
+
+See :doc:`/applications/logging/nxscope/index` for more details about
+the NxScope library and host-side tools.
+
+Configuration
+=============
+
+Enable ``CONFIG_SYSTEM_SENSORSCOPE`` and configure the following:
+
+- ``CONFIG_SYSTEM_SENSORSCOPE_SERIAL_PATH``: Device path (e.g. ``/dev/ttyUSB0``).
+- ``CONFIG_SYSTEM_SENSORSCOPE_FETCH_INTERVAL``: Sensor data fetch interval in microseconds.
+- ``CONFIG_SYSTEM_SENSORSCOPE_STREAMBUF_LEN``: NxScope stream buffer size.
+- ``CONFIG_SYSTEM_SENSORSCOPE_CDCACM``: Use CDC/ACM serial transport.
diff --git a/Documentation/platforms/arm/stm32f4/boards/stm32f4discovery/index.rst b/Documentation/platforms/arm/stm32f4/boards/stm32f4discovery/index.rst
index f935db7ec1b..a0b5df570ed 100644
--- a/Documentation/platforms/arm/stm32f4/boards/stm32f4discovery/index.rst
+++ b/Documentation/platforms/arm/stm32f4/boards/stm32f4discovery/index.rst
@@ -2345,3 +2345,10 @@ Connect the HX711 to the STM32F4 board using the following pins:
     -4
 
 For more details, refer to the official `HX711 NuttX documentation <https://nuttx.apache.org/docs/latest/components/drivers/character/analog/adc/hx711/index.html>`_.
+
+nxscope_cdcacm
+--------------
+
+Configuration demonstrating NxScope stream over CDC-ACM interface.
+See :doc:`/applications/examples/nxscope/index` and
+:doc:`/applications/logging/nxscope/index` for more details.
diff --git a/Documentation/platforms/sim/sim/boards/sim/index.rst b/Documentation/platforms/sim/sim/boards/sim/index.rst
index e35a0e0582d..376081c12db 100644
--- a/Documentation/platforms/sim/sim/boards/sim/index.rst
+++ b/Documentation/platforms/sim/sim/boards/sim/index.rst
@@ -1984,6 +1984,19 @@ Requirement: ``cansequence`` tool from ``linux-can/can-utils``
       can0  002   [1]  11
       can0  002   [1]  12
 
+
+nxscope
+-------
+
+Configuration demonstrating NxScope stream over simulated UART interface.
+
+The simulated UART must be created on host before running NuttX::
+
+  socat PTY,link=/dev/ttySIM0 PTY,link=/dev/ttyNX0
+
+See :doc:`/applications/examples/nxscope/index` and
+:doc:`/applications/logging/nxscope/index` for more details.
+
 ROMFS System-Init
 =================
 


(nuttx) 02/04: boards/qemu-intel64: add nxscope demo for jumbo config

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 1741126ae70b801a7a115305a9abb16581291d17
Author: raiden00pl <ra...@railab.me>
AuthorDate: Mon Mar 16 14:01:18 2026 +0100

    boards/qemu-intel64: add nxscope demo for jumbo config
    
    add nxscope over UDP demo for jumbo config
    
    Signed-off-by: raiden00pl <ra...@railab.me>
---
 boards/x86_64/qemu/qemu-intel64/configs/jumbo/defconfig | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/boards/x86_64/qemu/qemu-intel64/configs/jumbo/defconfig b/boards/x86_64/qemu/qemu-intel64/configs/jumbo/defconfig
index 099cf3388da..ecc1ddf2f33 100644
--- a/boards/x86_64/qemu/qemu-intel64/configs/jumbo/defconfig
+++ b/boards/x86_64/qemu/qemu-intel64/configs/jumbo/defconfig
@@ -49,6 +49,11 @@ CONFIG_DEV_SIMPLE_ADDRENV=y
 CONFIG_EXAMPLES_HELLO=y
 CONFIG_EXAMPLES_HIDKBD=y
 CONFIG_EXAMPLES_NETPKT=y
+CONFIG_EXAMPLES_NXSCOPE=y
+CONFIG_EXAMPLES_NXSCOPE_CHARLOG=y
+CONFIG_EXAMPLES_NXSCOPE_MAIN_INTERVAL=1000
+CONFIG_EXAMPLES_NXSCOPE_RXBUF_LEN=512
+CONFIG_EXAMPLES_NXSCOPE_STREAMBUF_LEN=2048
 CONFIG_EXAMPLES_TCPBLASTER=y
 CONFIG_EXAMPLES_TCPBLASTER_SERVERIP=0xc0a80801
 CONFIG_EXAMPLES_UDPBLASTER=y
@@ -67,6 +72,12 @@ CONFIG_IOB_BUFSIZE=2048
 CONFIG_IOB_NBUFFERS=1024
 CONFIG_IOB_NCHAINS=255
 CONFIG_LIBM=y
+CONFIG_LOGGING_NXSCOPE=y
+CONFIG_LOGGING_NXSCOPE_ACKFRAMES=y
+CONFIG_LOGGING_NXSCOPE_CRICHANNELS=y
+CONFIG_LOGGING_NXSCOPE_DIVIDER=y
+CONFIG_LOGGING_NXSCOPE_INTF_UDP=y
+CONFIG_LOGGING_NXSCOPE_USERTYPES=y
 CONFIG_NET=y
 CONFIG_NETDB_DNSCLIENT=y
 CONFIG_NETDEV_LATEINIT=y


(nuttx) 03/04: boards/nrf52832-dk: add nxscope examples (UART and RTT)

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit cbe59b0328c6ac0ca534646fc6e868c9517d7966
Author: raiden00pl <ra...@railab.me>
AuthorDate: Sat Sep 30 10:40:27 2023 +0200

    boards/nrf52832-dk: add nxscope examples (UART and RTT)
    
    add nxscope examples for nrf52832-dk
    
    Signed-off-by: raiden00pl <ra...@railab.me>
---
 .../arm/nrf52/boards/nrf52832-dk/index.rst         | 111 ++++++++++++++++++++-
 .../nrf52832-dk/configs/nxscope_rtt/defconfig      |  60 +++++++++++
 .../nrf52832-dk/configs/nxscope_uart/defconfig     |  58 +++++++++++
 3 files changed, 227 insertions(+), 2 deletions(-)

diff --git a/Documentation/platforms/arm/nrf52/boards/nrf52832-dk/index.rst b/Documentation/platforms/arm/nrf52/boards/nrf52832-dk/index.rst
index 436dd84a93d..124f8ff4e30 100644
--- a/Documentation/platforms/arm/nrf52/boards/nrf52832-dk/index.rst
+++ b/Documentation/platforms/arm/nrf52/boards/nrf52832-dk/index.rst
@@ -84,8 +84,8 @@ supported by the OS.
 nsh
 ----
 
-Basic NuttShell configuration (console enabled in UART0, exposed via J-Link VCOM connection,
-at 115200 bps).
+Basic NuttShell configuration (console enabled in UART0, exposed via J-Link VCOM
+connection, at 115200 bps).
 
 ostest_tickless
 ---------------
@@ -104,3 +104,110 @@ sdc_nimble
 
 Enables Nordic's SoftDevice controller and uses nimBLE for the host-layer.
 The ``nimble`` test application can be used to enable a simple GATT server.
+
+nxscope_rtt
+------------
+
+Configuration demonstrating NxScope stream over Segger RTT interface.
+
+A total of 3 RTT channels are configured:
+
+=========== =================  ============== ================
+RTT channel Function           Up buffer size Down buffer size
+=========== =================  ============== ================
+0           serial console     1024           16
+1           SystemView         2048           0
+2           NxScope interface  2048           128
+=========== =================  ============== ================
+
+See :doc:`/applications/examples/nxscope/index` and
+:doc:`/applications/logging/nxscope/index` for more details.
+
+Device detection with ``nxscli`` client::
+
+    $ nxscli rtt nRF52832_XXAA 2 2048 pdevinfo          
+    Auto-search for RTT block address                                                         
+    JLink interface is SWD
+    connecting to nRF52832_XXAA ...
+    connected, starting RTT...
+    RTT started, 3 up bufs, 3 down bufs.
+    INFO:nxscli:enable (0, <class 'nxscli.plugins.devinfo.PluginDevinfo'>, {})
+    INFO:nxscli:connecting to nxs device...
+    INFO:nxscli:connected!
+    INFO:nxscli:started <nxscli.plugins.devinfo.PluginDevinfo object at 0x7f4a3a4d2270>
+
+    Device Summary
+      Channels:         32
+      Divider support:  yes
+      Ack support:      no
+      Flags:            0x01
+      RX padding:       0
+
+    Stream
+      Connected:        yes
+      Started:          no
+      Overflow count:   0
+      Bitrate:          0.0 B/s
+
+    Channel State
+      Applied enabled:  none
+      Buffered enabled: none
+
+    Channels
+    +----+--------+--------+-----+-------+----+-----+
+    | ID | Name   | Type   | Dim | Valid | En | Div |
+    +====+========+========+=====+=======+====+=====+
+    |  0 | chan0  | UINT8  |   1 | yes   | no |   0 |
+    |  1 | chan1  | INT8   |   1 | yes   | no |   0 |
+    |  2 | chan2  | UINT16 |   1 | yes   | no |   0 |
+    |  3 | chan3  | INT16  |   1 | yes   | no |   0 |
+    |  4 | chan4  | UINT32 |   1 | yes   | no |   0 |
+    |  5 | chan5  | INT32  |   1 | yes   | no |   0 |
+    |  6 | chan6  | UINT64 |   1 | yes   | no |   0 |
+    |  7 | chan7  | INT64  |   1 | yes   | no |   0 |
+    |  8 | chan8  | FLOAT  |   1 | yes   | no |   0 |
+    |  9 | chan9  | DOUBLE |   1 | yes   | no |   0 |
+    | 10 | chan10 | UB8    |   1 | yes   | no |   0 |
+    | 11 | chan11 | B8     |   1 | yes   | no |   0 |
+    | 12 | chan12 | UB16   |   1 | yes   | no |   0 |
+    | 13 | chan13 | B16    |   1 | yes   | no |   0 |
+    | 14 | chan14 | UB32   |   1 | yes   | no |   0 |
+    | 15 | chan15 | B32    |   1 | yes   | no |   0 |
+    | 16 | chan16 | FLOAT  |   3 | yes   | no |   0 |
+    | 17 | chan17 | FLOAT  |   3 | yes   | no |   0 |
+    | 18 | chan18 | NONE   |   0 | yes   | no |   0 |
+    | 19 | -      | UNDEF  |   0 | no    | no |   0 |
+    | 20 | -      | UNDEF  |   0 | no    | no |   0 |
+    | 21 | -      | UNDEF  |   0 | no    | no |   0 |
+    | 22 | -      | UNDEF  |   0 | no    | no |   0 |
+    | 23 | -      | UNDEF  |   0 | no    | no |   0 |
+    | 24 | -      | UNDEF  |   0 | no    | no |   0 |
+    | 25 | -      | UNDEF  |   0 | no    | no |   0 |
+    | 26 | -      | UNDEF  |   0 | no    | no |   0 |
+    | 27 | -      | UNDEF  |   0 | no    | no |   0 |
+    | 28 | -      | UNDEF  |   0 | no    | no |   0 |
+    | 29 | -      | UNDEF  |   0 | no    | no |   0 |
+    | 30 | -      | UNDEF  |   0 | no    | no |   0 |
+    | 31 | -      | UNDEF  |   0 | no    | no |   0 |
+    +----+--------+--------+-----+-------+----+-----+
+
+    closing...
+    INFO:nxscli:disconnecting from nxs device...
+    INFO:nxscli:disconnected!
+
+nxscope_uart
+------------
+
+Configuration demonstrating NxScope stream over USART interface.
+It uses UART0 connected to J-Link VCOM for NxScope, and 2 RTT
+channels for debug purposes are enabled:
+
+=========== =================  ============== ================
+RTT channel Function           Up buffer size Down buffer size
+=========== =================  ============== ================
+0           serial console     1024           16
+1           SystemView         2048           0
+=========== =================  ============== ================
+
+See :doc:`/applications/examples/nxscope/index` and
+:doc:`/applications/logging/nxscope/index` for more details.
diff --git a/boards/arm/nrf52/nrf52832-dk/configs/nxscope_rtt/defconfig b/boards/arm/nrf52/nrf52832-dk/configs/nxscope_rtt/defconfig
new file mode 100644
index 00000000000..0a5924fb6ae
--- /dev/null
+++ b/boards/arm/nrf52/nrf52832-dk/configs/nxscope_rtt/defconfig
@@ -0,0 +1,60 @@
+#
+# This file is autogenerated: PLEASE DO NOT EDIT IT.
+#
+# You can use "make menuconfig" to make any modifications to the installed .config file.
+# You can then do "make savedefconfig" to generate a new defconfig file that includes your
+# modifications.
+#
+# CONFIG_ARCH_FPU is not set
+# CONFIG_DRIVERS_NOTERAM is not set
+# CONFIG_SYSLOG_DEFAULT is not set
+CONFIG_ARCH="arm"
+CONFIG_ARCH_BOARD="nrf52832-dk"
+CONFIG_ARCH_BOARD_COMMON=y
+CONFIG_ARCH_BOARD_NRF52832_DK=y
+CONFIG_ARCH_CHIP="nrf52"
+CONFIG_ARCH_CHIP_NRF52832=y
+CONFIG_ARCH_CHIP_NRF52=y
+CONFIG_ARCH_STACKDUMP=y
+CONFIG_ARCH_STDARG_H=y
+CONFIG_BOARDCTL=y
+CONFIG_BOARD_LOOPSPERMSEC=5500
+CONFIG_BUILTIN=y
+CONFIG_DEBUG_FULLOPT=y
+CONFIG_DEBUG_SYMBOLS=y
+CONFIG_DRIVERS_NOTE=y
+CONFIG_DRIVERS_NOTE_TASKNAME_BUFSIZE=0
+CONFIG_EXAMPLES_NXSCOPE=y
+CONFIG_EXAMPLES_NXSCOPE_RXBUF_LEN=255
+CONFIG_EXAMPLES_NXSCOPE_SERIAL_BAUD=0
+CONFIG_EXAMPLES_NXSCOPE_SERIAL_PATH="/dev/ttyR2"
+CONFIG_EXAMPLES_NXSCOPE_STREAMBUF_LEN=2048
+CONFIG_EXAMPLES_NXSCOPE_TIMER=y
+CONFIG_EXAMPLES_NXSCOPE_TIMER_INTERVAL=500
+CONFIG_INIT_ENTRYPOINT="nxscope_main"
+CONFIG_LOGGING_NXSCOPE=y
+CONFIG_LOGGING_NXSCOPE_DIVIDER=y
+CONFIG_LOGGING_NXSCOPE_INTF_SERIAL=y
+CONFIG_MM_REGIONS=2
+CONFIG_NRF52_TIMER1=y
+CONFIG_PREALLOC_TIMERS=4
+CONFIG_RAM_SIZE=65535
+CONFIG_RAM_START=0x20000000
+CONFIG_RAW_BINARY=y
+CONFIG_RR_INTERVAL=200
+CONFIG_SCHED_INSTRUMENTATION=y
+CONFIG_SCHED_INSTRUMENTATION_IRQHANDLER=y
+CONFIG_SCHED_WAITPID=y
+CONFIG_SEGGER_RTT1_BUFFER_SIZE_DOWN=0
+CONFIG_SEGGER_RTT1_BUFFER_SIZE_UP=0
+CONFIG_SEGGER_RTT2_BUFFER_SIZE_DOWN=128
+CONFIG_SEGGER_RTT2_BUFFER_SIZE_UP=2048
+CONFIG_SEGGER_SYSVIEW=y
+CONFIG_SEGGER_SYSVIEW_RTT_BUFFER_SIZE=2048
+CONFIG_SEGGER_SYSVIEW_RTT_CHANNEL=1
+CONFIG_SERIAL_RTT0=y
+CONFIG_SERIAL_RTT2=y
+CONFIG_START_DAY=26
+CONFIG_START_MONTH=3
+CONFIG_SYMTAB_ORDEREDBYNAME=y
+CONFIG_TASK_NAME_SIZE=32
diff --git a/boards/arm/nrf52/nrf52832-dk/configs/nxscope_uart/defconfig b/boards/arm/nrf52/nrf52832-dk/configs/nxscope_uart/defconfig
new file mode 100644
index 00000000000..b4b200eb538
--- /dev/null
+++ b/boards/arm/nrf52/nrf52832-dk/configs/nxscope_uart/defconfig
@@ -0,0 +1,58 @@
+#
+# This file is autogenerated: PLEASE DO NOT EDIT IT.
+#
+# You can use "make menuconfig" to make any modifications to the installed .config file.
+# You can then do "make savedefconfig" to generate a new defconfig file that includes your
+# modifications.
+#
+# CONFIG_ARCH_FPU is not set
+# CONFIG_DRIVERS_NOTERAM is not set
+# CONFIG_SYSLOG_DEFAULT is not set
+CONFIG_ARCH="arm"
+CONFIG_ARCH_BOARD="nrf52832-dk"
+CONFIG_ARCH_BOARD_COMMON=y
+CONFIG_ARCH_BOARD_NRF52832_DK=y
+CONFIG_ARCH_CHIP="nrf52"
+CONFIG_ARCH_CHIP_NRF52832=y
+CONFIG_ARCH_CHIP_NRF52=y
+CONFIG_ARCH_STACKDUMP=y
+CONFIG_ARCH_STDARG_H=y
+CONFIG_BOARDCTL=y
+CONFIG_BOARD_LOOPSPERMSEC=5500
+CONFIG_BUILTIN=y
+CONFIG_DEBUG_FULLOPT=y
+CONFIG_DEBUG_SYMBOLS=y
+CONFIG_DRIVERS_NOTE=y
+CONFIG_DRIVERS_NOTE_TASKNAME_BUFSIZE=0
+CONFIG_EXAMPLES_NXSCOPE=y
+CONFIG_EXAMPLES_NXSCOPE_RXBUF_LEN=255
+CONFIG_EXAMPLES_NXSCOPE_SERIAL_BAUD=0
+CONFIG_EXAMPLES_NXSCOPE_SERIAL_PATH="/dev/ttyS0"
+CONFIG_EXAMPLES_NXSCOPE_STREAMBUF_LEN=2048
+CONFIG_EXAMPLES_NXSCOPE_TIMER=y
+CONFIG_EXAMPLES_NXSCOPE_TIMER_INTERVAL=1000
+CONFIG_INIT_ENTRYPOINT="nxscope_main"
+CONFIG_LOGGING_NXSCOPE=y
+CONFIG_LOGGING_NXSCOPE_DIVIDER=y
+CONFIG_LOGGING_NXSCOPE_INTF_SERIAL=y
+CONFIG_MM_REGIONS=2
+CONFIG_NRF52_TIMER1=y
+CONFIG_NRF52_UART0=y
+CONFIG_PREALLOC_TIMERS=4
+CONFIG_RAM_SIZE=65535
+CONFIG_RAM_START=0x20000000
+CONFIG_RAW_BINARY=y
+CONFIG_RR_INTERVAL=200
+CONFIG_SCHED_INSTRUMENTATION=y
+CONFIG_SCHED_INSTRUMENTATION_IRQHANDLER=y
+CONFIG_SCHED_WAITPID=y
+CONFIG_SEGGER_SYSVIEW=y
+CONFIG_SEGGER_SYSVIEW_RTT_CHANNEL=1
+CONFIG_SERIAL_RTT0=y
+CONFIG_START_DAY=26
+CONFIG_START_MONTH=3
+CONFIG_SYMTAB_ORDEREDBYNAME=y
+CONFIG_TASK_NAME_SIZE=32
+CONFIG_UART0_BAUD=1000000
+CONFIG_UART0_RXBUFSIZE=128
+CONFIG_UART0_TXBUFSIZE=2048