Ubuntu20.04 builds RISC-V and qemu environment

1. Preface risc-v is a very potential instruction set framework, and I have become very interested in it recently. Since I had very little knowledge in this area before, and the online tutorials were all just click-to-click, the installation process was extremely tortuous. . Fortunately, after accumulating and exploring step by step in the end, […]

Ubuntu installs riscv-gnu-toolchain compilation chain and spike, pk usage guide

riscv-gnu-toolchain compilation chain and spike, pk installation and usage guide 1. Environment: Ubuntu18.04 2. Install dependency packages (needed for various compilations): $ sudo apt install autoconf automake autotools-dev curl python3 libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev 3. Differentiate between downloading riscv-gnu-toolchain and riscv-tools As for why we […]

RISC-V architecture exception handling and stack traceback analysis (2)

In the previous article RISC-V FreeRTOS exception handling and task switching analysis (based on qemu + gdb tracking and debugging)_Dingjun798077632’s blog-CSDN blog, it was mentioned that the FreeRTOS\Source\portable\GCC\RISC-V\portASM.S file passed The macro portcontextSAVE_CONTEXT_INTERNAL saves the context code. There is a loophole: portcontextSAVE_CONTEXT_INTERNAL finally saves sp to pxCurrentTCB->pxTopOfStack. Before creating the task and calling vTaskStartScheduler(), pxCurrentTCB […]

Talking about LiteOS-LiteOS SDK supports RISC-V architecture

【Abstract】 This article first gives a brief introduction to the RISC-V architecture. On this basis, it implements the specific steps of the adaptation process of LiteOS to the RISC-V architecture. I hope it will be helpful to you. 1 Introduction to RISC-V architecture RISC-V is an open source instruction set architecture (ISA) based on reduced […]

RISC-V architecture exception handling and stack backtracing (1)

Table of Contents RISC-V stack frame structure analysis After compilation optimization is turned on, FP is treated as a normal register. Implement your own exception handling stack traceback function Exception handling printing context and task stack verification The previous two articles analyzed the startup of FreeRTOS on RISC-V and the processing flow of OS task […]

Building a Linux system environment based on RISC-V QEMU simulation and running

Foreword The article explains in detail how to build a Linux system environment based on RISC-V QEMU simulation running from scratch. This is the best choice for Linux novice introductory tutorials. Welcome to leave a message for discussion. Please indicate the source of the original text when forwarding~ 1. Prepare QEMU simulation environment –RISC-V 64bits […]

MCU soft core 2. Running tinyriscv on Xilinx Artix7

0. Environment -ubuntu18 – win10 + vivado 2018.3 – git desktop – XC7A35TV12 core board – ft2232hl small board (for program burning) 1. git clone source code Git Desktop -> File -> Clone repository -> -> URL: https://gitee.com/liangkangnan/tinyriscv/ -> Local path: D:\Workspaces\GitHub\tinyriscv 2. vivado creates project Create Project -> Next -> -> Project name: tinyriscv […]

Source code compilation of risc-v virtual machine and compiler riscv-gnu-toolchain and riscv-tools in ubuntu 22.04

1. Compile riscv-gnu-toolchain 1.1 Preparation environment $ sudo apt-get install autoconf automake autotools-dev curl python3 libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev 1.2 Download source code https://github.com/riscv-collab/riscv-gnu-toolchain git clone –recursive https://github.com/riscv-collab/riscv-gnu-toolchain.git 1.3 Compile elf tool cd riscv-gnu-toolchain/ for riscv64-unknown-elf-gcc: ./configure –prefix=/opt/riscv sudo make -j 1.4 Compilation linux tools […]