1、参考一下文章,在keil中生成sct文件
Keil MDK的sct分散加载文件详解
2、根据编译器选择使用哪种语句
developer.arm.com
// Arm Compiler 5
unsigned long NI_longVar __attribute__( ( section( "NoInit"),zero_init) ) ;
// Arm Compiler 6
unsigned long NI_longVar __attribute__( ( section( ".bss.NoInit")) ) ;
//also modify one line of the scatterfile from:
// *(NoInit)
//to:
// *(.bss.NoInit)