Risheng

@Risheng

Joined on Sep 26, 2019

  • 學習如何建立一個 stm32 的 bare-metal 專案,完整專案可見 cm4bm 使用設備: NUCLEO-F303ZE 官方文件規格 開發板: STM32F303ZE 安裝 ST-Link 記得要安裝必要的模組和工具 sudo apt-get install git make cmake libusb-1.0-0-dev
     Like 1 Bookmark
  • 個人資料 大學: 國立中央大學機械工程學系 碩士: 國立成功大學機械工程學系 2022聯發科暑期實習 流程 面試職位: 軟韌體開發_Embedded System software (新竹) 很感謝學長內推,也順利拿到限定推薦
     Like 15 Bookmark
  • 練習 ARM Cortex-M4 處理器所做的練習項目,專案可見 cm4bmp Inline Assembly Coding Example 1: Load 2 values from memory, add them and store it to memory by using inline assembly statement 地址0x20001000初始值: 6 地址0x20001004初始值: 4 將地址 0x20001000 及 0x20001004 分別放入 R1 及 R2 /* move 0x20001000 to R1 */ __asm volatile("LDR R1,=#0x20001000");
     Like 1 Bookmark
  • contributed by < Risheng1128 > 作業要求 作業區 實驗環境 $ lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 39 bits physical, 48 bits virtual
     Like  Bookmark
  • contributed by < Risheng1128 > Linux2022 開發紀錄(lab0) Linux2023 開發紀錄(lab0) 首先 Linux kernel 的 merge sort 主要由三個函式 list_sort() 、 merge() 及 merge_final() 組成,以下開始分析每個函式所做的功能 在分析函式之前,先了解函式的 prototype ,每個函式的宣告都擁有函式屬性 __attribute__((nonnull())) ,參考 __attribute__((nonnull)) function attribute 可以得知 nonnull 是用來使特定函數的引數為 NULL 時,編譯器會發出警告 This function attribute specifies function parameters that are not supposed to be null pointers. This enables the compiler to generate a warning on encountering such a parameter.
     Like 3 Bookmark
  • contributed by < Risheng1128 > 前言 這次發 patch 的機會主要是在修 jserv 老師的 Linux 核心實作課程,寫 quiz3 的作業時,我有對第一題的巨集 GENMASK 做一些的分析,也從老師得知在 kernel 裡其實有很多同名且功能相似甚至相同的函式或巨集,因此老師鼓勵我可以試著發送 patch 看看,我就想說來既然機會來了就嘗試看看,也就有了這次的提交,提交紀錄在這裡 準備提交 Patch 的 Email git 有提供一個命令 git send-email 來做到發出信件的功能,或是也有很多人會使用 mutt 來幫忙發 plain text mail。我自己是 send patches 時會使用 git send-email,如果只是回覆 comment 之類就會用 mutt 安裝 git send-email 參考 How to configure and use git send-email with gmail 使用以下命令安裝 git send-email
     Like  Bookmark
  • contributed by < Risheng1128 > 作業說明 實驗環境 $ lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 39 bits physical, 48 bits virtual Byte Order: Little Endian
     Like  Bookmark
  • :::info 目標 學習 ARM TrustZone ,理解其設計及架構,並且進一步學習 ARM Trusted Firmware-M ::: ARM TrustZone for ARMv8-M 學習 ARM TF-M 之前,應該先學習其基礎架構 TrustZone 在學習 ARM TrustZone 的路上讀了很多第二手文件,繞了非常多冤枉路,但最後發現還是第一手文件 TrustZone technology for Armv8-M Architecture Version 2.1 最清楚,又再次證明第一手文件的重要性
     Like 2 Bookmark
  • contributed by < Risheng1128 > 作業說明 實驗環境 $ gcc --version gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit
     Like 2 Bookmark
  • contributed by < Risheng1128 > RISCOF - The RISC-V Compatibility Framework 參考 RISCOF - Introduction , RISCOF 是一個測試框架,主要是使用一系列的 RISC-V 組語測試檔來測試用硬體或是軟體實作的 RISC-V 處理器架構 而之前所使用的 riscv-arch-test 只能算是符合 RISC-V 架構的先決條件,通過這個測試並不能完全表示完全符合 RISC-V 的架構,因此這裡使用 RISCOF 可以做測試的交叉比對 環境設定 可以開始來安裝 RISCOF 了,首先需要先安裝 python ,這裡使用的環境是 Ubuntu 20.04 ,而 python3 及 pip3 的版本如下所示,官方推薦的版本可以參考 Install Python
     Like 3 Bookmark
  • contributed by < Risheng1128 > :::info 目標: [x] 通過 Standard Extension for Compressed Instruction 的 riscv-arch-test (目前指令 c.ebreak 未通過) [x] 解決 Avoid duplications in RISC-V exception handlers #61 [x] 通過 privilege instruction 的測試 [ ] 解決 Migrate to latest RISC-V Architecture Test #49 [ ] 提升 rv32emu 執行效能 :::
     Like 10 Bookmark
  • Rewrite Length of Last Word I choose the Length of Last Word from 蕭珮珊 Motivation: I think the problem is interesting, and I want to practice how to send the u32 data to emulator #include <string.h> void Display(const char* str){ /* Send char to UART Tx */ volatile char* u8tx = (volatile char*)0x40002000; while(*str)
     Like  Bookmark
  • contributed by < Risheng1128 > 作業說明 作業區 2022 年 Linux 核心設計/實作課程期末專題 實驗環境 (筆電) $ gcc --version gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
     Like  Bookmark
  • Assignment1: RISC-V Assembly and Instruction Pipeline Lab1: RV32I Simulator Introduction I choose the problem Leetcode912. Example: Input: nums = [5,2,3,1]
     Like  Bookmark
  • Introduction 主要參考 amazon-freertos 裡頭 MiniCLI 裡的實作,分析其實作細節 MiniCLI 主要是 MTK 的一個小專案,用來提供使用者輸入 command 的介面 MiniCLI is a Command Line Interface engine implementation Data Structure 參考 minicli/inc/cli.h 裡的結構定義,一共分成三個部份 cmd_t, cli_history_t 及 cli_s
     Like  Bookmark
  • :::warning Expectation (Goal) biRISC 和課堂提到的 RISC-V 處理器實作很不同, 本質是 superscalar (dual-issue) in-order 6 or 7 stage pipeline,是進階的處理器實作,但在本專題中,你們只要專注在 biRISC 的 datapath, control, pipeline 的內部設計 使用 Verilator 工具可用來確認 biRISC 的 RV32IMZicsr 指令的 datapath 和 control 探討 6 or 7 stage pipeline 的設計,搭配分析對應的波形圖,特別是解讀如何達到 dual-issue 在共筆記錄你們的探索過程,及相關問題 :::
     Like  Bookmark
  • Requirements Setup Environment Download srv32 git clone https://github.com/sysprog21/srv32.git Install RISC-V toolchain
     Like  Bookmark
  • kecho khttpd Linux 核心如何處理傳遞到核心模組的參數
     Like  Bookmark
  • contributed by < Risheng1128 > 參考 Passing Command Line Arguments to a Module ,發現 kernel 是使用巨集 module_param 傳遞參數,接著可以在檔案 main.c 發現該巨集的使用,可以得知 khpptd 可以讓使用者自己設定 port 及 backlog static ushort port = DEFAULT_PORT; module_param(port, ushort, S_IRUGO); static ushort backlog = DEFAULT_BACKLOG; module_param(backlog, ushort, S_IRUGO); 接著研究 module_param 的實作,可以在 linux/include/linux/moduleparam.h 找到數個定義,將相關定義表示在下方
     Like 1 Bookmark
  • contributed by < Risheng1128 > 作業說明 測驗題目 測驗 1 :::info 延伸問題: [x] 解釋上述程式碼運作原理
     Like  Bookmark