Generate Compilation Database by parse Keil µVision project
Project description
uv2compdb
Generate Compilation Database by parse Keil µVision project.
Features
- Parse strategy (dep/build_log -> XML)
- Extract toolchain predefined macros with
-poption - VariousControls hierarchical merge (Target -> Group -> File)
Installation
pip install uv2compdb
Usage
Basic Usage
Generate compile_commands.json in the current directory for the first target if the project has multiple targets.
uv2compdb /path/to/project
Specify target and output
Generate compile_commands.json for a specific target and output
uv2compdb /path/to/project -t target -o /path/to/compile_commands.json
Help
usage: uv2compdb [-h] [-v] [-a ARGUMENTS] [-b] [-t TARGET] [-o OUTPUT] [-p] project
Generate compile_commands.json by parse Keil µVision project
positional arguments:
project path to .uvproj[x] file
optional arguments:
-h, --help show this help message and exit
-v, --version show version and exit
-a ARGUMENTS, --arguments ARGUMENTS
add extra arguments
-b, --build try to build while dep/build_log files don't not exist
-t TARGET, --target TARGET
target name
-o OUTPUT, --output OUTPUT
output dir/file path (default: compile_commands.json)
-p, --predefined try to add predefined macros
Limit
- Not parsed
"Options" -> "C/C++" -> "Language / Code Generation" - Not parsed
"Options" -> "ASM", so Asm file use same options with C file - Can't parse RTE components
- Can't add toolchain predefined macros and include path
- The support for C51 / ARMCC (AC5) not well
- need config
.clangdmanually
- need config
Clangd
CompileFlags:
CompilationDatabase: /path/to/compile-commands-dir
Compiler: arm-none-eabi-gcc # use arm-neon-eabi-gcc instead of armcc
Add:
- -fdeclspec # fix '__declspec' if use arm-none-eabi-gcc instead of armcc
Diagnostics:
UnusedIncludes: None # Strict(default), None
# Suppress:
# - no_member
# - no_member_suggest
# - no_template
# - undeclared_var_use
References
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
uv2compdb-0.5.1.tar.gz
(8.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
uv2compdb-0.5.1-py3-none-any.whl
(10.8 kB
view details)
File details
Details for the file uv2compdb-0.5.1.tar.gz.
File metadata
- Download URL: uv2compdb-0.5.1.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75638c3305b24c2d059d22cb4984a050f077c8407789414fde17c2632d3b788c
|
|
| MD5 |
d054c70148ff87206f36397459214334
|
|
| BLAKE2b-256 |
22467abb7a5319565a9400249ed176927f778ca80c93ac2f0eb90d9ca86c6af8
|
File details
Details for the file uv2compdb-0.5.1-py3-none-any.whl.
File metadata
- Download URL: uv2compdb-0.5.1-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88f9c62ed371f145f3888b39766d3f9c327dd49da599a9bd15377ed18ab36a4a
|
|
| MD5 |
47ccf256d7e3c600ec472479b5f998a7
|
|
| BLAKE2b-256 |
ec1b9880ebc55c9c3b47f53ac4438a2d79681ce8aaabeec85ef95c5ff4aebafc
|