8.1.10. Espressif ESP IDF

8.1.10.1. Background

Your project is built using Espressif ESP IDF.

8.1.10.2. What can be configured?

As the Espressif ESP IDF uses GCC, CMake and Ninja, integration can be performed using those primitives and not with the idf.py build tool.

8.1.10.3. What needs to be done?

The compiler profile can be set up with gccsetup using the respective GCC variant.

As the Espressif ESP IDF does not use CMake toolchain files in the expected way, hooking into CMake with an Axivion analysis toolchain is not straightforward.

However, we can use CMakeIntegration to do the native build and export a compile_commands.json database that we can use in a subsequent build step with the CompileCommandsIntegration as follows.

"Project": {
    "BuildSystemIntegration": {
        "child_order": [
            "CMake",
            "CompileCommands"
        ]
    },
    "CMake": {
        "_active": true,
        "_copy_from": "CMakeIntegration",
        "analysis_toolchain_file": "DISABLED",
        "build_directory": "build",
        "export_compile_commands": true
    },
    "CompileCommands": {
        "_active": true,
        "_copy_from": "CompileCommandsIntegration",
        "compile_commands_json": "build/compile_commands.json"
    },
    "Project-GlobalOptions": {
        "ci_mode": {
            "clean_before": false
        },
        "directory": "../",
        "ir": "axivion.ir",
        "name": "hello_world"
    }
},