Arm is leading a research program called Morello, part of a multi-million-pound, government-funded UKRI Digital Security by Design (DSbD) program. Now we are sharing our progress and are supporting the research effort by providing a freely available suite of development tools to build and run applications that make use of this technology. The tools consist of these components:
This is a special edition of the popular Arm Development Studio IDE, customized to work exclusively with the Morello Platform Model. It provides additional functionality to provide debug support for the Morello architecture.
Built from Arm Fast Model technology, the Morello Platform model is a Fixed Virtual Platform (FVP) model capable of executing the complete Morello instruction set, and modeling system behavior.
Morello is supported by LLVM toolchains for Android, Linux, and bare-metal that are based on the CHERI Clang/LLVM toolchain from the University of Cambridge. A GNU toolchain with Morello support is also under development.
This tool can add (emulation of) Morello hardware support to present day Arm Linux platforms, to execute user space Morello applications (built with the AArch64 Linux LLVM/Clang toolchain).
In this article, I explain how to set up Development Studio to work successfully together with the LLVM compiler and Morello Platform Model FVP for bare-metal architecture exploration.
You will find links to download each component installer from the Arm Developer website. Note that these tools are only available for Linux hosts (see documentation for specific host requirements). The installers provide easy to run install scripts prompting the user to specify install location. The components require no additional license setup. Though the install location is arbitrary, in the below, the tools are installed in /ds_morello, /compiler, and /fvp directories.
Built upon the Eclipse IDE, the Arm Development Studio IDE supports both debug and the project management functionality. It is recommended to integrate the LLVM compiler into the IDE to enable projects, such as the examples supplied with Development Studio Morello Edition to be easily rebuilt from inside the IDE.
Launch the IDE (/ds_morello/bin/armds_ide) and open the Preferences pane from the Window menu. Locate the Toolchains settings from the Arm DS section (there is a text filter box for convenience), and click the Add... button.
Browse to the /bin directory of your LLVM compiler install, and click Next to register that toolchain with the IDE.
The LLVM compiler will now be listed as an available toolchain.
Click Apply and Close to finish. A restart of the IDE will be necessary to continue.
Arm Development Studio Morello Edition provides some bare-metal example projects to help you get started. They are also a good way to verify that everything is working together as expected.
To import the examples, either click the Import projects... shortcut in the Project Explorer pane, or locate Import... in the File menu.
Locate the Arm Development Studio examples, and click Next.
Select the appropriate example(s) and click Finish to import into your workspace.
Verify that the compiler has been installed correctly by rebuilding the bubblesort example with the hammer icon. You should see output similar to the below in the console pane.
We can now run a simple debug session to verify that we can connect to the platform model, and run this example. As per instructions are provided in the readme file within the 'Morello bare metal debug' example project, the SCP boot firmware to be re-built appropriately so that the Rainier CPU is enabled, and waits in a 'branch to self' loop so that the debugger can subsequently connect.
The platform model should be launched specifying these firmware images and other parameters (also explained in the readme), and so it is recommended to launch the model from your terminal with a script similar to the following.
-a Morello_Top.css.scp.armcortexm7ct=./path_to/scp_romfw.elf \
-a Morello_Top.css.mcp.armcortexm7ct=./path_to/mcp_romfw.elf \
-C Morello_Top.soc.scp_qspi_loader.fname=./path_to/scp_fw.bin \
-C css.scp.armcortexm7ct.INITVTOR=0x0 \
-C css.mcp.armcortexm7ct.INITVTOR=0x0 \
-C css.cluster0.cpu0.semihosting-heap_base=0 \
-C css.cluster0.cpu0.semihosting-heap_limit=0x80800000 \
-C css.cluster0.cpu0.semihosting-stack_limit=0x80800000 \
-C css.cluster0.cpu0.semihosting-stack_base=0x81000000 \
--cadi-server --run --plugin=./fvp/plugins/Linux64_GCC-6.4/MTS.so
(The MTS.so plugin is needed to provide trace functionality in the debugger. This plugin slows the execution performance of the model, and so if this functionality is not needed, you may wish not to specify this option).
The model will start, and after a few seconds will display a status view same as following, as well as the output of the boot firmware on the (simulated) UARTs.
And the terminal shall report that the model is ready.
Info: Morello_Top: CADI Debug Server started for ARM Models...
Back in the IDE, you can now connect the debugger to the platform model, and load the code. In the Debug Control pane, click the Connect with an existing Config... shortcut (also available in the pane menu).
And select the bubblesort_FVP example imported earlier.
The debugger will connect to the model, load the bubblesort application, and run to the main() function. You are now ready to start exploring the Morello architecture, and the Arm Debugger.
While much of the look and feel of the Morello Edition of Arm Development Studio is common to the standard editions, there are some additional features to support new functionality of Morello program. Full disassembly support of new instructions is supported in both disassembly and trace panes. Register view has been extended to include the capability registers, and the command line interface has been extended as appropriate.
The tools described in this article are available to download from Arm Developer now. Full documentation, including a thorough getting started guide are available. We will nurture a self-supporting community based around the Morello developer forum. We encourage you to download and try these tools out for yourself.
Download Morello tools now