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.
Hi martin,
Check your include search paths. Also check your build variables. It could be that the project properties is using a build variable that is not correctly set for your environment.
The below wiki article has some more information on include paths:
http://processors.wiki.ti.com/index.php/Include_paths_and_options
Thanks
ki
Martin Haupt said:he expectation was that importing a Starterware example using TI Resource Explorer would allow me to compile and link the project without errors
This is my expectation too.
Martin Haupt said:Does that work for you?
Actually.... no. At least not for the Debug configuration (which happens to be the default configuration). The problem is that the project relies on several libraries (drivers.lib, system.lib, platform.lib, utils.lib) and only the Release versions of the libraries come pre-built. So if you try to build the Debug configuration of gpioLEDBlink, it will try to use the Debug versions of those libraries and the link will fail. When i switch to the Release configuration, everything builds fine.
Now I think you are running into some other errors beyond what I found, but could you first try building the Release configuration and see if that reduces some of your errors?
Thanks
ki
Hi Ki,.
thanks for replying.
Compilation of gpioLEDBLink in release mode failed due to incorrect pathes.
I corrected the pathes at Properties->ARM Compiler -> Include Options. That reduced the error messages to "No rule to make target".
At Properties->Resource->Linked Resources I found that the missing resource gpioLEDBlink.c had the path
PROJECT_LOC\..\..\..\..\..\..\examples\beaglebone\gpio\gpioLEDBlink.c.
But PROJECT_LOC is in workspace(C:\Pr\TI\Workspace\gpioLEDBink) and the relative path for gpioLEDBlink.c cannot be correct.
I chaged it to C:\Pr\TI\AM335X_StarterWare_02_00_01_01\examples\beaglebone\gpio\gpioLEDBlink.c and ignored the warning that it is an absolute path.
Besides that path EXTERNAL_BUILD_ARTIFACT (the location for gpioLEDBlink.out) is empty.
So I modified it to
"${PROJECT_LOC}\${ProjName}\${ConfigName}"
(The workspace folder already has a folder named "Release")
Furthermore the pathes to the libraries caused error messages:
- error #10008-D: cannot find file
"../../../../../../../binary/armv7a/cgt_ccs/am335x/drivers/Release/drivers.lib"
- error #10008-D: cannot find file
"../../../../../../../binary/armv7a/cgt_ccs/am335x/system_config/Release/system.lib"
- error #10008-D: cannot find file
"../../../../../../../binary/armv7a/cgt_ccs/am335x/beaglebone/platform/Release/platform.lib"
- error #10008-D: cannot find file
"../../../../../../../binary/armv7a/cgt_ccs/utils/Release/utils.lib"
- error #10198-D: no input section is linked in
I changed them and used absolute pathes.
At Properties->Build->ARM Linker->Basic Options I changed the output filename from
"../../../../../../../binary/armv7a/cgt_ccs/am335x/beaglebone/gpio/${ConfigName}/${ProjName}.out"
to an absolute path to.
This is the build result:
**** Build of configuration Release for project gpioLEDBlink ****
"C:\\Pr\\TI\\CCS\\ccsv5\\utils\\bin\\gmake" -k -j 4 -s all
'Building file: C:/Pr/TI/AM335X_StarterWare_02_00_01_01/examples/beaglebone/gpio/gpioLEDBlink.c'
'Invoking: ARM Compiler'
'Finished building: C:/Pr/TI/AM335X_StarterWare_02_00_01_01/examples/beaglebone/gpio/gpioLEDBlink.c'
' '
'Building target: C:\Pr\TI\AM335X_StarterWare_02_00_01_01/binary/armv7a/cgt_ccs/am335x/beaglebone/gpio/Release/gpioLEDBlink.out'
'Invoking: ARM Linker'
<Linking>
'Finished building target: C:\Pr\TI
\AM335X_StarterWare_02_00_01_01/binary/armv7a/cgt_ccs/am335x/beaglebone/gpio/Release/gpioLEDBlink.out'
' '
error: failed to read
"../../../../../../../binary/armv7a/cgt_ccs/am335x/beaglebone/gpio/Release/gpioLEDBlink.out"
Use of uninitialized value in pattern match (m//) at XML_TI_OFD.pm line 2138.
Use of uninitialized value in hash element at XML_TI_OFD.pm line 1317.
Unexpected target: unknown at script/mkhex4bin.pl line 261.
fatal error: cannot open input file
"../../../../../../../binary/armv7a/cgt_ccs/am335x/beaglebone/gpio/Release/gpioLEDBlink.out": No such file or directory
The system cannot find the path specified.
' '
**** Build Finished ****
Also there is a warning that compiler 5.1.2 is used instead of 5.0.4, which I ignored.
At this point I will stop, because so many changes have been made that cannot be intentional.
My guess is that something is wrong with the relative pathes.
Is there a special place where Starterware should be located? Perhaps directly within the workspace folder?
Can you see anything that is obviously wrong with the procedure described above?
By the way, my board is a BeagleBone_Black vs. A6 and CCSv.5.5 is running under Windows7.
Thanks for your trouble!
Regards,
Martin
Looking at the project more closely, I see that it doesn't really rely on any special linked or path variables. The project (at least for release) should just work.
When importing the projecting into your workspace, did you make sure the "Copy projects into workspace" option was UNCHECKED? Basically you want to work with the project in its original location inside the StarterWare directory
Hi Ki,
I did it from TI Resource Explorer, then selected gpioLEDBlink from AM335X_StarterWare_02_00_01_01->build->armv7a->cgt_css->arm335x->beaglebone and clicked at Step1 "Import the example project into CCS".
There is no "Copy projects into workspace" option.
Regards,
Martin
Martin Haupt said:It now compiles in Release mode.
Great!
Martin Haupt said:So the problem is caused by TI Resource Explorer?
I need to see how the import is being handled via the Resouce Explorer. I suspect something strange is happening.
Martin Haupt said:The next step would be to prepare the project for debugging. What would I have to do to get the correct lib files
You have two options.
1) The first is you can modify the project so that the Debug configuration for the project uses the Release libraries.
2) You need to separately build the debug versions of the those libraries by opening the project for the libraries and build the debug configuration for those
I'd personally do the latter so that I can then debug the library code if I need to.
You'll need to find the library projects inside the startware directory. See page 5-8 of the user's guide (found in .\AM335X_StarterWare_02_00_01_01\docs)
thanks
ki
Ki-Soo Lee said:I need to see how the import is being handled via the Resouce Explorer. I suspect something strange is happening.
As i suspected, importing that way will copy the project folder into the workspace. Since starterware projects are designed to reside within the starterware directory structure, this will break the project when you copy it over.
Martin - one question for you... the starterware package does not appear in Resource Explorer by default for me. I had to manually add it. Did it automatically appear in the resource explorer for you?
Good to hear it is all working now.
In summary, there are two issue:
1) Importing StarterWare examples via Resource Explorer tutorial method copies the project folder to the workspace, which will break the build
2) StarterWare examples ship without Debug libraries prebuilt
I'll provide this feedback to the respective teams who support the above.
Thanks
ki
Hi Ki,
it seems that our mails have crossed.
StarterWare now appears in TI Resource Explorer. It should be mentioned that I reinstalled the Starterware package.
But I am not sure if it had appeared in Resource Explorer before.
Regards,
Martin
I don't believe Starterware should appear in the Resource Explorer by default. It doesn't for me and I am using the same version of Starterware. I had to explicitly add it.
In any case, Starterware should not be used with the Resource Explorer project tutorial interface.
Hi Ki,
sorry, I am afraid the euphoria was a bit a hasty one.
Let me still add some remarks. They apply to Debug and Release mode as well.
1. Build
I added the pathes
"${SW_WURZEL}\binary\armv7a\cgt_ccs\am335x\beaglebone\platform\${ConfigName}\platform.lib"
"${SW_WURZEL}\binary\armv7a\cgt_ccs\am335x\drivers\${ConfigName}\drivers.lib"
"${SW_WURZEL}\binary\armv7a\cgt_ccs\am335x\system_config\${ConfigName}\system.lib"
to Properties->Build->File Search Path->Include library file ..."
Build failed because §{ConfigName} obviously was not detected.
The message was something like
<Linking>
error #10008-D: cannot find file
"C:\Pr\TI\AM335X_StarterWare_02_00_01_01\binary\armv7a\cgt_ccs\am335x\beaglebone\platform\platform.lib"
But ConfigName is defined ( Properties->Build->Variables ).
Replacing ${ConfigName} by Release or Debug leads to a build without errors.
Putting
"${SW_WURZEL}\binary\armv7a\cgt_ccs\am335x\beaglebone\platform\Release\platform.lib"
"${SW_WURZEL}\binary\armv7a\cgt_ccs\am335x\drivers\Release\drivers.lib"
"${SW_WURZEL}\binary\armv7a\cgt_ccs\am335x\system_config\Release\system.lib"
to
'Properties->Build->Arm Linker->File Search Path->Add <dir> to library search path'
instead did not lead to a proper build. Is that correct?
2. Debugging
.. is ok. as long as one doesnt intent to step into a library function. Now, that is normal behaviour with other compilers that I know. Is that different with CCS?
When trying to step into a library function I get a message like
"Can't find a source file at "K:/platform/beaglebone/gpio.c"
Locate the file or edit the source lookup path to include its location."
That implies that I only would have to add a search path without manually adding the source file to the project.
Providing this is correct, where would I have to do that in Project->Properties->...?
3. warning #2019-D
'warning #2019-D: "\" followed by white space is not a line'
was caused by several include files like
hw_control_AM335x.h
hw_cm_per.h
hw_cm_wkup.h
and others. I am aware that this is not a real problem, but perhaps in can be avoided in the next release of Starterware.
However, replacing all ***\ by ***/ solved it for me.
Thank you.
Martin