
sct文件增加EventRecorder.o文件
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
LR_IROM1 0x08000000 0x00080000 { ; load region size_region
ER_IROM1 0x08000000 0x00080000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
.ANY (+XO)
}
RW_IRAM1 0x20000000 0x0001C000 { ; RW data
.ANY (+RW +ZI)
}
RW_IRAM2 0x2001C000 UNINIT 0x00001000 {
EventRecorder.o (+ZI)
}
}
#include "cmsis_os2.h" // ARM::CMSIS:RTOS2:Keil RTX5
#include "stdio.h"
#include "EventRecorder.h" // Keil.ARM Compiler::Compiler:Event Recorder
typedef struct {
uint32_t hi;
uint32_t low;
} MyType;
MyType mysymbol;
int main(void) {
int i;
EventRecorderInitialize(EventRecordAll, 1);
printf("EventRecord example\n");
while (1) {
for( i=0; i<=30; i++ ) {
printf("The value of i is %d\n", i);
mysymbol.hi = i*i;
mysymbol.low = i;
}
}
}

Comments | NOTHING