Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 4 additions & 44 deletions Documentation/platforms/arm/rtl8720f/boards/rtl8720f_evb/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ This NuttX port does not wire any user buttons or LEDs.
Configurations
==============

Build and flash any of these per the :doc:`RTL8720F build instructions
<../../index>`; for the CMake build, source ``. tools/ameba/env.sh
rtl8720f_evb`` first (the make build needs no sourcing).

.. code:: console

$ ./tools/configure.sh rtl8720f_evb:<config-name>
Expand Down Expand Up @@ -71,50 +75,6 @@ SoftAP (become an access point, with a DHCP server for clients)::

Stop the SoftAP with ``wapi essid wlan0 <ssid> 0``.

Building and Flashing
=====================

The build auto-fetches the Realtek ``ameba-rtos`` SDK on first use and a
Realtek ``arm-none-eabi`` toolchain must be on ``PATH``; see the
:doc:`chip documentation <../../index>` for both.

.. code:: console

$ ./tools/configure.sh rtl8720f_evb:nsh
$ make

This produces ``nuttx.bin`` in the top-level build directory: the NuttX
application image, which also bundles the prebuilt Wi-Fi firmware. The
bootloader ``boot.bin`` is a prebuilt binary kept under the board's
``prebuilt/`` directory; ``make flash`` writes both at the flash offsets
taken from the generated flash layout, so no offsets are entered by hand.

After a successful build, flash via one of these methods:

**CLI (Linux/macOS)** — connect a USB-UART adapter (PL2303) and use the
built-in ``make flash`` target:

.. code:: console

$ make flash AMEBA_PORT=/dev/ttyUSB0

The baud rate defaults to 1500000; override with ``AMEBA_BAUD`` if needed.

**GUI (Windows)** — use the Realtek AmebaImageTool (``AmebaImageTool.exe``
under ``tools/ameba/ImageTool/`` in the SDK tree) to select ``boot.bin`` (from
the board's ``prebuilt/`` directory) and ``nuttx.bin``.

See the `Realtek Ameba ImageTool guide
<https://aiot.realmcu.com/en/latest/tools/image_tool/index.html>`_ for the
Windows GUI tool and download-mode entry (hold the download button /
power-cycle with the ``UART_LOG_TX`` line asserted).

**Serial console** — after flashing, connect to the LOG-UART at 1500000 8N1::

$ picocom -b 1500000 /dev/ttyUSB0

Other tools: ``screen /dev/ttyUSB0 1500000`` or ``minicom -b 1500000 -D /dev/ttyUSB0``.

License Exceptions
==================

Expand Down
101 changes: 85 additions & 16 deletions Documentation/platforms/arm/rtl8720f/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,93 @@ NOR accessed through the SDK XIP path. The exact flash / PSRAM size depends on
the part number — for example the RTL8720FBF has 4 MB of NOR flash and no
PSRAM.

Vendor SDK Dependency
Vendor SDK and Toolchain
========================

The build depends on Realtek's open ``ameba-rtos`` SDK and its matching
``arm-none-eabi`` toolchain (from the Realtek asdk release), neither of which is
part of the NuttX tree. The SDK provides the Wi-Fi / Bluetooth firmware and the
low-level chip libraries; NuttX links its own libc / libm and reuses the SDK's
``app_start()`` as the image entry point.

Both are fetched automatically — there is nothing to install by hand:

- **make** fetches them on the first ``make`` (from its ``PREBUILD`` step).
- **CMake** fetches them when you source ``. tools/ameba/env.sh <board>``, which
must run before ``cmake`` (CMake probes the compiler at configure time). The
make build resolves everything on demand, so it needs no sourcing.

The SDK is a shallow ``git clone`` of the pinned revision of
``https://github.com/Ameba-AIoT/ameba-rtos.git`` into
``arch/arm/src/common/ameba/ameba-rtos`` (git-ignored) and is built unmodified;
export ``AMEBA_SDK`` to use a local checkout instead. The asdk version is
pinned **per IC** by the SDK, so different Ameba ICs may use different toolchain
versions — the build selects the matching one automatically.

Building and Flashing
=====================

The build depends on Realtek's open ``ameba-rtos`` SDK, which is **not** part
of the NuttX tree. It provides the Wi-Fi / Bluetooth firmware and the
low-level chip libraries. The first build auto-fetches the pinned revision (a
shallow ``git clone`` of ``https://github.com/Ameba-AIoT/ameba-rtos.git``) into
``arch/arm/src/common/ameba/ameba-rtos`` (git-ignored) and builds against it
unmodified. To use a local checkout instead of auto-fetching, export
``AMEBA_SDK`` to its path.

Toolchain
=========

A matching Realtek ARM toolchain (``arm-none-eabi`` from the Realtek asdk
release) is required and is fetched automatically by the board build. NuttX
links its own libc / libm and reuses the SDK's ``app_start()`` as the image
entry point.
Replace ``<board>`` below with an actual board (e.g. ``rtl8720f_evb``) and
``<config>`` with one of its configurations. The first build fetches the SDK
and toolchain (see `Vendor SDK and Toolchain`_).

With make
---------

.. code:: console

$ ./tools/configure.sh <board>:<config>
$ make

With CMake
----------

CMake probes the compiler at configure time, so source the Ameba environment
once first, **passing the board** so the asdk version that IC pins is on
``PATH``:

.. code:: console

$ . tools/ameba/env.sh <board>
$ cmake -B build -DBOARD_CONFIG=<board>:<config> -GNinja
$ cmake --build build

make writes ``nuttx.bin`` to the top-level directory; CMake writes it under
``build/``. The bootloader ``boot.bin`` is a prebuilt binary under the board's
``prebuilt/`` directory; the flash step writes both at the offsets taken from
the generated flash layout, so none are entered by hand.

Flashing
--------

**CLI (Linux/macOS)** — connect a USB-UART adapter and use the built-in flash
target (the baud defaults to 1500000; override with ``AMEBA_BAUD``)::

$ make flash AMEBA_PORT=/dev/ttyUSB0 # make build
$ AMEBA_PORT=/dev/ttyUSB0 cmake --build build --target flash # CMake build

**GUI (Windows)** — use the Realtek AmebaImageTool (``AmebaImageTool.exe`` under
``tools/ameba/ImageTool/`` in the SDK tree) to select ``boot.bin`` (from the
board's ``prebuilt/`` directory) and ``nuttx.bin``. See the `Realtek Ameba
ImageTool guide <https://aiot.realmcu.com/en/latest/tools/image_tool/index.html>`_
for the Windows GUI tool and download-mode entry (hold the download button /
power-cycle with the ``UART_LOG_TX`` line asserted).

**Serial console** — after flashing, connect to the LOG-UART at 1500000 8N1::

$ picocom -b 1500000 /dev/ttyUSB0

Configuration
=============

The build-time options are the same for make and CMake (both edit the one
Kconfig for the selected board); only the command that launches the menuconfig
UI differs:

.. code:: console

$ make menuconfig # make build
$ cmake --build build -t menuconfig # CMake build

Supported Features
==================
Expand Down
48 changes: 4 additions & 44 deletions Documentation/platforms/arm/rtl8721dx/boards/pke8721daf/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ This NuttX port does not wire any user buttons or LEDs.
Configurations
==============

Build and flash any of these per the :doc:`RTL8721Dx build instructions
<../../index>`; for the CMake build, source ``. tools/ameba/env.sh
pke8721daf`` first (the make build needs no sourcing).

.. code:: console

$ ./tools/configure.sh pke8721daf:<config-name>
Expand Down Expand Up @@ -73,50 +77,6 @@ SoftAP (become an access point, with a DHCP server for clients)::

Stop the SoftAP with ``wapi essid wlan0 <ssid> 0``.

Building and Flashing
=====================

The build auto-fetches the Realtek ``ameba-rtos`` SDK on first use and a
Realtek ``arm-none-eabi`` toolchain must be on ``PATH``; see the
:doc:`chip documentation <../../index>` for both.

.. code:: console

$ ./tools/configure.sh pke8721daf:nsh
$ make

This produces ``nuttx.bin`` in the top-level build directory: the NuttX
application image, which also bundles the prebuilt Wi-Fi firmware. The
bootloader ``boot.bin`` is a prebuilt binary kept under the board's
``prebuilt/`` directory; ``make flash`` writes both at the flash offsets
taken from the generated flash layout, so no offsets are entered by hand.

After a successful build, flash via one of these methods:

**CLI (Linux/macOS)** — connect a USB-UART adapter (PL2303) and use the
built-in ``make flash`` target:

.. code:: console

$ make flash AMEBA_PORT=/dev/ttyUSB0

The baud rate defaults to 1500000; override with ``AMEBA_BAUD`` if needed.

**GUI (Windows)** — use the Realtek AmebaImageTool (``AmebaImageTool.exe``
under ``tools/ameba/ImageTool/`` in the SDK tree) to select ``boot.bin`` (from
the board's ``prebuilt/`` directory) and ``nuttx.bin``.

See the `Realtek Ameba ImageTool guide
<https://aiot.realmcu.com/en/latest/tools/image_tool/index.html>`_ for the
Windows GUI tool and download-mode entry (hold the download button /
power-cycle with the ``UART_LOG_TX`` line asserted).

**Serial console** — after flashing, connect to the LOG-UART at 1500000 8N1::

$ picocom -b 1500000 /dev/ttyUSB0

Other tools: ``screen /dev/ttyUSB0 1500000`` or ``minicom -b 1500000 -D /dev/ttyUSB0``.

License Exceptions
==================

Expand Down
101 changes: 85 additions & 16 deletions Documentation/platforms/arm/rtl8721dx/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,93 @@ NOR accessed through the SDK XIP path. The exact flash / PSRAM size depends on
the part number — for example the RTL8721DAF has 4 MB of NOR flash and no
PSRAM.

Vendor SDK Dependency
Vendor SDK and Toolchain
========================

The build depends on Realtek's open ``ameba-rtos`` SDK and its matching
``arm-none-eabi`` toolchain (from the Realtek asdk release), neither of which is
part of the NuttX tree. The SDK provides the Wi-Fi / Bluetooth firmware and the
low-level chip libraries; NuttX links its own libc / libm and reuses the SDK's
``app_start()`` as the image entry point.

Both are fetched automatically — there is nothing to install by hand:

- **make** fetches them on the first ``make`` (from its ``PREBUILD`` step).
- **CMake** fetches them when you source ``. tools/ameba/env.sh <board>``, which
must run before ``cmake`` (CMake probes the compiler at configure time). The
make build resolves everything on demand, so it needs no sourcing.

The SDK is a shallow ``git clone`` of the pinned revision of
``https://github.com/Ameba-AIoT/ameba-rtos.git`` into
``arch/arm/src/common/ameba/ameba-rtos`` (git-ignored) and is built unmodified;
export ``AMEBA_SDK`` to use a local checkout instead. The asdk version is
pinned **per IC** by the SDK, so different Ameba ICs may use different toolchain
versions — the build selects the matching one automatically.

Building and Flashing
=====================

The build depends on Realtek's open ``ameba-rtos`` SDK, which is **not** part
of the NuttX tree. It provides the Wi-Fi / Bluetooth firmware and the
low-level chip libraries. The first build auto-fetches the pinned revision (a
shallow ``git clone`` of ``https://github.com/Ameba-AIoT/ameba-rtos.git``) into
``arch/arm/src/common/ameba/ameba-rtos`` (git-ignored) and builds against it
unmodified. To use a local checkout instead of auto-fetching, export
``AMEBA_SDK`` to its path.

Toolchain
=========

A matching Realtek ARM toolchain (``arm-none-eabi`` from the Realtek asdk
release) is required and is fetched automatically by the board build. NuttX
links its own libc / libm and reuses the SDK's ``app_start()`` as the image
entry point.
Replace ``<board>`` below with an actual board (e.g. ``pke8721daf``) and
``<config>`` with one of its configurations. The first build fetches the SDK
and toolchain (see `Vendor SDK and Toolchain`_).

With make
---------

.. code:: console

$ ./tools/configure.sh <board>:<config>
$ make

With CMake
----------

CMake probes the compiler at configure time, so source the Ameba environment
once first, **passing the board** so the asdk version that IC pins is on
``PATH``:

.. code:: console

$ . tools/ameba/env.sh <board>
$ cmake -B build -DBOARD_CONFIG=<board>:<config> -GNinja
$ cmake --build build

make writes ``nuttx.bin`` to the top-level directory; CMake writes it under
``build/``. The bootloader ``boot.bin`` is a prebuilt binary under the board's
``prebuilt/`` directory; the flash step writes both at the offsets taken from
the generated flash layout, so none are entered by hand.

Flashing
--------

**CLI (Linux/macOS)** — connect a USB-UART adapter and use the built-in flash
target (the baud defaults to 1500000; override with ``AMEBA_BAUD``)::

$ make flash AMEBA_PORT=/dev/ttyUSB0 # make build
$ AMEBA_PORT=/dev/ttyUSB0 cmake --build build --target flash # CMake build

**GUI (Windows)** — use the Realtek AmebaImageTool (``AmebaImageTool.exe`` under
``tools/ameba/ImageTool/`` in the SDK tree) to select ``boot.bin`` (from the
board's ``prebuilt/`` directory) and ``nuttx.bin``. See the `Realtek Ameba
ImageTool guide <https://aiot.realmcu.com/en/latest/tools/image_tool/index.html>`_
for the Windows GUI tool and download-mode entry (hold the download button /
power-cycle with the ``UART_LOG_TX`` line asserted).

**Serial console** — after flashing, connect to the LOG-UART at 1500000 8N1::

$ picocom -b 1500000 /dev/ttyUSB0

Configuration
=============

The build-time options are the same for make and CMake (both edit the one
Kconfig for the selected board); only the command that launches the menuconfig
UI differs:

.. code:: console

$ make menuconfig # make build
$ cmake --build build -t menuconfig # CMake build

Supported Features
==================
Expand Down
Loading
Loading