SONAR EXECUTION FAILURE

I have cloned my project in D:\sonar\rg_fw_h7
main branch

Installed build-wrapper-win-x86-64.exe & sonar-scanner.bat and saved in PATH variables.

First I ran:
C:\Users\Z004NUMH\Desktop\check\build-wrapper-win-x86\build-wrapper-win-x86\build-wrapper-win-x86-64.exe --out-dir bw-output "C:\ST\STM32CubeIDE_1.13.1\STM32CubeIDE\stm32cubeidec.exe" -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data D:\sonar\rg_fw_h7\ -import D:\sonar\rg_fw_h7\src\rg_fw_h7\ -build all

This created bw-output/build-wrapper.log inside D:\FSI\rg_fw_h7\bw-output and the content is the following:

*Mon Mar 11 14:25:59 2024: build-wrapper, version 6.41.1 (win-x86-64)*
*Mon Mar 11 14:25:59 2024: isWow64: 0*
*Mon Mar 11 14:25:59 2024: windows version: 6.2, service pack: 0.0, build number: 9200, product type: 1*
*Mon Mar 11 14:25:59 2024: current directory: D:\FSI\rg_fw_h7*
*Mon Mar 11 14:25:59 2024: cwd: <D:\FSI\rg_fw_h7>*
*Mon Mar 11 14:25:59 2024: out-dir absolute path: <D:\FSI\rg_fw_h7\bw-output>*
*Mon Mar 11 14:25:59 2024: command line received: <C:\ST\STM32CubeIDE_1.13.1\STM32CubeIDE\stm32cubeidec.exe -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data "D:\sonar\rg_fw_h7\" -import D:sonarrg_fw_h7srcrg_fw_h7\"" -build all>*

Then I ran:
D:\FSI\rg_fw_h7>sonar-scanner.bat -X -D"sonar.projectKey=****" -D"sonar.sources=." -D"sonar.cfamily.build-wrapper-output=bw-output" -D"sonar.host.url=***" -D"sonar.login=***"

And it gave me an output log attahced
h7.txt (517.9 KB)

Please help with a solution(I am using build tool stm32cube ide and windows os)

Hi,

Thanks for including the log right off! :smiley:

The error I see is:

java.lang.IllegalStateException: java.nio.file.NoSuchFileException: D:\FSI\rg_fw_h7\bw-output\build-wrapper-dump.json
...
Caused by: java.nio.file.NoSuchFileException: D:\FSI\rg_fw_h7\bw-output\build-wrapper-dump.json

You say there was a log file in the build-wrapper output directory. Was there also a JSON file? I suspect there was not. And I suspect the reason is that the command you passed to the build-wrapper, stm32cubeidec.exe is itself another wrapper.

It may be that instead of using the build-wrapper, you’d be better off providing a compilation database. The docs will help you evaluate your options.

 
HTH,
Ann