[cmake-developers] New Generator for Keil uVision

Marco listworks at gmail.com
Wed Nov 12 04:30:55 EST 2014


Hello

In our development environment, we have to support multiple platforms like
Make-based, Visual Studio, Eclipse CDT and Keil uVision. CMake seems
perfect to support this. But obviously there is no generator for uVision.
Here comes the fun part: I am going to implement a generator for it :-)

Looking at the code of cmake, I identified cmGlobalGenerator and
cmLocalGenerator as a base "hock" to start off. But actually I am looking
for higer-level starting-point. Could you help me to identify one based on
the information for uVision:

uVision:

- uVision does not use makefiles.

- Multiproject Workspace: Kind of like a VisualStudio-solution. It is a
xml-file basically just naming the projects contained in to workspace.

Here's how it looks like:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<ProjectWorkspace xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="project_mpw.xsd">

  <SchemaVersion>1.0</SchemaVersion>

  <Header>### uVision Project, (C) Keil Software</Header>

  <WorkspaceName>WorkSpace</WorkspaceName>

  <project>
    <PathAndName>.\Project1\Project1.uvproj</PathAndName>
  </project>

  <project>
    <PathAndName>.\Project2\Project2.uvproj</PathAndName>
    <NodeIsActive>1</NodeIsActive>
  </project>

</ProjectWorkspace>

- Then there is a project-file, also xml. One sub-section of it names the
files contained within the project.

This part looks like this:

      <Groups>
        <Group>
          <GroupName>SOURCE_FILES</GroupName>
          <Files>
            <File>
              <FileName>Main.cpp</FileName>
              <FileType>8</FileType>
              <FilePath>.\src\Main.cpp</FilePath>
            </File>
            <File>
              <FileName>startup_stm32f10x_md_vl.s</FileName>
              <FileType>2</FileType>
              <FilePath>.\src\startup_stm32f10x_md_vl.s</FilePath>
            </File>
          </Files>
        </Group>
      </Groups>

- Then there is an option-file. In there, there is also some reference to
the source-files. But I guess once I am able to create the project-file
entries, generating the option-files is trivial.

If anyone could guide me to a good starting point, that would be awesome!

Thanks a lot in advance!

--
Cheers!
 Marco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20141112/1731289a/attachment.html>


More information about the cmake-developers mailing list