編譯帶有除錯資訊的 LLVM/Clang LLVM CMake Build Reference: https://llvm.org/docs/CMake.html LLVM Getting Started: https://llvm.org/docs/GettingStarted.html 快速編譯以及快速連結請參考 LLVM Getting Started 的 Common Problem 的 C …
分類: C
不論是 setuptools 或是 distutils 都無法直接設定 C Extension package 的 version,必須採用紆迴的方式進行。 總而言之,Python 3.6 的年代,我們直接使用 setuptools。 0. 預期結果 [crayon-6484c90c448f9423283406/] 1.原始狀況 原始 Init function: [crayon-6484c90c4 …
Extending Python with C – Jump Consistent Hash 本文的目標是以 C 完成 Jump Consistent Hash 的主體,接著透過 Python-C-API 轉為 Python 可以使用的套件。也就是說,模組的本體將會以 C 語言寫成,接著透過 setuptools 編譯為 so 檔,如此編成的模組將可以讓 Python 無縫接軌使用。 參 …
前言 – What is semihosting? Semihosting 是 ARM 中的一個機制,使得 ARM target 可以藉由運行 debugger 的 host computer 的 Input/Output 裝置來進行溝通。 Semihost 的實作是透過使用定義好的軟體中斷 (SVCs),使程式在執行過程中產生中斷。一旦目標系統上的程式呼叫到對應的指令 (semihos …
影片網址:https://atollic.wistia.com/medias/gwgee6ev93 影片簡單的介紹了 Bare-metal 下的 Scheduling technique, preemption 以及 FreeRTOS 的特性還有有關 Task 基礎事項 (如何建立,Task Control Block, Task State),如果沒有看過 RTOS 相關的東西的話這個影片可以「快 …
背景知識: linker: 將多個 input files 輸出為一個 output file. output file 與 input files 的格式是一種特殊資料格式稱做 object file format (目的檔格式),每個檔案則稱做 object file (目的檔),輸出檔則常稱做 executable (可執行檔),當然也能稱為 object file。 每個 object f …
名詞定義 Mutex: Linux kenrel 中的 mutex lock, <include/mutex.h> Semaphore: Linux kernel 中的 semaphore, <include/semaphore.h> mutual exclusion: 中翻互斥鎖,一個概念,為了防止 concurrency 狀況下出現 race condition. &nb …
今天要講的是修改 f9-kernel menu config 下排按鈕顏色跑掉的問題。 會發現這個問題是因為把 f9-kernel clone 下來想要編譯,在要做 config 的時候發現這個問題。可以從上圖左邊看到 Linux kernel 的 make menuconfig 下排的 button 是有對比顏色的 (<Select> tag active 是黃色的、<Exit& …
Wonderful / Amazing TUI in gdb (but what name?) 很少人知道,但是非常有用的 – TUI (Text User Interface) 這個東西可以讓原本很難用的 gdb 變得非常好用 (應該說比較直觀),開啟之後會將畫面切分為二,上層顯示 source code,下層輸入 gdb 指令。以下是 TUI 的相關示範。   …
Definition: 定義 occurs in only one place (只能出現一次) specifies the type of an object; reserves storage for it; is used to create new objects example: [crayon-6484c90c4588e305736837/] Declaration: 宣告 …