爲了在主機上執行嵌入式項目的單元測試,我開始使用函數指針來在運行時在函數的「實際」實現和模擬之間進行切換。 所以,我的函數「富」看起來像這樣在.c文件: // the 'real' implementation of the function to be used during runtime
void fooImplementation ()
{
/* ... */
}
//
我正在編寫一個裸機ARM引導加載器,並試圖使用一些內部SRAM作爲便箋與應用程序代碼進行通信。爲了我的需要,我不需要初始化或清零內存。使用這個腳本,我可以將我想要的變量放在內存中。 /**
* Linker script for secondary bootloader.
*
* Allocatest the first 1Mb of DRAM for its use.
* Scratch