Skip to content

Latest commit

 

History

History
160 lines (83 loc) · 6.09 KB

File metadata and controls

160 lines (83 loc) · 6.09 KB

Bare Metal Library Example Projects

This document describes how to use the SoftConsole example projects included in the PolarFire SoC Bare Metal Library.

A playlist is available on YouTube showing the steps outlined in this document targeting the Icicle Development Kit for PolarFire SoC:

Watch the video

Supported Targets

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).

Important Note About SoftConsole Workspace

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

Importing Example Projects Into Your SoftConsole Workspace

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:

File_Import_menu_1

Expand "Git" -> "Projects from Git (with smart import)" and click "Next":

Import_Select_Dialog_1

Select "Clone URI" and click "Next":

import_projects_from_git_dialog_1

Copy the link to the PolarFire SoC Bare Metal Library GitHub repository:

copy_bare_metal_library_link_1

Paste the link to the PolarFire SoC Bare Metal Library GitHub repository into the "URI" field, others will auto populate, and click "Next":

import_projects_from_git_dialog_2

Ensure the "Master" branch is selected and click "Next":

import_projects_from_git_dialog_3

Select a destination folder to clone the bare metal library to and click "Next":

import_projects_from_git_dialog_4

Allow SoftConsole to clone the bare metal library:

import_projects_from_git_dialog_5

Use the "Deselect All" option to deselect all of the included projects and only import the required project and click "Finish":

import_projects_from_git_dialog_6

The imported project will now appear in the project explorer and the "polarfire-soc-bare-metal-library" will now appear as a git repository:

imported_project_1

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

local_repository_1

Running an example project on the PolarFire SoC Icicle Kit

Open the project and build it using the "Build" button:

Build_button_1

Click on the down-arrow on the right of the "Debug" button then click on "Debug Configurations":

Debug_Config

Select the "[project-name] hw all-harts debug" configuration and select "Debug":

Debug_Configurations

This will launch the debug session, the debug perspective reflects the debug operations:

Debug_Perspective

The debug execution is controlled using the debug buttons:

Debug_Buttons_1

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:

Putty_COM

Running an example project using the Renode Emulation Platform

Open the project and build it using the "Build" button:

Build_button_1

Click on the down-arrow on the right of the "Debug" button then click on "Debug Configurations":

Debug_Config

Select the "[project-name] renode all-harts start-platform-and-debug" configuration and select "Debug":

Debug_Configurations

This will launch Renode and some Renode analyzers allowing you to interact with the executing example code:

Renode_Example

The debug perspective reflects the debug operations:

Debug_Perspective

The debug execution is controlled using the debug buttons:

Debug_Buttons_1