编译没有语法问题可就是无法生成out文件,我中断向量表也改了,但是就是没法生成out文件
#include <stdint.h>
#include <stdbool.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/pin_map.h"
#include "driverlib/rom.h"
#include "driverlib/sysctl.h"
#include "driverlib/timer.h"
#include "driverlib/uart.h"
#include "utils/uartstdio.h"
#include "driverlib/adc.h"
#include "driverlib/pwm.h"
extern unsigned int i,flag;
i = 0;
flag = 0;
int main()
{
SysCtlClockSet(SYSCTL_SYSDIV_2_5|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);
SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER0);
SysCtlPWMClockSet(SYSCTL_PWMDIV_1);
GPIOPinTypePWM(GPIO_PORTB_BASE,GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7);
GPIOPinConfigure(GPIO_PB6_M0PWM0);
GPIOPinConfigure(GPIO_PB6_M0PWM1);
GPIOPinConfigure(GPIO_PB6_M0PWM2);
GPIOPinConfigure(GPIO_PB6_M0PWM3);
TimerConfigure(TIMER0_BASE, TIMER_CFG_PERIODIC);
TimerLoadSet(TIMER0_BASE, TIMER_A, 1999999);
PWMGenConfigure(PWM0_BASE,PWM_GEN_0,PWM_GEN_MODE_UP_DOWN| PWM_GEN_MODE_NO_SYNC);
PWMGenPeriodSet(PWM0_BASE, PWM_GEN_0, 800);
PWMGenConfigure(PWM0_BASE,PWM_GEN_1,PWM_GEN_MODE_UP_DOWN| PWM_GEN_MODE_NO_SYNC);
PWMGenPeriodSet(PWM0_BASE, PWM_GEN_1, 800);
PWMOutputState(PWM0_BASE, (PWM_OUT_0_BIT |PWM_OUT_1_BIT|PWM_OUT_2_BIT|PWM_OUT_3_BIT), true);
IntEnable(INT_TIMER0A);
TimerIntEnable(TIMER0_BASE, TIMER_TIMA_TIMEOUT);
IntMasterEnable();
TimerEnable(TIMER0_BASE, TIMER_A);
PWMGenEnable(PWM0_BASE, PWM_GEN_0);
PWMGenEnable(PWM0_BASE, PWM_GEN_1);
while(1);
}
void TIMERPWM()
{
SysCtlIntClear(TIMER0_BASE, TIMER_TIMA_TIMEOUT);
if(flag == 0)
if(i!=799)
i++;
else
flag = 1;
else
if(i != 0)
i–;
else
flag = 0;
PWMPulseWidthSet(PWM0_BASE, PWM_OUT_0, i);
PWMPulseWidthSet(PWM0_BASE, PWM_OUT_1, i);
PWMPulseWidthSet(PWM0_BASE, PWM_OUT_2, i);
PWMPulseWidthSet(PWM0_BASE, PWM_OUT_3, i);
}
user3917511:
CCS3.3编译时提示无法创建.out文件,是怎么回事?
(1)CCS3.3编译时提示无法创建.out文件出现错误如下:error: symbol referen…
答:库路径的问题!在build option -linker在CCS2.2下的路径是 c:\ti\c6000\bios\lib\;c:\ti\c6000\cgtools\lib而在CCS3.3下的路径是 C:\CCStudio_v3.3\C6000\cgtools\lib;C:\CCStudio_v3.3\C6000\csl\lib更改后,编译正确了!!
(2)>> error: symbol referencing errors – './Debug/uart.out' not built …
答:在CCS左边栏labraries中添加文件rts_2800.ml.lib,该文件位于\ccs3.3\C2000\cgtools\lib文件夹下。添加之后即可顺利创建.OUT文件了
(3)error: symbol referencing errors – './Debug/renwu.out' not built 什…
答:少文件,加入头文件和库引用看看
(4)语法什么都没有错,编译没有语法问题可就是无法生成out文件
答:请检查CCS项目设置中的build option选项卡中Output Filename (-o)设置
(5):提示错误:symbol referencing errors-'./Debug/GpioLed.out' not build…
答:查看GpioLed.c和其中添加的头文件里有没有不规范的C语句,比如void ;或者int ;还有有没有添加过中文的分号和逗号;,