<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/114979>114979</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            TI (Texas Instruments) C2000 Family not supported by clangd language server
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          student433
      </td>
    </tr>
</table>

<pre>
     **1. System Information:**

- **OS:** Windows
- **Compiler:** cl2000 (version 22.6.1.LTS)
- **Build System:** CMake
- **IDEs used:** VS Code, Eclipse CDT
- **MCU Family:** C2000
- **MCU Series:** F280015x

 **2. Problem Description:**

We currently use a CMake project over the TI C2000 MCU and would like to deploy clangd for code analysis. The include paths are picked up by clangd after manually adjusting `compile_commands.json` flags for them to be recognized by clangd. Since predefined macros are picked up by clangd using target information, we are at a dead end situation as there is currently no support for the TI C2000 Family. We currently use the triple target definition `msp430-none-eabi` for a little help as it also comes from TI and resolve some basic pre-defines but we are still far away from our destination.

Hence, my questions are:

- Would it be possible to upstream support for the C2000 Family over clangd? or otherwise, what would we need to do to add this support?

- Since even the `compile_commands.json` commands are not recognized as it does not have gcc-style argument flags, is there a way for clangd to overcome this? Our compiler command looks like this : 

`C:\\ti\\ccs1281\\ccs\\tools\\compiler\\ti-cgt-c2000_22.6.1.LTS\\bin\\cl2000.exe --compile_only --c_file=C:\\Users\\eclipse-workspace\\can_echo\\source\\can_transmit_receive.c -DNDEBUG --include_path=C:\\Users\\eclipse-workspace\\can_echo\\device\\driverlib --include_path=C:\\Users\\eclipse-workspace\\can_echo\\device --include_path=C:\\Users\\eclipse-workspace\\can_echo\\device\\driverlib\\inc --include_path=C:\\Users\\eclipse-workspace\\can_echo\\syscfg --include_path=C:\\ti\\ccs1281\\ccs\\tools\\compiler\\ti-cgt-c2000_22.6.1.LTS\\include -v28 -ml -mt --opt_level=off --define=_FLASH --define=_LAUNCHXL_F2800157 --diag_suppress=10063 --gen_func_subsections=on --abi=eabi --output_file=can_echo.c.obj`

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0VkuP2zgM_jXKhbDhR56HHKZJsx1g2i6Qme3eAlmiHc3IkleUk2Z__UJ-NAmK9rLtxYlNUvz48RMlTqQqg7hms3dstp3w1h-tW5NvJRo_zfNJYeVlDSx7YNlDGsP-Qh5reDSldTX3yhqWP_RWlmxZMjyjIeLz_psZvigj7ZnuHTa2bpRGd3UTOkuSBFi2PKEjZQ1kWTyP0_jpec-y1X34u1ZpOYC6LrH5yN_w3vFx-56gJZRXr7_2sLESWbaB90KrhhA22-f7sI-bF9jxWunLzeoB3_due3QK6eq2y5ZJks6-3tIyuGcx_OlsobGGLZJwqvkhkV8QROscGq8vAT_wvjponH1F4cGe0IE_Ijw_9sgggOFGwtm2WoJWbwjegsRG2wsIzU0lobQOhJUI3HB9IUUxPB8RlBG6lQgN90cC7hAaJd5QQttA8S2Ylx4d1Ny0XOsLcPnaklemAjZPRN_Pg7B1zY2k-JWsYfMESs0r6vL6I9YBUYHgUNjKqH9RXpePYa-MCAWixFIZlFBz4eyP8bQUknvuKvSgbpSZbeCMXRj3wEEil4BGAinfdh7AKcBxCIpueDYWqG0a6_wI-Mpur4YYvmtM8PJONRpHKB181eVh86SmZponkbEGI-SF6kixDjho5b1GOKJuAiDlgWuyIGyNBKWzdcgeOuqQrD4hkK0RCk5KBJainiaCovVjveSV1lByB_zML_0itnUgMXSqqz2-ldkHNKLbCfUF_mmDkzUd4UGUd_v6S6cq5UP7GkukCt3pq23IO-T1d8zd0tartW8by3dgHdjA_1lRl_185H7Q7RnBIMpOujY8uZTgj4rGBCzf3SPrZYMnNF3en4lx_NBxZay_FWLfAWmROsuRnxAqISLyFx3Irdoaje_1HDCrUUIcOqrtWGAAHeoNfeyQh4o_t2Hj9TNvhAHa2jcadmqokOUPcFsbmyeb0IjZhs02XvW_QlCaLdNvL4PV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