Tool/software:
Hi all,
Is it default behavior that CCS 20 (Theia) only updates the errors and warnings in the editor on a build?
Usually with VSCode and other IDEs the text editor will throw the errors/warnings right while typing, putting the squiggly line below the text. With Theia it will do it only on building (strg+b).
I configured VSCode with the same project with the c_cpp_properties.json and everything works fine (this is how we worked before when the eclipse based IDE was TIs default). Additionally, I tried VSCode with clangd and the generated compile_commands.json which also work alright.
Setup details:
Target MCU: AM64/AM24 Cortex R5 with tiarmclang
OS: Windows 10 and Ubuntu 24, both behave the same
CCS/Theia version: 20.0.1.4
SDK: MCU-PLUS-SDK-AM64X 10.01.00.32
At the moment I am using VSCode to edit the code and switch back to Theia/CCS to build and debug. It would be great if only Theia could be used since they are are almost the same anyways.
Best regards,
Ergin
Ergin,
In CCS we are showing errors/warnings that are found during an actual compile (i.e. reported by the compiler). I believe VS Code is using the Microsoft C/C++ extension package. Looking at my VS Code install I believe it is specifically this setting:
Microsoft has licensed this extension such that it can only be used with VS Code.
There are others looped into the thread who maybe be able to comment if there is another extension that can be installed that can provide the same functionality or maybe it is something we have to add to our own clangd extension.
Regards,
John
Hi John,
Thank you for the reply. I tried both extensions in VS Code as mentioned already, the C/C++ from Microsoft with the c_cpp_properties.json and also the clangd from LLVM extension with .clangd as config, both worked well and as expected. Neovim with the clangd lsp also picks up the .clangd config and works flawlessly.
The clangd extension in CCS/Theia is the same as far as I can tell (only a little older) but does not really work as expected or something is turned off or so internally there.
If the default behavior from CCS is that it only updates the errors/warnings on build/compile you probably want to fix that at some point.
Something in CCS is already generating the compile_commands.json file anyways which is the most annoying part usually. There is also a bug btw. for whatever person is working on that compile_commands.json generation. The command is generated with clang++ in the command as compiler instead of tiarmclang.exe, I always have to replace all the clang++ for tiarmclang after the compilation.
Here are the configs in VSCode (for the uart_echo_callback example for the AM64):
Best regards,
Ergin
Hi Ergin,
CCS v20 uses a generic (non-TI) clangd server for code-completion and navigation. The same clangd server also supports static code analysis, but we deliberately suppress all clangd diagnostics. The reason for this is that the generic clangd server ends up flagging most TI SDK example projects with hundreds of meaningless errors. Even after a project is successfully built, generic clangd is unable to make sense of the code, and dozens of errors remain:
For a similar reason, we always disabled static code analysis in older Eclipse-based CCS versions. It is possible that TI compilers would some day supply a TI-specific clangd server. If that happens, we may be able to support static code analysis then.
Baltasar
Hi Baltasar,
Okay good to know. I see what you mean. We got similar errors for the AM24/64 setup and removed them with weird hacks in the .clang/c_cpp_properties file. Since we only use the AM64/24 atm we can manage it for now.
I can see that it is probably another thing to manage the vast array of MCUs from TI in a clean way as well on your side.
Best regards,
Ergin