/* Code that will impact SPIM DMM is placed in the spimcode section,
which will be located at RAM instead of SPIROM at execution time. */
#if defined ( __CC_ARM )
//#pragma arm section code="spimcode"
//#pragma arm section
void SPIMCode_DelayMicroSec(uint32_t u32Delay) __attribute__((section("spimcode")));
void SPIMCode_SetBusClock(uint32_t u32SysClk, uint32_t u32SClk) __attribute__((section("spimcode")));
uint32_t SPIMCode_GetBusClock(void) __attribute__((section("spimcode")));
void SPIMCode_ConfigDMMMode(uint32_t u32SysClk, uint32_t u32SClk, uint32_t u32RdCmdCode) __attribute__((section("spimcode")));
#elif defined (__ICCARM__)
void SPIMCode_DelayMicroSec(uint32_t u32Delay) @ "spimcode";
void SPIMCode_SetBusClock(uint32_t u32SysClk, uint32_t u32SClk) @ "spimcode";
uint32_t SPIMCode_GetBusClock(void) @ "spimcode";
void SPIMCode_ConfigDMMMode(uint32_t u32SysClk, uint32_t u32SClk, uint32_t u32RdCmdCode) @ "spimcode";
#endif
上述程序怎么理解?芯片起动后 FLASH 拷贝到 RAM 是由哪个程序完成的?
|