
There are 8 messages in this thread.
You are currently looking at messages 0 to 8.
Hello, Typed in and saved the following code in CCS but can't do Project->Build. It says File is not found in any project. Or Project->Build Options because it is greyed out. Is there a problem with the following code? ----------------------------- #include "csl.h" #include "bsl.h" CSL_init() BSL_init() if DIP_get(DIP_1) == 1 LED_on(LED_1); else LED_off(LED_1); end -----------------------------______________________________
Hello Peter, do you have defined a project and in this project made "Add files" to add your program in this project? "Peter Choi" <c...@mecca.ca> wrote in message news:<8xOEc.955622$oR5.347750@pd7tw3no>... > Hello, > > Typed in and saved the following code in CCS but can't do Project->Build. > It says File is not found in any project. Or Project->Build Options because > it is greyed out. Is there a problem with the following code? > ----------------------------- > #include "csl.h" > #include "bsl.h" > > CSL_init() > BSL_init() > > > if DIP_get(DIP_1) == 1 > LED_on(LED_1); > else > LED_off(LED_1); > end > -----------------------------______________________________
On Thu, 01 Jul 2004 06:52:52 GMT, "Peter Choi" <c...@mecca.ca> wrote in comp.dsp: > Hello, > > Typed in and saved the following code in CCS but can't do Project->Build. > It says File is not found in any project. Or Project->Build Options because > it is greyed out. Is there a problem with the following code? > ----------------------------- > #include "csl.h" > #include "bsl.h" > > CSL_init() > BSL_init() > > > if DIP_get(DIP_1) == 1 > LED_on(LED_1); > else > LED_off(LED_1); > end > ----------------------------- > In addition to what phuture_project said, I hope this is not actually the file you want to build. Code Composer Studio compiles C and C++ code, but this is not either. Neither C nor C++ had a keyword 'end', all code must be inside of a function, not at the top level in a file, and programs need a function named main() where execution starts. Perhaps try this, which is actually C or C++ (at least embedded C or C++, void main() is not legal in either standard language: #include "csl.h" #include "bsl.h" void main() { CSL_init() BSL_init() if (DIP_get(DIP_1) == 1) LED_on(LED_1); else LED_off(LED_1); } -- Jack Klein Home: http://JK-Technology.Com FAQs for comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html comp.lang.c++ http://www.parashift.com/c++-faq-lite/ alt.comp.lang.learn.c-c++ http://www.contrib.andrew.cmu.edu/~ajo/docs/FAQ-acllc.html______________________________
Hello,
Okay I have created a project and added the C file with the following code
to the project. Following was the response I got for the action I did:
1) Hit the Compile button
Error, Don't know how to build file "D:\ti\myprojects\first1\first.c"
Compile Complete,
1 Errors, 0 Warnings, 0 Remarks.
2) Hit the Incremental Build button
----------------------------- first1.pjt -
ebug -----------------------------
"d:\ti\c6000\cgtools\bin\cl6x" -g -q -fr"D:/ti/myprojects/first1/Debug" -i"D
:/ti/myprojects/first" -d"CHIP_6711" -mv6710 -@"../first1/Debug.lkf"
"first.c"
[first.c]
"first.c", line 2: fatal error: could not open source file "bsl.h"
1 fatal error detected in the compilation of "first.c".
Compilation terminated.
Build Complete,
1 Errors, 0 Warnings, 0 Remarks.
#include csl.h
#include bsl.h
CSL_init()
BSL_init()
void main()
{
if (DIP_get(DIP_1) == 1)
LED_on(LED_1);
else
LED_off(LED_1);
}
______________________________Hi Peter, > Okay I have created a project and added the C file with the following code > to the project. Following was the response I got for the action I did: > 1) Hit the Compile button > Error, Don't know how to build file "D:\ti\myprojects\first1\first.c" > Compile Complete, > 1 Errors, 0 Warnings, 0 Remarks. I can't help you for this part. I never met this message. Maybe files are missing. You need to have .lib files (such as rts.lib) and a .cmd file in your project too. > 2) Hit the Incremental Build button > ----------------------------- first1.pjt - > ebug ----------------------------- > "d:\ti\c6000\cgtools\bin\cl6x" -g -q -fr"D:/ti/myprojects/first1/Debug" -i"D > :/ti/myprojects/first" -d"CHIP_6711" -mv6710 -@"../first1/Debug.lkf" > "first.c" > [first.c] > "first.c", line 2: fatal error: could not open source file "bsl.h" > 1 fatal error detected in the compilation of "first.c". > Compilation terminated. > > Build Complete, > 1 Errors, 0 Warnings, 0 Remarks. For this part, i think i can help you. In order for CCS to open the .h files you need to indicate where they are, that is to say in which directory. To do so, follow these steps: -> Project (menu) -> Build options -> Compiler -> Preprocessor -> in "include search path" you paste the "way" (i don't find the word in english) of your directory in which there are your project and the .h files. For instance : C:\ti\myprojects\Timer_IT . Now if you try again to compile, it should find the .h files. > #include csl.h > #include bsl.h I may be wrong, but wouldn't it be better if you wrote #include <csl.h> ? Don't you get errors by no employing <> ? I hope it helps.______________________________
Hello,
Well, I see on the Project list window that under the Include folder both
the bsl.h and csl.h file were included automatically. But I still get the
following csl.h not found error when I hit Scan All Dependencies on my C
file. Also, my Include Search Path has D:\ti\myprojects\first. Not sure
how I can include an additional directory for the header files as you
instructed.
first.c ( D:\ti\myprojects\first\first.c )
Line 0001: csl.h ( d:\ti\c6000\bios\include\csl.h )
Line 0021: csl_chip.h ( d:\ti\c6000\bios\include\csl_chip.h )
Line 0021: csl_stdinc.h (
d:\ti\c6000\bios\include\csl_stdinc.h )
Line 0020: csl_stdinchal.h (
d:\ti\c6000\bios\include\csl_stdinchal.h )
Line 0023: csl_chiphal.h (
d:\ti\c6000\bios\include\csl_chiphal.h )
Line 0052: csl_stdinc.h ( etc... )
Line 0024: csl_emifhal.h (
d:\ti\c6000\bios\include\csl_emifhal.h )
Line 0034: csl_stdinc.h ( etc... )
Line 0035: csl_chip.h ( WARNING, Infinite Loop of Nested
Include Files! )
Line 0022: csl_irq.h ( d:\ti\c6000\bios\include\csl_irq.h )
Line 0021: csl_stdinc.h ( etc... )
Line 0022: csl_chip.h ( etc... )
Line 0023: csl_irqhal.h (
d:\ti\c6000\bios\include\csl_irqhal.h )
Line 0027: csl_stdinchal.h (
d:\ti\c6000\bios\include\csl_stdinchal.h )
Line 0028: csl_chip.h ( etc... )
Line 0023: csl_timer.h ( d:\ti\c6000\bios\include\csl_timer.h )
Line 0020: csl_chip.h ( etc... )
Line 0021: csl_irq.h ( etc... )
Line 0022: csl_timerhal.h (
d:\ti\c6000\bios\include\csl_timerhal.h )
Line 0035: csl_stdinc.h ( etc... )
Line 0036: csl_chip.h ( etc... )
Line 0002: bsl.h ( WARNING, File not found! )
______________________________Hello, Actually I have the "bsl.h" file missing.______________________________
Hi Peter, > Hello, > > Well, I see on the Project list window that under the Include folder both > the bsl.h and csl.h file were included automatically. But I still get the > following csl.h not found error when I hit Scan All Dependencies on my C > file. Also, my Include Search Path has D:\ti\myprojects\first. Not sure > how I can include an additional directory for the header files as you > instructed. > > first.c ( D:\ti\myprojects\first\first.c ) > Line 0001: csl.h ( d:\ti\c6000\bios\include\csl.h ) > Line 0021: csl_chip.h ( d:\ti\c6000\bios\include\csl_chip.h ) > Line 0021: csl_stdinc.h ( > d:\ti\c6000\bios\include\csl_stdinc.h ) > Line 0020: csl_stdinchal.h ( > d:\ti\c6000\bios\include\csl_stdinchal.h ) > Line 0023: csl_chiphal.h ( > d:\ti\c6000\bios\include\csl_chiphal.h ) > Line 0052: csl_stdinc.h ( etc... ) > Line 0024: csl_emifhal.h ( > d:\ti\c6000\bios\include\csl_emifhal.h ) > Line 0034: csl_stdinc.h ( etc... ) > Line 0035: csl_chip.h ( WARNING, Infinite Loop of Nested > Include Files! ) > Line 0022: csl_irq.h ( d:\ti\c6000\bios\include\csl_irq.h ) > Line 0021: csl_stdinc.h ( etc... ) > Line 0022: csl_chip.h ( etc... ) > Line 0023: csl_irqhal.h ( > d:\ti\c6000\bios\include\csl_irqhal.h ) > Line 0027: csl_stdinchal.h ( > d:\ti\c6000\bios\include\csl_stdinchal.h ) > Line 0028: csl_chip.h ( etc... ) > Line 0023: csl_timer.h ( d:\ti\c6000\bios\include\csl_timer.h ) > Line 0020: csl_chip.h ( etc... ) > Line 0021: csl_irq.h ( etc... ) > Line 0022: csl_timerhal.h ( > d:\ti\c6000\bios\include\csl_timerhal.h ) > Line 0035: csl_stdinc.h ( etc... ) > Line 0036: csl_chip.h ( etc... ) > Line 0002: bsl.h ( WARNING, File not found! ) Maybe i wans't clear enough. Just to see if you understood what i said : search for the .h you need in the Ti directory. Copy then paste them in your project directory. Now they are really included in your project. Making "scan all dependencies" isn't enough. You must have the .h files in your project directory. You don't need to create an additionnal directory. Paste the .h files where you stored your .c file. I hope that's the solution.______________________________