Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » DSDP - Real-Time Software Components (RTSC) » .o prefix in object files extention(adding adi blackfin as new target)
.o prefix in object files extention [message #1217340] Thu, 28 November 2013 22:03 Go to next message
Serg Vdov is currently offline Serg VdovFriend
Messages: 2
Registered: November 2013
Junior Member
Hello,
I'm fairly new to xdc and trying to create a new target based on xdc.bld.ITarget2 for the adi blackfin compiler (ccblkfn.exe) and get stuck with situation when a resulting module makefile, based on the new target, has an ".o" prefix in the object file extension, which causes a compile error, since ccblkfn requires a .doj extension.
I also look at the xdc.bld _gen.xs file and see the .o is hardcoded when makefile is created...
Is there a way to get rid of the ".o"?
Thanks in advance,
Serg
Re: .o prefix in object files extention [message #1219259 is a reply to message #1217340] Tue, 03 December 2013 00:10 Go to previous messageGo to next message
Sasha Slijepcevic is currently offline Sasha SlijepcevicFriend
Messages: 115
Registered: July 2009
Senior Member
Serg,
unfortunately there is no an easy way to allow custom object file extensions. We would have to fix _gen.xs and probably some other files to allow that.
There could be a roundabout way to deal with the problem, which would require the target to keep renaming files at certain points of a build. Each target can have target filters (http://rtsc.eclipse.org/cdoc-tip/xdc/bld/ITargetFilter.html) that can be used for such purposes.
I can see that the blackfin compiler has the option -o. What can you do with it, change only the base name of the output file? Would the linker accept the object file with an extension different from '.doj'?
Re: .o prefix in object files extention [message #1219380 is a reply to message #1219259] Tue, 03 December 2013 15:14 Go to previous messageGo to next message
Serg Vdov is currently offline Serg VdovFriend
Messages: 2
Registered: November 2013
Junior Member
ccblkfn is pretty strict about the file extensions...
I researched the ITargetFilter and could not find its sample code... Could you point to a snippet - its a bit hard to figure out without much of JS experience.
Also, may be I misunderstood _gen.xs, but it does not seem like ITargetFilter can help with removing the ".o", does it?
Thanks again,
Serg
Re: .o prefix in object files extention [message #1219813 is a reply to message #1219380] Thu, 05 December 2013 22:45 Go to previous messageGo to next message
Sasha Slijepcevic is currently offline Sasha SlijepcevicFriend
Messages: 115
Registered: July 2009
Senior Member
ITargetFilters can intercept each generated compile command line, and add another command to it. So, every time the compiler generates a file <name>.doj, a new command is attached that renames that file to <name>.obf, for example. That would work as long as the archiver and the linker accept files with a custom extension. If that's not the case, you would have to keep renaming files before and after invoking these tools.
I am not sure if it's worth the effort, but at this time I don't see a better solution. There are no any plans to rewrite the whole build object model (which includes _gen.xs) to support object files without ".o<suffix>" extension.

For an example of how to create and use an ITargetFilter, look at my post on Feb 19 2013, 16:08, in this thread http://e2e.ti.com/support/embedded/bios/f/355/p/244102/863109.aspx#863109.
Re: .o prefix in object files extention [message #1219934 is a reply to message #1219813] Fri, 06 December 2013 21:29 Go to previous messageGo to next message
Dave Russo is currently offline Dave RussoFriend
Messages: 172
Registered: July 2009
Senior Member
On 12/5/2013 2:45 PM, Sasha Slijepcevic wrote:
> I am not sure if it's worth the effort, but at this time I don't see a better solution.
> :
> For an example of how to create and use an ITargetFilter, look at my
> post on Feb 19 2013, 16:08, in this thread
> http://e2e.ti.com/support/embedded/bios/f/355/p/244102/863109.aspx#863109.
>
I wonder if your earlier suggestion of using the -o option isn't the
best answer. When we used the ADI 21060 compiler, for example, we used
-o to create objects with a suffix of .o60 which worked with the
archiver and linker without a problem.
Re: .o prefix in object files extention [message #1219946 is a reply to message #1219934] Sat, 07 December 2013 05:44 Go to previous message
Sasha Slijepcevic is currently offline Sasha SlijepcevicFriend
Messages: 115
Registered: July 2009
Senior Member
I haven't tried using the compiler, but from this document: http://www.analog.com/static/imported-files/software_manuals/50_bf_cc_rtl_mn_rev_5.4.pdf I understood that the -o option only allows changing the base name of the output file, but not the extension.
The relevant part starts on page 1-8, under the title "Compiler Command-Line Interface".

If -o allows a custom extension, then there is no need for a more complicated solution that uses ITargetFilters.
Previous Topic:requires keyword in package.xdc
Next Topic:RTSC lesson 1 test launch loader error
Goto Forum:
  


Current Time: Thu Mar 28 08:30:32 GMT 2024

Powered by FUDForum. Page generated in 0.02936 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top