This document describes how to use the SoftConsole example projects included in the PolarFire SoC Bare Metal Library.
- Supported Targets
- Important Note About SoftConsole Workspace
- Importing Example Projects Into Your SoftConsole Workspace
- Running an example project on the PolarFire SoC Icicle Kit
- Running an example project using the Renode Emulation Platform
A playlist is available on YouTube showing the steps outlined in this document targeting the Icicle Development Kit for PolarFire SoC:
The bare metal example projects can all be built in SoftConsole with no modification. Depending on the project used, examples can be run on either:
- The PolarFire SoC Icicle Kit
- The Renode emulation platform
Information on the Icicle Kit is available here. The Renode emulation platform is bundled with SoftConsole and more information can be found here.
Each project readme will state which target(s) are supported. Projects will also contain debug configurations for their supported target(s).
SoftConsole includes an empty workspace. We recommend that you make a copy of this empty workspace to a location of your choice. This will allow you to take advantage of the integrated "develop and debug" perspective, Renode platform launchers and other pre-configured settings.
Using the empty workspace as a starting point for your own workspace allows the example projects to work out of the box. In particular the Renode debug launchers included in the example projects will refer to the correct Renode external tool launchers.
The empty workspace is located under the following path of your SoftConsole installation:
./extras/workspace.empty
SoftConsole example projects are included in the following folder of the of the Bare Metal Library: polarfire-soc-bare-metal-library/examples
Select the File->Import menu to import an example project into your SoftConsole workspace:
Expand "Git" -> "Projects from Git (with smart import)" and click "Next":
Select "Clone URI" and click "Next":
Copy the link to the PolarFire SoC Bare Metal Library GitHub repository:
Paste the link to the PolarFire SoC Bare Metal Library GitHub repository into the "URI" field, others will auto populate, and click "Next":
Ensure the "Master" branch is selected and click "Next":
Select a destination folder to clone the bare metal library to and click "Next":
Allow SoftConsole to clone the bare metal library:
Use the "Deselect All" option to deselect all of the included projects and only import the required project and click "Finish":
The imported project will now appear in the project explorer and the "polarfire-soc-bare-metal-library" will now appear as a git repository:
Further projects can be imported after the preceding steps, as the bare metal library is already cloned. The projects can be imported from a local repository instead of a URI
Open the project and build it using the "Build" button:
Click on the down-arrow on the right of the "Debug" button then click on "Debug Configurations":
Select the "[project-name] hw all-harts debug" configuration and select "Debug":
This will launch the debug session, the debug perspective reflects the debug operations:
The debug execution is controlled using the debug buttons:
A serial emulator, such as Putty, can be used to monitor COM output from the Icicle kit using a micro USB cable connected to J11:
Open the project and build it using the "Build" button:
Click on the down-arrow on the right of the "Debug" button then click on "Debug Configurations":
Select the "[project-name] renode all-harts start-platform-and-debug" configuration and select "Debug":
This will launch Renode and some Renode analyzers allowing you to interact with the executing example code:
The debug perspective reflects the debug operations:
The debug execution is controlled using the debug buttons: