參考Poject 摘要 Main.c 中 為Project 主程式,其中能為透過user鍵盤輸入字串,透過FreeRTOS 輸出至 console 端,紀錄完整運作過程。 架構圖 前置作業 初始化Uart
9/12/2021Overview ARM Architecture 從第七代開始,分為三種配置(Profile) Application:AXI,VMSA(MMU) Real-time:AXI,PMSA(MPU),TCM(Cache),多核 Micocontroller:AHB(-Lite),APB,NIVC,Thumb Only,單核 補充:新架構有支援Variant PMSA(M4,M7,M23),Variant TCM(M7,M55) ARM Cortex-M 架構介紹 Cortex-M 只支援 Thumb-1 和 Thumb-2 指令,而 32-bit ARM 指令則不支援
9/11/2021Linux 中斷流程 在Linux kernel中,對與每一個設備的IRQ都會使用一種 struct irq_desc 來描述(稱 interrupt descriptor) , 所以會有一個儲存所有描述符的資料結構 interrupt descriptor table。 當一個中斷發生的時候,其對應interrupt descriptor table上的所有"irqaction"的"handler"都將被依次執行,以判斷是否是自己的設備產生的中斷,這主要靠讀取自己設備的中斷狀態寄存器來完成。因此共享中斷時,即便不是你的設備產生的中斷,你的"handler"也會被調用到。為了避免無謂的消耗,需要一進"handler"就立刻進行判斷,如果不是,就盡快的退出。 Linux interrupt implement Top halves(disable interrupt) top half 是真正接受中斷請求的對象,因此要避免執行過久的情況前面提到是在此是關閉中斷的,還有在 top half 的實作上就是為 bottom half 的排程 (scheduling)因此執行速度會非常快
8/8/2021. ./start_qemu.sh image.bin -debug gdb-multiarch -ex="target remote localhost:1234" ./image.elf \Wedge https://github.com/jkovacic/FreeRTOS-GCC-ARM926ejs/blob/master/drivers/uart.c https://hkt999.medium.com/%E4%BD%BF%E7%94%A8-qemu-freertos-visual-studio-code-%E4%BE%86%E9%96%8B%E7%99%BC%E5%B5%8C%E5%85%A5%E5%BC%8F%E7%B3%BB%E7%B5%B1-204c5483f62 1.mag char 是甚麼 (資料結構) print.h
8/8/2021or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up