Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Macro Define HelperNew to Visual Studio Code? Get it now.
Macro Define Helper

Macro Define Helper

pa

|
204 installs
| (0) | Free
help generate define tree view and gen headers
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

中文

MacroDefineHelper README

A vscode extension to generate a config tree from the describe files in project.

Then you can edit the describe tree and generate head files from the tree

image-20210613185245774 image-20210613185555981 image-20210613184934920 image-20210613185038846

developement

  1. pack

    vsce package

  2. first open

    npm install

install

You can download it from releases.

use

  1. generate and open config file

    image-20210613192841677

    image-20210613192714030

    right click side bar or input command

    choose the first selection

    image-20210613192958303

    remove the ’//‘ and set the values


"libConfFilePath" the path of generated headers

"defaultConfFileName" default head file name

"libSrcPath" the directory path need to look for describe file

"describeFileFolderName" the name of the folder which contains the describe file

"describeFileName" the name of describe file


for example

{
    "libConfFilePath": "./AutoGenHeader",
    "defaultConfFileName": "AllConfig.h",
    "libSrcPath": "./paLibSubs",
    "describeFileFolderName": "",
    "describeFileName": "describe.txt"
}
  1. add describe file(describe.txt in the example above) in libs need define setting

    for example:

    image-20210613200523702

    there is a define value needed in my oled lib

    then I created a describe.txt in oled lib's directory

    use a | to divide the define value and default value


if it needs a special head file we can add a line like following:

image-20210613195854159

  1. generate config json tree

    right click or input command, choose the second option

    image-20210613200017719

    we will get a json tree file

    image-20210613200107695

    we can easily change the tree node value and save the file

  2. generate head files from tree

    right click or input command, choose the third option

    the head file will be generated in the target directory

    image-20210613200340874

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft