Inflearn brand logo image
Inflearn brand logo image
Inflearn brand logo image
Hardware

/

Embedded IoT

Learning RISC-V Architecture Through Debugging - Part 2

Explains the core concepts and practical tips of RISC-V, the latest open-source based CPU architecture, simply and in detail.

(5.0) 3 reviews

55 learners

  • austinkim
시스템반도체
이론 실습 모두
하드웨어
cpu-architecture
cpu
riscv

What you will learn!

  • I can effectively answer and explain RISC-V-related questions in technical interviews.

  • You can learn the operating principles of RISC-V's core functionalities, including Exception, Interrupt Controller, and Calling Convention.

  • Using the TRACE32 simulator program, Exception, Interrupt Controller, and Calling Convention functions can be debugged and practiced.

  • You can understand how the RISC-V architecture is utilized in OS kernels like the Linux kernel.

  • Bootloaders or Linux kernel startup code running on RISC-V based systems can be analyzed.

<Notice>

Latest lecture renewal in 2025

We've added the following lectures to help you learn about the latest RISC-V architecture features and useful content that can be applied directly to real-world projects.

  • Added session 'How Synchronous Exceptions Work' (4 lectures) - 07/23 (2025)

In the modern systems software industry
The Emerging RISC-V Architecture

Recently, the RISC-V architecture, an open source-based CPU architecture, is on the rise. If you look at IT-related media articles or news, you can immediately see the following:

  • Big tech companies like nVidia, Intel, and Qualcomm are developing RISC-V-based products (chipsets).

  • The number of startup companies designing various chips using RISC-V in Korea is increasing, and the proportion of products developed based on RISC-V devices is increasing.

  • When designing AI semiconductors, RISC-V-based CPU architecture is widely used.

  • 15 billion devices are expected to be RISC-V-based by 2026.

  • In the graduate school (processor design), various studies are being conducted using a toolkit that can design RISC-V CPUs.

Embedded and system software companies are increasingly developing products using RISC-V CPU architectures, so job seekers need to prepare for RISC-V during technical interviews.

Background on creating the lecture

For beginners, the RISC-V architecture is difficult to learn. Here are some reasons why:

  • I don't know what is important among the vast content that makes up RISC-V.

  • I don't know which functions of RISC-V are used in real projects.

  • No matter how hard you read the RISC-V specification document, it is difficult to understand it right away.


  • It is difficult to know what the term itself that describes RISC-V means.


Compared to the Arm architecture, there is not enough information on the RISC-V architecture, and there is a lack of information that specifically and easily explains RISC-V. I created this lecture to help system software developers, including new developers, overcome the difficulties they face when learning RISC-V.

Lecture structure and lecture roadmap for parts 1 and 3

This lecture covers Part 2, the core features of RISC-V, among the entire RISC-V lecture list.

The full RISC-V architecture lecture can be found in the Roadmap - ' RISC-V Architecture for System Software Developers ' lecture.

Key differentiating points of the lecture

1. Debugging RISC-V architecture with TRACE32 simulator program (educational use)

What is the shortcut to learning RISC-V architecture (registers, assembly instructions, privileged mode)? It is through hands-on debugging practice.

By taking this course, you can download the educational TRACE32 simulator program from 'Inflearn lecture materials' and use the TRACE32 simulator program to practice registers, assembly instructions, and privilege mode of the RISC-V architecture.

For reference, the TRACE32 debugger and related programs are widely used throughout system software development. The TRACE32 program requires a license to run.

2. Provide five kernel memory dumps extracted from the RISC-V board.

The most important ability required in the process of developing system software is problem solving ability. Among these, the ability to analyze and solve crash problems is the most required. In this lecture, we will debug five kernel crash memory dumps extracted from Vision-Five 2, one of the most popular RISC-V boards, and practice debugging exceptions and calling conventions. Those who take the lecture can download the five memory dumps along with the TRACE32 program and debug exceptions and calling conventions themselves.

3. Select key contents and explain them easily.

Beginners often first obtain and analyze reference documents when learning RISC-V, but it is difficult for beginners to get a sense of which RISC-V content to learn first. This is because it is difficult to know what to learn well first. In this lecture, we will carefully select and explain the content that can be applied in practice and must be well-known. For example, we will open memory dumps and kernel logs received from RISC-V-based devices and explain registers and assembly instructions in an easy and detailed manner.

4. Explain with specific examples along with software and stack.

RISC-V is mostly learned by those who want to do well in system software development or to enter this field. In this lecture, we will explain various examples of how RISC-V is utilized in real-world projects.

  • How software runs on RISC-V systems

  • What is the boot process in a RISC-V system?

  • How to Debug and Reverse on RISC-V Systems

By taking this course, you can quickly and naturally acquire a practical feel for the content of the RISC-V architecture.

5. Explain RISC-V compared to Arm architecture

Looking at the ecosystem of the system software industry, the ecosystem of the embedded and chipset industry will be centered around the Arm architecture by 2025. Many system software developers are familiar with the Arm processor or Arm architecture. In this lecture, we will explain the core concepts of RSIC-V along with the Arm architecture.

  • Types of exceptions and how to handle them

  • Structure and processing method of interrupt controller

  • How Calling Conventions are Handled (Registers Used and Related Assembly Instructions)

As the educator is the author of a book on Arm architecture, he is better able to explain RISC-V compared to the Arm architecture than anyone else.

Learn about these things 📕

It explains the basic concepts of exceptions in detail and provides an easy-to-understand explanation of the core features of exceptions defined in the RISC-V architecture.

Describes the execution flow of exceptions, a core feature of the RISC-V architecture. It also explains in detail how exceptions are handled in a system consisting of machine mode and user mode.

Describes the exception codes that indicate the cause of the exception as defined in the RISC-V architecture, and also explains the flow of exception handling with memory abort.

From a software development perspective, it details the execution flow when exceptions and crashes occur.

It explains the flow of exceptions by analyzing assembly instructions line by line. It also explains how exceptions are handled on the stack when they occur.

Practice exceptions by executing assembly instructions with the T32 debugging practice program. It explains in detail which CSR (scause, mcause) registers are changed when an exception is triggered.

We will explain in detail the exception handler processed in the Linux kernel while practicing causing an exception with the TRACE32 program.

By analyzing a memory dump obtained from a RISC-V based board, we explain how exceptions work in the RISC-V architecture: analyze the kernel log, analyze the call stack.

We will practice debugging page tables using the TRACE32 program. This will help us to understand specifically what caused the exception.

Describes the basic operation of the interrupt controller defined in the RISC-V architecture. Explains the structure of PLIC and CLIC in an easy-to-understand manner.

We review exception codes related to interrupts and explain the structure of the Platform Level Interrupt Controller (PLIC).

Describes the core hardware components that make up a PLIC and provides an easy-to-understand explanation of the CSR registers that control the PLIC.

We will explain the Calling Convention introduced in the RISC-V architecture and review the registers that support the Calling Convention.

Explains the big picture of how arguments passed to a function are processed.

Analyze assembly instructions that support the calling convention of RISC-V architecture. Also analyze example assembly instructions - c.sdsp instruction analysis.

Analyze assembly instructions that support the calling convention of the RISC-V architecture. Also analyze example assembly instructions - c.ldsp instruction analysis.

Analyze assembly instructions that support the calling convention of the RISC-V architecture. Also analyze example assembly instructions - c.ldsp instruction analysis.


We will go through a hands-on exercise to restore a broken call stack using TRACE32 debugging.


In this TRACE32 debugging exercise, we will analyze a memory dump caused by a stack overflow.


Based on my experience writing books and giving lectures
More in-depth and detailed than anyone else!

Unparalleled in the domestic system software field ! Author of 'Arm Architecture (Armv8-A, Armv7-A)' and 'Linux Kernel' ( both books selected as excellent books by the Korean Academy of Sciences ) and global author who wrote the book "Reverse Engineering Armv8-A Systems" (English) through a foreign publisher (Packt) for the first time in Korea . Above all, he is a working developer who knows the latest system software trends (electric vehicles, system semiconductors - system software) the best. He is also an educator who is most active in knowledge dissemination in the field of system software.

  • Author of the book 'Reverse Engineering Armv8-A Systems: A practical guide to Kernel, Firmware, and TrustZone analysis' (Packt Publishers)

  • Author of 'Structure and Principles of Arm Architecture for System Software Development' ( 2024, Korean Academy of Sciences Outstanding Book Award )

  • Author of 'Learning the Structure and Principles of the Linux Kernel through Debugging' ( 2021, Korean Academy of Sciences Outstanding Book Award )

  • 'Programmers Dev Course: Linux System and Kernel Expert' Main Instructor

  • June 2022, Korea Computer Conference (KCC2022) - Tutorial presentation [Conquering the Linux Kernel using ftrace]

  • LG Electronics 'Linux Kernel' and 'Armv8 Architecture' In-house Instructor ( including domestic and overseas developers ) - (2020~2024)

Recommended for
these people

Who is this course right for?

  • Junior developer aiming to enhance skills in the system software domain, covering system semiconductors (fabless) and electric vehicle sectors (autonomous driving, infotainment).

  • Seeking System SW Dev. in System IC (fabless) & EV: Job Seeker

  • System software developer (system semiconductor, electric vehicles) who wants to know how to debug in practice utilizing the features of RISC-V architecture

  • A developer from another field transitioning to system software

  • University student aiming for graduate school in system software (memory, file system, operating system)

Need to know before starting?

  • Computer Architecture

  • C language

  • Operating System

Hello
This is

5,429

Learners

148

Reviews

84

Answers

4.9

Rating

21

Courses

글로벌 저자 & 리눅스 시스템 소프트웨어 개발자 (Arm, RISC-V 아키텍처)

국내 시스템 소프트웨어 분야에서 전무후무한! 'Arm 아키텍처(Armv8-A, Armv7-A)'와 '리눅스 커널' 책을 쓴 저자(2권의 책 모두 대한민국 학술원 우수도서에 선정)이며, 국내 최초로 해외 출판사(Packt)를 통해 "Reverse Engineering Armv8-A Systems" 책(영어)을 집필한 글로벌 저자입니다. 무엇보다 최신 시스템 소프트웨어 트렌드(전기자동차, 시스템 반도체- 시스템 소프트웨어)를 가장 잘 알고 있는 현업 개발자입니다. 또한 시스템 소프트웨어 분야에서 가장 지식 전파 활동을 활발하게 하는 교육자입니다. 

  • 'Reverse Engineering Armv8-A Systems: A practical guide to Kernel, Firmware, and TrustZone analysis' 책(영어) 저자, (Packt 출판사)

  • '시스템 소프트웨어 개발을 위한 Arm 아키텍처의 구조와 원리'(2024년, 대한민국 학술원 우수도서상) 저자

  • '디버깅을 통해 배우는 리눅스 커널의 구조와 원리' (2021년, 대한민국 학술원 우수도서상) 저자

  • '프로그래머스 데브 코스: 리눅스 시스템 및 커널 전문가' 메인 강사

  • 2022년 6월, 한국컴퓨터종합학술대회 (KCC2022) - 튜토리얼 발표 [ftrace를 이용해 리눅스 커널 정복하기]

  • LG전자 '리눅스 커널' 및 'Armv8 아키텍처' 사내 강사(국내 및 해외 개발자 포함) - (2020년~현재)

국내에서 어느 누구보다 리눅스 커널과 Arm 아키텍처(Armv8-A, Armv7-A)를 잘 설명할 수 있는 교육자라고 자신있게 말씀드릴 수 있습니다.

강의문의 : austindh.kim@gmail.com

주요 로드맵 🎯

'시스템 소프트웨어 개발자를 위한 Arm - basic course'

'시스템 소프트웨어 개발자를 위한 Arm - advanced course'

시스템 소프트웨어 개발자를 위한 Linux kernel - basic course

Curriculum

All

91 lectures ∙ (11hr 33min)

Course Materials:

Lecture resources
Published: 
Last updated: 

Reviews

All

3 reviews

5.0

3 reviews

  • 이기상님의 프로필 이미지
    이기상

    Reviews 3

    Average Rating 5.0

    5

    100% enrolled

    • 박정모님의 프로필 이미지
      박정모

      Reviews 3

      Average Rating 4.3

      5

      100% enrolled

      많은 도움이 됐습니다.

      • sunny75님의 프로필 이미지
        sunny75

        Reviews 94

        Average Rating 5.0

        5

        100% enrolled

        2025/06/03/화 16:58 정말 좋은 강의를 들었습니다. stack 정보를 가지고, 디버깅을 할 수 있다는 것을 이제서야 이해 했네요. 즐거운 하루 보내세요. 감사합니다.

        $93.50

        austinkim's other courses

        Check out other courses by the instructor!

        Similar courses

        Explore other courses in the same field!