Skip to content

Commit

Permalink
Pull request #84: README cleanups
Browse files Browse the repository at this point in the history
Merge in FPGA_PFSOC_ES/polarfire-soc-linux-examples from readme-cleanups to next

* commit '69273652a2ce6fb8b008ea1a328d184bcf44d84c':
  amp: comply with mdl linting in READMEs
  dma: comply with mdl rules in README
  can: apply mdl linting to README
  dt-overlays: comply with mdl linting in README
  fpga-fabric-interfaces: lsram: clean up mdl complaints to README
  ethernet: iio-http-server: clean up mdl complaints in README
  pdma: remove trailing newline from README
  gpio: perform spring cleaning on markdown files
  README: perform spring cleaning
  • Loading branch information
ConchuOD authored and vfalanis committed Jul 4, 2023
2 parents 1173d03 + 6927365 commit 60d8d8b
Show file tree
Hide file tree
Showing 11 changed files with 309 additions and 216 deletions.
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
# PolarFire SoC Linux Examples

This repository contains a number of example applications that can be used to explore the features of the icicle kit.
These examples will be automatically included as part of the icicle kit Buildroot and Yocto images, in the `/opt/microchip/` directory. These images will contain both the source code for the examples as well as precompiled binaries where possible.
This repository contains a number of example applications that can be used to
explore the features of the icicle kit.
These examples will be automatically included as part of the Icicle kit
Buildroot and Yocto images, in the `/opt/microchip/` directory.
These images will contain both the source code for the examples as well as
precompiled binaries where possible.

## Hardware Requirements

## Hardware Requirements:
PolarFire SoC Icicle Kit (MPFS250T-FCVG484EES)

## Pre-Requisites:
Before running any of these example applications, set up the Icicle kit and ensure Linux can be booted as explained in [Updating PolarFire SoC Icicle-Kit FPGA Design and Linux Image.](https://github.com/polarfire-soc/polarfire-soc-documentation/blob/master/boards/mpfs-icicle-kit-es/updating-icicle-kit/updating-icicle-kit-design-and-linux.md)
## Pre-requisites

Before running any of these example applications, set up the Icicle kit and
ensure Linux can be booted as explained in the
[Updating PolarFire SoC Icicle-Kit FPGA Design and Linux Image][1] document.

[1]: https://github.com/polarfire-soc/polarfire-soc-documentation/blob/master/boards/mpfs-icicle-kit-es/updating-icicle-kit/updating-icicle-kit-design-and-linux.md
51 changes: 30 additions & 21 deletions amp/rpmsg-pingpong/README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,58 @@
# PolarFire SoC AMP RPMsg PingPong Example

This application can be used to test data integrity of inter-hart communication from linux userspace to a remote
This application can be used to test data integrity of inter-hart communication
from linux userspace to a remote software context.

This application sends chunks of data (payloads) of variable sizes to the remote
software context.
The remote side echoes the data back to the application which then validates
the data returned.

This application uses the RPMsg char driver to create an endpoint using an ioctl
control interface (/dev/rpmsg_ctrlX) and exposes the endpoint to user space by
creating a /dev/rpmsgX device.

This application sends chunks of data (payloads) of variable sizes to the remote software context. The remote side
echoes the data back to the application which then validates the data returned.
For more information on RPMsg protocol, please refer to the
[PolarFire SoC RPMsg documentation][1].

This application uses the RPMsg char driver to create an endpoint using an ioctl control interface (/dev/rpmsg_ctrlX) and exposes the endpoint to user space by creating a /dev/rpmsgX device.
[1]: https://github.com/polarfire-soc/polarfire-soc-documentation/tree/master/asymmetric-multiprocessing/rpmsg.md

For more information on RPMsg protocol, please refer to the [PolarFire SoC RPMsg documentation](https://github.com/polarfire-soc/polarfire-soc-documentation/tree/master/asymmetric-multiprocessing/rpmsg.md).
## Pre-requisites

## Pre-requisites:
This application should be run on a PolarFire SoC configured in AMP mode.
Instructions on how to run a Linux + FreeRTOS AMP configuration using Yocto or
Buildroot can be found in the [PolarFire SoC AMP documentation][2].

This application should be run in PolarFire configured in AMP mode. Instructions on how to run a Linux + FreeRTOS AMP configuration using Yocto
or Buildroot can be found in the [PolarFire SoC AMP documentation](https://github.com/polarfire-soc/polarfire-soc-documentation/tree/master/asymmetric-multiprocessing/amp.md) page.
[2]: https://github.com/polarfire-soc/polarfire-soc-documentation/tree/master/asymmetric-multiprocessing/amp.md

## Building the Application:
## Building the Application

Before running the example program, build it by running make:
```

```sh
make
```

## Running the Application:
## Running the Application

Once built, it can be run:

```
```sh
./rpmsg-pingpong
```

By default the application will try to open the virtio0.rpmsg-amp-demo-channel.-1.0 channel.

This channel will then be used to create an endpoint with the following destination and source address:
This channel will then be used to create an endpoint with the following
destination and source addresses:

source address: 0

destination address: 0xFFFFFFFF

Once run, the following information should be displayed on the console:

```
```text
root@icicle-kit-es-amp: ./rpmsg-pingpong
Open rpmsg dev virtio0.rpmsg-amp-demo-channel.-1.0!
Opening file rpmsg_ctrl0.
Expand All @@ -56,19 +68,16 @@ root@icicle-kit-es-amp: ./rpmsg-pingpong
echo test: sent : 17
received payload number 0 of size 17
```
The test should continue until the application sends and receives back the last payload of size 232.

The test should continue until the application sends and receives back the last
payload of size 232.

At the end, a test report should be displayed on the console:

```
```sh
**************************************

Echo Test Round 0 Test Results: Error count = 0

**************************************
```





43 changes: 26 additions & 17 deletions amp/rpmsg-tty-example/README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,58 @@

# PolarFire SoC AMP RPMsg TTY Example

This application can be used to send messages to another software context using the /dev/ttyRPMSGx device created
by the RPMSG TTY client driver.
This application can be used to send messages to another software context using
the /dev/ttyRPMSGx device created by the RPMSG TTY client driver.

For more information on RPMsg protocol, please refer to the
[PolarFire SoC RPMsg documentation][1].

[1]: https://github.com/polarfire-soc/polarfire-soc-documentation/tree/master/asymmetric-multiprocessing/rpmsg.md

For more information on RPMsg protocol, please refer to the [PolarFire SoC RPMsg documentation](https://github.com/polarfire-soc/polarfire-soc-documentation/tree/master/asymmetric-multiprocessing/rpmsg.md).
## Pre-requisites

## Pre-requisites:
This application should be run on a PolarFire SoC configured in AMP mode.
Instructions on how to run a Linux + FreeRTOS AMP configuration using Yocto or
Buildroot can be found in the [PolarFire SoC AMP documentation][2].

This application should be run in PolarFire configured in AMP mode. Instructions on how to run a Linux + FreeRTOS AMP configuration using Yocto
or Buildroot can be found in the [PolarFire SoC AMP documentation](https://github.com/polarfire-soc/polarfire-soc-documentation/tree/master/asymmetric-multiprocessing/amp.md) page.
[2]: https://github.com/polarfire-soc/polarfire-soc-documentation/tree/master/asymmetric-multiprocessing/amp.md

## Building the Application:
## Building the Application

Before running the example program, build it by running make:
```

```sh
make
```

## Running the Application:
## Running the Application

Once built, it can be run:

```
```sh
./rpmsg-tty
```

By default the application will try to open /dev/ttyRPMSG4 device. The number four indicates the destination endpoint configured in the FreeRTOS context running the RPMsg console demo.
By default the application will try to open /dev/ttyRPMSG4 device.
The number four indicates the destination endpoint configured in the FreeRTOS
context running the RPMsg console demo.

Optionally, a different device can be provided as an input to this application:

```
```sh
./rpmsg-tty -d /dev/ttyRPMSGx
```

where x is the destination endpoint configured in the application running in the associated software context.
where x is the destination endpoint configured in the application running in
the associated software context.

Once run, the following information should be displayed on the console:

```
```text
root@icicle-kit-es-amp: ./rpmsg-tty
Opening device /dev/ttyRPMSG4
Device is open
Enter message to send or type quit to quit :
```

Type a text message on the console and press enter to send to the associated software context.

Type a text message on the console and press enter to send to the associated
software context.
16 changes: 11 additions & 5 deletions can/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,27 @@ uio-can-example is a simple example of using CAN via UIO from Linux user-space.

The example expects to find a CAN device mapped to /dev/uioX.

It initialises the CAN device, places it into loopback mode, puts a single message in a TX buffer and sends it.
It initialises the CAN device, places it into loopback mode, puts a single
message in a TX buffer and sends it.

It waits for an RX_MSG interrupt and extracts the message from an RX buffer and prints it.
It waits for an RX_MSG interrupt and extracts the message from an RX buffer and
prints it.

Run the example program, first build it by running make:
```

```sh
make
```

Once built, it can be run:

```
```sh
./uio-can-example
```

A successful execution should look like:
```

```text
locating device for can@2010c000
located /dev/uio1
opened /dev/uio1 (r,w)
Expand Down
Loading

0 comments on commit 60d8d8b

Please sign in to comment.