Bare Metal Programming
Bare Metal Programming 開發指的是在沒有作業系統的環境下來開發程式,最直接的影響是在沒有作業系統的環境一些常見的 library 提供的功能將會無法直接使用。
main.s
main.s
之後會被 cross compiler 編譯成 main.o
|
|
wfe: Wait for event, enter to low-power standby state
linker.ld
Linker script 將 main.o
的 .text
section 放置到指定的記憶體位置 (0x80000
) 後
SECTIONS
{
. = 0x80000;
.text :
{
*(.text)
}
}
Makefile
|
|
Build Image
$ make
Run
$ make run