Skip to content

maximmenshikov/cast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compile commands JSON to Atmel Studio converter (CAST)

This tool can convert compile_commands.json generated by CMake to Atmel Studio format, which is still an IDE of choice for the developers using Windows.

The main idea is that there must be a proper build script for the building system support compile_commands.json. Atmel Studio should act only as IDE, flash tool and debugger. This tool doesn't help you create proper build scripts, and also it provides no two-way synchronization.

How to use it

python3 -m cast -c <path to compile_commands.json> \
                -t <path to template project.cproj> \
                -o <path to output_file.cproj> \
                -w <working directory>

There are four main parameters:

  1. -c <path to compile_commands.json>. This file is generated by CMake when CMAKE_EXPORT_COMPILE_COMMANDS is passed. For example:

    set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

  2. -t <path to template project.cproj>. You should prepare template in advance. We assume it is more reasonable than generating a file with empty values. The file should replace ItemGroup for file list and folder list accordingly:

      <ItemGroup>
    /*FileGroup*/
      </ItemGroup>
      <ItemGroup>
    /*FolderGroup*/
      </ItemGroup>
    

    In the end, these comments will be replaced with the actual lists of files. Also, be sure to enable Makefile build.

  3. -o <path to output_file.cproj>. The path to generated file. This file should be referred to from .atsln file for easier access.

  4. -w <working directory>. The working directory will be truncated from paths.

Example:

python3 -m cast -c build/compile_commands.json -t tmpl.cproj -o my_sw.cproj -w /home/test

Authors

Maxim Menshikov

License

MIT

About

Convert compile_commands.json to Microchip Studio projects

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published