Post Installation¶
Windows¶
PolarFire SoC boot mode programming¶
When using PolarFire SoC boot mode programming tool from within SoftConsole then Program and debug, or Libero has to be installed:
https://www.microsemi.com/product-directory/dev-tools/4970-programming
Renode dependencies¶
The Renode emulation platform is not a crucial sub-module of SoftConsole and users who are intending to connect to hardware targets only do not need satisfy the Renode’s dependencies.
Note
A administrative account is required to install the .NET framework.
The Renode emulation platform can be used out of the box on many Windows 10 machines. However in a rare case when the .NET Framework is not already installed with Windows 10 then it can be changed easily from within Windows features menu.
Windows firewall¶
On Windows if there is a firewall in use then the first time that a debug session is run the firewall may prompt that it is blocking
OpenOCD, fpServer.exe
and/or renode.exe
. Allow the firewall to unblock these and save this as the default setting if
necessary.
Linux¶
Many of the commands below require root privileges using su
, sudo
or by logging in as root.
Many platforms have
gcc
andmake
packages installed by default, but it is advisable to make sure that these are installed.Note
Renode is using
gcc
for compiling just in time models. Whilemake
is used by Eclipse CDT to compile projects.sudo apt-get install build-essential sudo apt-get install libwebkit2gtk-4.0-37 # To enable SoftConsole embedded web-browser
sudo yum groupinstall 'Development Tools'
It is recommended that the Linux platform used to run SoftConsole has all available updates installed.
Note
It may be possible to install and run SoftConsole on other Linux distributions or versions once the required packages are installed. However, some earlier distributions (for example, CentOS/RHEL 5.x and 6.x) may not work and are not recommended or supported.
Program and Debug PolarFire SoC¶
If you want to use mpfs programmer you need to install Program and debug, or Libero:
https://www.microsemi.com/product-directory/dev-tools/4970-programming
Renode dependencies¶
Renode requires Mono framework to run and is provided by mono-project, add its package repository running the following:
sudo apt install gnupg ca-certificates
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
sudo apt install mono-devel mono-complete
sudo apt install apt-transport-https dirmngr gnupg ca-certificates
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/debian stable-buster main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
sudo apt install mono-devel mono-complete
Warning
These commands have to be run from root account.
rpmkeys --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"
su -c 'curl https://download.mono-project.com/repo/centos7-stable.repo | tee /etc/yum.repos.d/mono-centos7-stable.repo'
yum install mono-devel mono-complete
Note
For users who wish to use Renode on a unsupported platform, they can on their own risk visit mono project website and follow the instructions.
Additional dependencies¶
The mono framework is the main dependency for Renode to run. There are additional packages which might be have to be installed, but the packages either are needed only for a additional feature (like Robot testing or compiling Renode from its sources), or the packages might be already included with a generic GUI desktop environment anyway. Most of the users can skip this step.
On Ubuntu they can be installed with the following commands:
sudo apt-get install git automake autoconf libtool g++ realpath gcc libc6-dev
sudo apt-get install policykit-1 libgtk2.0-0 screen uml-utilities gtk-sharp2 rpm libarchive-tools
sudo apt-get install python3 python3-pip python3-setuptools python3-dev ruby ruby-dev
sudo gem install fpm
Writing models for Renode¶
Users, wishing to write Renode models can use Mono Develop IDE as their C# editor. Renode is made as a Mono Develop project, therefore it should be able to open Renode’s sources without any extra manual steps.
Hardware targets (FlashPro)¶
Note
When accessing FlashPro devices then native Windows/Linux host machines are recommended as there might be issues with Virtual Machines accessing the FlashPro.
Check that FlashPro can be used without root privileges¶
Connect a FlashPro5/6 JTAG programmer to a native Linux host machine (this might not work on a VM) and check that it is visible to the operating system:
lsusb
Bus 001 Device 004: ID 1514:2008 Actel
Bus 001 Device 004: ID 1514:2009 Actel
Bus 002 Device 002: ID 1514:200b Actel
If the FlashPro5 (VID=1514 PID=2008) or FlashPro6 (VID=1514 PID=2009) or embedded FlashPro6 Rev B (VID=1514 PID=200b) does not appear then double check that the previous steps were carried out correctly.
Warning
If you will see VID=1514 PID=200a then that is embedded FlashPro6 Rev A and to use it with SoftConsole or Libero, it needs to be upgraded to Rev B.
To the JTAG end of the FlashPro connect a suitable board containing a RISC-V CPU based SoC design.
Make sure you are connecting to the right JTAG connector (in case of Icicle board it’s J23 and not J10, the J10 is used only to reprogram the embedded JTAG)
Power the board on.
Make sure that the board is configured for FlashPro JTAG debugging of the target CPU (depending on the board and CPU/SoC in use some board switches/jumpers configuration may be required).
Make sure that it has correct and matching Libero design (if you are going to connect to Mi-V RV-32 then you need working Mi-V design on the device)
Run OpenOCD from the command line to ensure that the debug connection can be established to the target CPU/SoC:
First go to the correct directory (replace <SoftConsole-install-dir>
with your installation path):
cd <SoftConsole-install-dir>/openocd/bin
And then execute the following:
./openocd -c "set DEVICE MPFS" -f board/microsemi-riscv.cfg
./openocd -f board/microsemi-riscv.cfg
The output should be similar to the following:
Open On-Chip Debugger
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
adapter speed: 6000 kHz
microsemi_flashpro tunnel_jtag_via_ujtag off
trst_only separate trst_push_pull
do_board_reset_init
Info : FlashPro ports available: S201Z7LB20, E200X3ID7
Info : FlashPro port used: S201Z7LB20
Info : clock speed 6000 kHz
Info : JTAG tap: FPGA.tap tap/device found: 0x1f8071cf (mfg: 0x0e7
(GateField), part: 0xf807, ver: 0x1)
microsemi_flashpro tunnel_jtag_via_ujtag on
Info : JTAG tap: FPGA.tap disabled
Info : JTAG tap: FPGA.dap enabled
Info : RISC-V IDCODE = 0x10e31913
Info : Examined RISCV core; XLEN=32, misa=0x40902223
halted at 0x80000b60 due to debug interrupt
Note
Notice from the log above, the following was recognized correctly
The FlashPro ports
The ID code of the JTAG tap
And the RISC-V IDCODE
Warning
If seeing output similar to the snippet below (or any other errors excluding documented issues) then that indicates a problem. In that case double check that all the post installation steps have been carried out correctly and that the target hardware/board is correctly configured for debugging of the target CPU/SoC.
Info: FlashPro ports available: none
Info: FlashPro port used: usb
Error: InitializeProgrammer(usb) failed: Can not connect to the programmer
Enabling non-root user to access FlashPro¶
By default, USB devices are only accessible to users with root privileges. To debug using SoftConsole and FlashPro5/6 as a non-root user some additional steps must be taken.
Copy the OpenOCD udev rules file and tell the udev subsystem to load it. This rules file describes all USB JTAG devices supported by OpenOCD to the system and makes them accessible by non-root users (replace
<SoftConsole-install-dir>
with your installation path):cd <SoftConsole-install-dir>/openocd/share/openocd/contrib sudo cp 60-openocd.rules /etc/udev/rules.d sudo udevadm trigger # Or reboot the PC for the changes to take effect
If
/etc/udev/rules.d/60-openocd.rules
already exists then make sure to overwrite it with the new version in this release as it contains additional rules that are not included in the earlier version.Note
If SoftConsole is installed alongside other tools which affect the udev rules (for example Libero, Program and Debug), then make sure their rules/scripts do not override the rules from the
60-openocd.rules
file.In some cases it may be necessary to reboot for the changes to take effect. Some distributions do not create the
plugdev
group and/or may not add users to it automatically. In that case theplugdev
group must be created manually and the user added to theplugdev
group.sudo groupadd plugdev sudo usermod -a -G plugdev <username>
Log out and then log in (or reboot the PC) for the
usermod
changes to be applied.
Note
If you previously used SoftConsole v4.x or 5.0 and installed the 99-openocd.rules
file into /etc/udev/rules.d
then you can delete that file as it is now redundant and superseded by 60-openocd.rules
. Then run again:
sudo udevadm trigger # Or reboot the PC for the changes to take effect
For all other common issues read the troubleshooting section. Or at least search for the error messages.