|
发表于 2018-6-21 11:28:43
|
显示全部楼层
按LZ的说明,我在m0的工程中加入了EventRecored的选项,设置也是按说明里面来的,但在编译时,出现了一大堆问题:
*** Using Compiler 'V5.06 update 4 (build 422)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'Stm32f030demo'
compiling EventRecorder.c...
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(242): error: #20: identifier "__STATIC_INLINE" is undefined
__STATIC_INLINE uint32_t GetContext (void) {
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(242): error: #101: "uint32_t" has already been declared in the current scope
__STATIC_INLINE uint32_t GetContext (void) {
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(242): error: #65: expected a ";"
__STATIC_INLINE uint32_t GetContext (void) {
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(287): warning: #12-D: parsing restarts here after previous syntax error
wval = rval & ~
VENT_RECORD_VALID;
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(288): error: #169: expected a declaration
} else {
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(291): warning: #12-D: parsing restarts here after previous syntax error
*mem = wval;
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(292): error: #169: expected a declaration
if (irqmask == 0U) {
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(296): warning: #12-D: parsing restarts here after previous syntax error
return rval;
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(298): error: #169: expected a declaration
}
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(321): warning: #12-D: parsing restarts here after previous syntax error
val = *mem;
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(322): error: #169: expected a declaration
if ((val & EVENT_RECORD_VALID)) {
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(329): warning: #12-D: parsing restarts here after previous syntax error
*mem = val;
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(330): error: #169: expected a declaration
if (irqmask == 0U) {
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(334): warning: #12-D: parsing restarts here after previous syntax error
return ret;
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(336): error: #169: expected a declaration
}
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(397): warning: #12-D: parsing restarts here after previous syntax error
tbit;
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(398): error: #169: expected a declaration
if (UnlockRecord(&record->info, info) != 0U) {
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(405): warning: #12-D: parsing restarts here after previous syntax error
IncrementRecordsDumped();
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(406): error: #169: expected a declaration
return 0U;
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(407): error: #169: expected a declaration
}
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(444): warning: #12-D: parsing restarts here after previous syntax error
static uint32_t TimeStamp
_NO_INIT;
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(503): error: #757: variable "uint32_t" is not a type name
_WEAK uint32_t EventRecorderTimerInit (void) {
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(510): error: #20: identifier "TimeStamp" is undefined
TimeStamp = 0U;
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(526): error: #757: variable "uint32_t" is not a type name
_WEAK uint32_t EventRecorderTimerGet (void) {
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(531): error: #20: identifier "TimeStamp" is undefined
return (TimeStamp++);
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(552): error: #757: variable "uint32_t" is not a type name
uint32_t EventRecorderInitialize (uint32_t recording, uint32_t start) {
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(552): error: #757: variable "uint32_t" is not a type name
uint32_t EventRecorderInitialize (uint32_t recording, uint32_t start) {
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(552): error: #757: variable "uint32_t" is not a type name
uint32_t EventRecorderInitialize (uint32_t recording, uint32_t start) {
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(555): error: #65: expected a ";"
uint32_t ts;
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(556): error: #65: expected a ";"
uint32_t n;
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(558): warning: #223-D: function "crc16_ccitt" declared implicitly
crc = crc16_ccitt((const uint8_t *)&EventRecorderInfo, sizeof(EventRecorderInfo));
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(586): error: #20: identifier "n" is undefined
for (n = 0U; n < EVENT_RECORD_COUNT; n++) {
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(601): error: #20: identifier "ts" is undefined
ts = EventGetTS();
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(601): warning: #223-D: function "EventGetTS" declared implicitly
ts = EventGetTS();
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(603): warning: #223-D: function "EventRecordItem" declared implicitly
EventRecordItem(ID_EVENT_INIT, ts, EventStatus.init_count, 0U);
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(615): error: #757: variable "uint32_t" is not a type name
uint32_t EventRecorderEnable (uint32_t recording, uint32_t comp_start, uint32_t comp_end) {
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(615): error: #757: variable "uint32_t" is not a type name
uint32_t EventRecorderEnable (uint32_t recording, uint32_t comp_start, uint32_t comp_end) {
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(615): error: #757: variable "uint32_t" is not a type name
uint32_t EventRecorderEnable (uint32_t recording, uint32_t comp_start, uint32_t comp_end) {
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(615): error: #757: variable "uint32_t" is not a type name
uint32_t EventRecorderEnable (uint32_t recording, uint32_t comp_start, uint32_t comp_end) {
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(616): error: #65: expected a ";"
uint32_t ofs;
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(617): error: #65: expected a ";"
uint32_t i, j;
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c(623): error: #20: identifier "ofs" is undefined
for (ofs = 0U, i = 0U; i < 4U; i++, ofs += 32U) {
C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.4.0\Source\EventRecorder.c: 12 warnings, 30 errors
compiling HW_init.c...
"..\OBJ\STM32F030Demo.axf" - 30 Error(s), 12 Warning(s).
Target not created.
Build Time Elapsed: 00:00:05
请问还需要修改什么地方吗? |
|