This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

【急】TM4C Launchpad 编译时无法生成.out文件,求各位大大解决

Other Parts Discussed in Thread: TM4C123GH6PM

debug后出现这个

我个人觉得可能是中断出现问题,但不知道该如何解决。代码如下:

#include <stdint.h>
#include <stdbool.h>
#include "inc/tm4c123gh6pm.h"
//#include "inc/hw_ints.h"
#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "driverlib/debug.h"
#include "driverlib/fpu.h"
#include "driverlib/gpio.h"
#include "driverlib/interrupt.h"
#include "driverlib/sysctl.h"
#include "driverlib/comp.h"
#include "driverlib/timer.h"
int main(void)

{

//使能FPU
FPUEnable();
FPULazyStackingEnable();
//设置系统时钟为50MHz (400/2/4=50)
SysCtlClockSet(SYSCTL_SYSDIV_4|SYSCTL_USE_OSC |SYSCTL_OSC_MAIN|SYSCTL_XTAL_16MHZ);
//使能需要的外设
SysCtlPeripheralEnable(SYSCTL_PERIPH_COMP0);
SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER0);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOC);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);
GPIOPinTypeComparator(GPIO_PORTC_BASE, GPIO_PIN_4 | GPIO_PIN_5|GPIO_PIN_6 | GPIO_PIN_7);
GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3);

//配置比较器
ComparatorConfigure(COMP_BASE,0,COMP_TRIG_NONE|COMP_ASRCP_REF);
ComparatorConfigure(COMP_BASE,1,COMP_TRIG_NONE|COMP_ASRCP_REF);
//配置比较器参考电压为2.0625V
ComparatorRefSet(COMP_BASE,COMP_REF_2_0625V);
//中断使能
ComparatorIntEnable(COMP_BASE,0);
ComparatorIntEnable(COMP_BASE,1);
TimerConfigure(TIMER0_BASE,TIMER_CFG_PERIODIC);

TimerLoadSet(TIMER0_BASE, TIMER_A, 1);

IntEnable(INT_TIMER0A);

TimerIntEnable(TIMER0_BASE,TIMER_TIMA_TIMEOUT);

IntMasterEnable();

TimerEnable(TIMER0_BASE, TIMER_A);
while(1){}

}

void Timer0IntHandler(void)

{

//TimerIntClear(TIMER0_BASE, TIMER_TIMA_TIMEOUT);
//清除标志位
}

本来是两个程序,一个是两路比较器,一个是定时器,两程序各自都能用。但我现在把它们合起来就出现这个问题。。IntEnable(INT_TIMER0A);这句话报错,搞了半天摸不着头脑,后来将头文件中#include "inc/hw_ints.h"删除之后,就不报错了,结果编译时就出现了上述问题。。

x 出现错误。请重试或与管理员联系。