函数加载到 Flash 或 SRAM 指定地址
将函数加载到 Flash 指定地址:
1
2
3
|
void Test(void) __attribute__((section(".ARM.__at_0x08001000")));
void Test(void)
{}
|
将函数加载到 SRAM 指定地址
1
2
3
|
void Test(void) __attribute__((section(".ARM.__at_0x20001000")));
void Test(void)
{}
|
只在 Keil 上有效