Configure Sonarqube for Code Composer 12.7.0

  • Operating system: Windows 10
  • SonarLint plugin version: 10.1
  • Programming language you’re coding in: C
  • Is connected mode used: Yes
    • Connected to SonarCloud or SonarQube (and which version): SonarQube 10.5

After following SonarSource Build Wrapper and SonarScanner for C/C++/Objective-C documentation, I’m unable to configure Build Wrapper. I’m unsure whether I need to configure it for Windows or for use with the Makefiles that CCS (Code Composer Studio) uses for compilation. The error I’m getting when running [SONARSOURCE BUILD-WRAPPER] failed to execute MSBuild.exe /t:Rebuild /nodeReuse:False: The system cannot find the file specified.

How can I configure SonarQube for Eclipse (Code Composer Studio) to work with C language?"


Welcome to the community!

The docs should get you started.


Hi, I did that but problems keep popping up. I want to use SonarLint in Code Composer Studio, which is essentially Eclipse. I’ve installed everything, but errors persist.

I’ve managed to connect Eclipse with SonarQube from my organization, but the code doesn’t appear in SonarQube. Additionally, I can’t get SonarLint to apply the corresponding rules. Moreover, there are some problems that I can’t figure out how to solve. For instance:

java.lang.IllegalStateException: Unable to read file C:\xxx\yyyy\file with charset UTF-8


File to analyze was not found in the file system: file:/C:/xxxx/.sonarlint/connectedMode.json

I need to have SonarLint installed in Code Composer, and the tutorials I’ve followed on the website haven’t been optimal, as the build wrapper can’t be configured, or I don’t know how to do it, to work in Windows environments and compile with the makefiles it generates automatically in each Texas Instruments code build.

We used, Windows with code composer 12.7 and the compiler version is 20.2.7


For the code to show up in SonarQube, you’ll need to perform an analysis, and that takes place outside of Eclipse/SonarLint.

Let’s back up. What is your ultimate goal here? Is it using SonarLint in Eclipse / Code Composer Studio, or is it analysis in SonarQube?


"Excuse me for explaining so poorly.

Right now I have two objectives.

The first objective is to perform the analysis with the SonarScanner. To use the SonarScanner, I do it through Docker, for which I configure the following bash script:


# Vars

# Ejecutar Docker
docker run \
    --rm \
    -e SONAR_HOST_URL="https://${SONARQUBE_URL}" \
    -e SONAR_SCANNER_OPTS="-Dsonar.projectKey=${YOUR_PROJECT_KEY} -Dsonar.cfamily.compile-commands=/xx/y/xxx/compile_commands.json" \
    -v "${YOUR_REPO}:/usr/src" \
    sonarsource/sonar-scanner-cli \
    -D sonar.sourceEncoding=UTF-8 \
    -D sonar.projectKey=my_code\
    -D sonar.sources=. \
    -D \
    -D sonar.exclusions=**/*.java \

The second part is to integrate SonarLint into Code Composer Studio. The issue is that I’ve already connected it to the server and entered the token, and it shows as green, but when I put a division by 0 in the code, it doesn’t detect it.



I’ve moved this thread to the SonarQube category, since analysis is the first objective.

The docs are pretty clear that analyzing C and C++ isn’t supported with the Docker image:

Important notes

  • The Build Wrapper collects information about the build, including absolute file paths (source files, standard headers, libraries, etc…). Later on, SonarScanner CLI uses this information and needs to access those paths. While this is straightforward when running these two steps on the same host, it is worth considering when using any containerization. A consequence of this is that C/C++/Objective-C analysis is NOT supported by SonarScanner CLI Docker image

So can you try this with the vanilla SonarScanner CLI?


I do:

C:\SonarQube\build-wrapper-win-x86\build-wrapper-win-x86\build-wrapper-win-x86-64.exe --out-dir build_wrapper_output_directory C:\ti\ccs1270\ccs\tools\compiler\ti-cgt-arm_20.2.7.LTS\bin\armcl.exe

But just extract the compiler options. I’m trying with the commands provided in the instructions for setting up the build-wrapper, but I still can’t get it to work. How can I make it work?


Did you try feeding the resulting files into analysis?