Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

中文

Introduction

For ARM Projects

This tool parses the .dep file of a Keil MDK project to extract the compilation commands used in the project, which are then used to generate a `compile_commands.json` file. Therefore, if the project has not been compiled before using this tool, it is best to first compile the project with Keil to generate the latest .dep file. The generated `compile_commands.json` can be used with clangd or ccls to enable LSP (Language Server Protocol) functionality in the editor.

For 51 Projects

This tool parses the .uvproj file of a Keil MDK project to extract the files used in the project, which are then used to generate a `compile_commands.json` file. The generated `compile_commands.json` can be used with clangd or ccls to enable LSP (Language Server Protocol) functionality in the editor.

Usage

Ensure that Python3 is installed and added to your PATH.

Ensure that the current Keil MDK project is located within a git repository. If not, initialize a git repository in the project’s root directory using the following command:

git init

👿 Note: The git directory should ideally contain both the Keil MDK project and the source code.

Generate `compile_commands.json`

Open a terminal and run the following command:

python gen_compile_commands_json.py

Windows users can open cmd or PowerShell to run the command, or simply double-click the script to execute it. However, running it via double-click will not display debug information.

About

A tool generate compile_commands.json from keilMDK`s project file.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages