Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] Adding non-primary outputs to resource tree


I am integrating a linker that can emit a map file alongside the primary output (an ELF binary). I would like the file to appear in the workspace and assumed that representing it using an outputType would accomplish that.


Am I correct to think that additional outputs should appear as resources when the build completes or do I need to implement something else?


[[ejs]] Any outputs that go into the project's directory tree should show up in their appropriate locations as a result of the "refresh resources" task that follows a build. 


But I suspect either your binaries are built outside a project, or too deep inside it, and you want the *.map file to show up in the top level Binaries folder next to your ELF binary.  Is that it?  The "binary parser" facility is used to promote content there (see Project > Properties> C/C++ Build > Settings > Binary Parsers).  The project view doesn't use the "outputType" attribute, AFAIK.


It is a nasty hack, and 50% a joking suggestion, but you could implement a "binary" parser that detects map files and register that with your toolchain.  See the 'org.eclipse.cdt.core.BinaryParser' extension point and the corresponding MBS stuff which I don't know.  (This may have unintended consequences, though, such as suddenly being able to launch map files with the debugger... I'm not sure on this point ;)


Other than that, I think the Common Project Navigator (e.g. "Project Explorer" view) provides extensions that let you add content, like virtual folders, to a project as well.  You may look into that option as well, but that's an Eclipse platform feature and not a CDT one.


-- Ed


Back to the top