Skip to content

Commit

Permalink
Review Host and Rp2040 README
Browse files Browse the repository at this point in the history
  • Loading branch information
mikee47 committed Jun 25, 2024
1 parent a7cfabc commit 805cf0e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
5 changes: 3 additions & 2 deletions Sming/Arch/Host/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Summary
-------

Allows Sming applications to be built as an executable to run on the
development host (Windows or Linux).
development host (Windows, Linux or MacOS).

This is a source-level emulator for developing and testing new framework
code prior to flashing a real device.
Expand All @@ -21,12 +21,13 @@ Requirements
``CMake`` is required to build LWIP

Ensure you are using relatively recent compilers, with 32-bit libraries available.

For Linux, you may require the ``gcc-multilib`` and ``g++-multilib``
packages to build 32-bit executables on a 64-bit OS.
Alternatively set :envvar:`BUILD64` to 1 to build in native 64-bit mode.

MacOS comes pre-installed with ``Apple Clang`` as the standard toolchain.
This should be sufficient to build Sming in Host mode.
Note that MacOS does not support 32-bit applications so the emulator will build in 64-bit mode.

For Windows, make sure your ``MinGW`` distro is up to date.
See :doc:`/getting-started/windows/index` for further details.
Expand Down
22 changes: 10 additions & 12 deletions Sming/Arch/Rp2040/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,14 @@ Tested and working:
- WiFi networking support for the Pico-W
- Standard analogue I/O via analogRead. More advanced hardware capabilities require use of the SDK directly.
- Dual-core support. See below for details.

- USB supported using the :library:`USB` library, both host and device modes.
- HardwareSPI via :library:`HardwareSPI` for fully asynchronous SPI communications (host mode only).

Yet to be implemented:

USB
Best to write a separate ``Sming-USB`` library (based on TinyUSB) to support the RP2040, ESP32-S2 & ESP32-S3 variants.
Needs some thought about good integration into the framework.
Arduino-Pico overrides ``HardwareSerial`` to support serial devices, we can do something similar.
HardwareSPI
To support DMA, etc.
PWM
Hardware can drive up to 16 outputs and measure input frequency/duty cycle.
The native API is quite straightforward to use and makes best use of the hardware.
I2C
Has hardware support
RTC
Expand Down Expand Up @@ -79,6 +75,7 @@ Requirements
These requirements are in addition to the standard Sming setup.

The easiest way to get started is with the Sming installer - see :doc:`/getting-started/index`.
For Linux and MacOS just run ``Tools/install.sh rp2040``.

Note: Windows is not currently included in the chocolatey repository.
The following instructions should help.
Expand All @@ -89,28 +86,29 @@ Compiler/linker

Unzip the archive to a suitable location (e.g. ``/opt/rp2040`` or ``c:\tools\rp2040``) and set :envvar:`PICO_TOOLCHAIN_PATH` accordingly.

.. note::

The Sming installer script can do this for you ``Tools/install.sh rp2040``

You can alternatively use the toolchains provided in your GNU/Linux distribution.

Ubuntu

::

sudo apt install gcc-arm-none-eabi gdb-multiarch

To use gdb-multiarch you'll need to do this::

make gdb GDB=gdb-multiarch

Fedora

::

sudo dnf install arm-none-eabi-gcc-cs-c++ arm-none-eabi-newlib

The standard GDB appears to work OK.

Ninja
This is used to build the RP2040 SDK code:

This is used to build the RP2040 SDK code::

sudo apt install ninja-build

Expand Down

0 comments on commit 805cf0e

Please sign in to comment.