Tool/software: Code Composer Studio
dear.. im getting the following error while compiling..i have follow all ur forums to solve it but couldnt..so plz solve this
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.
i am getting same error again n again..today i have given 9 hours still couldnt solve..i tried each n every combinations..taken a ready made examples still the same error..hereby i am attaching my code..plz look into it. actually my code include adc,timer routies...then i am going to add fft in it...
my project includes mainly three files..
/*************************main.c************************************************/
/**
* main.c
* date:19/1/18
*/
#include <csl_sar.h>
#include <csl_intc.h>
#include <csl_general.h>
#include <stdio.h>
#include "csl_gpt.h"
#include <stdio.h>
#include "csl_uart.h"
#include "csl_uartAux.h"
#include "csl_sysctrl.h"
#include "sar.h"
extern void VECSTART(void);
// ISR to timer
void Timer0Init(void);
interrupt void gpt0Isr(void)
{
unsigned char TIAFR_VAL=0;
Uint16 adc_out;
TIAFR_VAL = CSL_SYSCTRL_REGS->TIAFR;
IRQ_clear(TINT_EVENT);
if((TIAFR_VAL&0x02) == 0x01)
{
adc_out=Read_GPAIN1();
}
IRQ_clear(TINT_EVENT);
/* Clear Timer Interrupt Aggregation Flag Register (TIAFR) */
CSL_SYSCTRL_REGS->TIAFR = 0x01;
}
/*interrupt void gpt0Isr(void)
{
adc_out=Read_GPAIN1();
IRQ_clear(TINT_EVENT);
Clear Timer Interrupt Aggregation Flag Register (TIAFR)
CSL_SYSCTRL_REGS->TIAFR = 0x01;
}*/
void main(void)
{
Init_SAR();
Timer0Init();
while(1);
}
void Timer0Init(void)
{
CSL_Status status;
CSL_Config hwConfig;
CSL_GptObj gptObj1;
CSL_Handle hGpt1;
/* Open the CSL GPT module */
hGpt1 = GPT_open (GPT_1, &gptObj1, &status);
/* Reset the GPT module */
status = GPT_reset(hGpt1);
printf("Testing INTC using SAR module\n");
//Disable interrupt
IRQ_globalDisable();
IRQ_clearAll();
/* Disable all the interrupts */
IRQ_disableAll();
/* Initialize Interrupt Vector table */
IRQ_setVecs((Uint32)(&VECSTART));
IRQ_plug(TINT_EVENT,&gpt0Isr);
IRQ_enable(TINT_EVENT);
/* Timer interval 0.5sec (2Hz)*/
hwConfig.autoLoad = GPT_AUTO_ENABLE;
hwConfig.ctrlTim = GPT_TIMER_ENABLE;
hwConfig.preScaleDiv = GPT_PRE_SC_DIV_11; // Pre scale Divide input clock by 4096
// 98.304M/4096 = 24K
hwConfig.prdLow = 0x5DC0; //0x2EE0;// 0x5DC0;
hwConfig.prdHigh = 0x0000;
//TIM1FLAG=1;
/* Configure Timer0 */
//hGpt = GPT_open (GPT_2, &gptObj, &status);
status = GPT_config(hGpt1, &hwConfig);
IRQ_globalEnable();
/* Start timer */
GPT_start(hGpt1);
}
/***************************sar.c*********************************************/
#include <csl_sar.h>
#include <csl_intc.h>
#include <csl_general.h>
#include <stdio.h>
#include "csl_gpt.h"
#include <stdio.h>
#include "csl_uart.h"
#include "csl_uartAux.h"
#include "csl_sysctrl.h"
#include "sar.h"
/* ------------------------------------------------------------------------ *
* *
* Init_SAR(void) *
* Initialize SAR ADC *
* *
* ------------------------------------------------------------------------ */
void Init_SAR(void)
{
*SARCTRL = 0x3C00; // Select AIN3, which is GPAIN1
*SARCLKCTRL = 0x0031; // 100/50 = 2MHz
*SARPINCTRL = 0x7104;
*SARGPOCTRL = 0;
return;
}
/* ------------------------------------------------------------------------ *
* *
* Read_GPAIN1(void) *
* value returned by SAR ADC *
* *
* ------------------------------------------------------------------------ */
Uint16 Read_GPAIN1(void)
{
Uint16 val, i;
for(i=0;i<100; i++)
asm(" nop");
*SARCTRL = 0xB400;
while(1)
{
for(i=0;i<50; i++)
asm(" nop");
val = *SARDATA;
if((val&0x8000) == 0)
break;
}
return val;
}
/***********************sar.h**************************/
#ifndef SAR_H_
#define SAR_H_
#include <csl_sar.h>
#include <csl_intc.h>
#include <csl_general.h>
#include <stdio.h>
#include "csl_gpt.h"
#include <stdio.h>
#include "csl_uart.h"
#include "csl_uartAux.h"
#include "csl_sysctrl.h"
/*
* Copyright 2010 by Spectrum Digital Incorporated.
* All rights reserved. Property of Spectrum Digital Incorporated.
*/
/*
* SAR header file
*
*/
/* ------------------------------------------------------------------------ *
* Register Definitions *
* ------------------------------------------------------------------------ */
#define SARCTRL ((ioport volatile unsigned*)0x7012)
#define SARDATA ((ioport volatile unsigned*)0x7014)
#define SARCLKCTRL ((ioport volatile unsigned*)0x7016)
#define SARPINCTRL ((ioport volatile unsigned*)0x7018)
#define SARGPOCTRL ((ioport volatile unsigned*)0x701A)
#define SW1 0x2A8 // Switch 1 value
#define SW2 0x1FC // Switch 2 value
#define SW12 0x195 // Switch 1 + 2 value
#define NoKey 0x3FE
/* ------------------------------------------------------------------------ *
* Prototypes *
* ------------------------------------------------------------------------ */
void Init_SAR(void);
Uint16 Read_GPAIN1(void);
#endif /* SAR_H_ */
hello..thanks for the reply..
i guess the problem is with .asm and .c file..
my code consists of timer_interrupt,adc and HWAFFT .. and hwafft code requires run time model option as mnemonic but the other files required algebraic..
when i remove the hwafft code project run successfully with algebraic but i put it again with the same option as algebraic i get the following errors
Building target: "CSL_SAR_IntcExample.out"'
'Invoking: C5500 Linker'
"C:/ti/TI/ccsv7/tools/compiler/c5500_4.4.1/bin/cl55" -v5505 --memory_model=large -g --define="_DEBUG" --define=c5505 --diag_warning=225 --ptrdiff_size=16 --algebraic --asm_source=algebraic -z -m"CSL_SAR_IntcExample.map" --stack_size=0x200 --heap_size=0x400 -i"C:/ti/TI/ccsv7/tools/compiler/c5500_4.4.1/lib" -i"C:/ti/TI/ccsv7/tools/compiler/c5500_4.4.1/include" -i"C:/ti/bios_5_42_02_10/packages/ti/rtdx/lib/c5500" -i"C:/ti/bios_5_42_02_10/packages/ti/bios/lib" -i"C:/ti/TI/c55_lp/c55_csl_3.08/ccs_v6.x_examples/C55XXCSL_LP" -i"C:/workspace/ADC_timer_uart" --reread_libs --warn_sections --xml_link_info="CSL_SAR_IntcExample_linkInfo.xml" --rom_model --sys_stacksize=0x200 -o "CSL_SAR_IntcExample.out" "../VC5505.cmd" "./csl_sar_IntcExample.obj" -l"Debug/C55XXCSL_LP.lib" -lrts55x.lib -llibc.a
<Linking>
warning: creating output section "data_br_buf" without a SECTIONS
specification
warning: creating output section "scratch_buf" without a SECTIONS
specification
undefined first referenced
symbol in file
--------- ----------------
_hwafft_8pts ./csl_sar_IntcExample.obj
_hwafft_br ./csl_sar_IntcExample.obj
error: unresolved symbols remain
error: errors encountered during linking; "CSL_SAR_IntcExample.out" not built
>> Compilation failure
makefile:145: recipe for target 'CSL_SAR_IntcExample.out' failed
gmake: *** [CSL_SAR_IntcExample.out] Error 1
gmake: Target 'all' not remade because of errors.
**** Build Finished****
and when i set it as mnemonic i get follwing errors
Building file: "../csl_sar_IntcExample.c"'
'Invoking: C5500 Compiler'
"C:/ti/TI/ccsv7/tools/compiler/c5500_4.4.1/bin/cl55" -v5505 --memory_model=large -g --include_path="C:/ti/TI/ccsv7/tools/compiler/c5500_4.4.1/include" --include_path="C:/ti/TI/c55_lp/c55_csl_3.08/inc" --include_path="C:/ti/bios_5_42_02_10/packages/ti/bios/include" --include_path="C:/ti/bios_5_42_02_10/packages/ti/rtdx/include/c5500" --include_path="C:/ti/c55_lp/c55_csl_3.08/inc" --include_path="C:/workspace/ADC_timer_uart/Debug" --define="_DEBUG" --define=c5505 --diag_warning=225 --ptrdiff_size=16 --algebraic --asm_source=mnemonic --preproc_with_compile --preproc_dependency="csl_sar_IntcExample.d_raw" "../csl_sar_IntcExample.c"
>> Compilation failure
subdir_rules.mk:9: recipe for target 'csl_sar_IntcExample.obj' failed
"..\data_types.h", line 11: warning: typedef name has already been declared (with same type)
"..\data_types.h", line 12: warning: typedef name has already been declared (with same type)
"..\data_types.h", line 14: warning: typedef name has already been declared (with same type)
"..\data_types.h", line 15: warning: typedef name has already been declared (with same type)
ERROR: -v is not used by this program
ERROR! : unrecognized option [-v5505] (ignored)
ERROR! : Cannot open source file 67: No such file or directory
gmake: *** [csl_sar_IntcExample.obj] Error 1
gmake: Target 'all' not remade because of errors.
**** Build Finished ****
but i have to build the complete project..
any solution???