8000 GitHub - TommyRadan/kconfig-compiler: A Python-based compiler that converts Kconfig configuration files into C header files.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

TommyRadan/kconfig-compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Kconfig Compiler

A Python-based compiler that converts Kconfig configuration files into C header files. This tool parses Kconfig files and .config files to generate C header files with configuration values.

Features

  • Parses Kconfig files with config options, menus, and dependencies
  • Supports different option types:
    • Boolean (bool)
    • Integer (int)
    • String (string)
  • Handles source and rsource directives
  • Processes .config files to get actual configuration values
  • Generates C header files with appropriate #define statements

Requirements

  • Python 3.x

Usage

python kconfig.py <kconfig_file> <config_file> <output_file>

Arguments

  • kconfig_file: Path to the main Kconfig file
  • config_file: Path to the .config file containing actual configuration values
  • output_file: Path where the generated C header file will be written

Example

python kconfig.py Kconfig .config include/config.h

Generated Header File

The generated header file will contain #define statements for all configured options, with appropriate values based on their types:

  • Boolean options: 1 for 'y', 0 for 'n'
  • Integer options: The integer value
  • String options: The string value

Notes

This implementation supports basic Kconfig syntax and is designed for simple to moderate complexity Kconfig files. It may not handle all advanced Kconfig features.

About

A Python-based compiler that converts Kconfig configuration files into C header files.

Topics

Resources

Stars

Watchers

Forks

Languages

0