LLVM Helloworld

Project HelloWorld example using LLVM compiler on QEMU

This chapter covers the basics of C embedded projects including creating, building, running, and debugging baremetal applications. The project referred to in this chapter is called “Hello World.” This application prints “Hello World” text and runs a simple for-loop as a simple demonstration. The application can also be built and run on QEMU emulator.

Components Prerequisites

  • baremetal-virt-qemu-helloworld-llvm-example: Hello World Baremetal (LLVM) Project for running on QEMU
  • xplor-studio-baremetal-debug-plugin: ELF XploR Studio Plugin using for creating baremetal examples
  • rv-xplor-clang-linux64/rv-xplor-clang-win64: XploR Embedded LLVM toolchain for RISC-V (support both 32 and 64-bit)
  • rv-qemu-linux64/rv-qemu-win64: QEMU for running and debugging RISC-V applications (Baremetal, Embedded, Embedded Linux)

To build, run and debug LLVM Helloworld applications, please make sure that all above components are installed. Please refer to Component management for more information about installing component.

Working flow

  1. To create a new project, select File > New > C Project choose RISC-V Embedded Project > RISC-V Hello World with LLVM

example image

  1. Other steps are same as the quick-start project. Please refer to Quick start with FreeRTOS project for general working flow.

Notes