MSP430 build-wrapper-dump empty

Template for a good new topic, formatted with Markdown:

  • ALM used Bitbucket Cloud
  • CI system used Bitbucket Cloud
  • Scanner command used when applicable:
gmake clean
build-wrapper-linux-x86-64 --out-dir /sonar-output gmake
sonar-scanner
  • Languages of the repository: C
  • Error observed
ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: The "build-wrapper-dump.json" file was found empty. Please make sure that:
  * you are using the latest version of the build-wrapper and the CFamily analyzer
  * your compiler is supported
  * you are wrapping your build correctly
  * you are wrapping a full/clean build
  * if you are building your project inside a Docker container, build-wrapper is wrapping the build process inside the container and not wrapping the external Docker process

I have also tried manually running the build-wrapper command in a container and I get the following in the logs: (note, this is just a snippet of the logs. It is a very long log file)

Mon Oct 25 01:48:39 2021: skipping process with pid: 1146
Mon Oct 25 01:48:39 2021: process created with pid: 1147
Mon Oct 25 01:48:39 2021: parent pid: 36
Mon Oct 25 01:48:39 2021: working directory: </source/MPU V3 Debug>
Mon Oct 25 01:48:39 2021: executable: </usr/bin/echo>
Mon Oct 25 01:48:39 2021: argv[0]: <echo>
Mon Oct 25 01:48:39 2021: argv[1]: < >
Mon Oct 25 01:48:39 2021: skipping process with pid: 1147
Mon Oct 25 01:48:39 2021: process created with pid: 1148
Mon Oct 25 01:48:39 2021: parent pid: 36
Mon Oct 25 01:48:39 2021: working directory: </source/MPU V3 Debug>
Mon Oct 25 01:48:39 2021: executable: </usr/bin/echo>
Mon Oct 25 01:48:39 2021: argv[0]: <echo>
Mon Oct 25 01:48:39 2021: argv[1]: <../driverlib/MSP430F5xx_6xx/usci_b_i2c.c>
Mon Oct 25 01:48:39 2021: skipping process with pid: 1148
Mon Oct 25 01:48:39 2021: process created with pid: 1149
Mon Oct 25 01:48:39 2021: parent pid: 36
Mon Oct 25 01:48:39 2021: working directory: </source/MPU V3 Debug>
Mon Oct 25 01:48:39 2021: executable: </usr/bin/echo>
Mon Oct 25 01:48:39 2021: argv[0]: <echo>
Mon Oct 25 01:48:39 2021: argv[1]: <Building file: "../driverlib/MSP430F5xx_6xx/usci_b_i2c.c">
Mon Oct 25 01:48:39 2021: skipping process with pid: 1149
Mon Oct 25 01:48:39 2021: process created with pid: 1150
Mon Oct 25 01:48:39 2021: parent pid: 36
Mon Oct 25 01:48:39 2021: working directory: </source/MPU V3 Debug>
Mon Oct 25 01:48:39 2021: executable: </usr/bin/echo>
Mon Oct 25 01:48:39 2021: argv[0]: <echo>
Mon Oct 25 01:48:39 2021: argv[1]: <Invoking: MSP430 Compiler>
Mon Oct 25 01:48:39 2021: skipping process with pid: 1150
Mon Oct 25 01:48:39 2021: process created with pid: 1151
Mon Oct 25 01:48:39 2021: parent pid: 36
Mon Oct 25 01:48:39 2021: working directory: </source/MPU V3 Debug>
Mon Oct 25 01:48:39 2021: executable: </usr/bin/dash>
Mon Oct 25 01:48:39 2021: argv[0]: </bin/sh>
Mon Oct 25 01:48:39 2021: argv[1]: <-c>
Mon Oct 25 01:48:39 2021: argv[2]: <"/root/ti/ccs1100/ccs/tools/compiler/ti-cgt-msp430_21.6.0.LTS/bin/cl430" -vmspx --data_model=restricted --near_data=none -O1 --opt_for_speed=5 --use_hw_mpy=F5 --include_path="/root/ti/ccs1100/ccs/ccs_base/msp430/include" --include_path="/source" --include_path="/source/driverlib/MSP430F5xx_6xx" --include_path="/source/USB_config" --include_path="/root/ti/ccs1100/ccs/tools/compiler/ti-cgt-msp430_21.6.0.LTS/include" --define=DEPRECATED --define=PRODUCT_MPU_V3 --define=__MSP430F5659__ -g --printf_support=full --diag_warning=225 --diag_wrap=off --display_error_number --emit_warnings_as_errors --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU40 --preproc_with_compile --preproc_dependency="driverlib/MSP430F5xx_6xx/usci_b_i2c.d_raw" --obj_directory="driverlib/MSP430F5xx_6xx"  "../driverlib/MSP430F5xx_6xx/usci_b_i2c.c">
Mon Oct 25 01:48:39 2021: skipping process with pid: 1151
Mon Oct 25 01:48:39 2021: process created with pid: 1157
Mon Oct 25 01:48:39 2021: parent pid: 36

What needs to be done to get the build wrapper to create a dump file for analysis?

Thanks,

Kevin

Hi @kevswims ,

could you share the build-wrapper.log and build-wrapper-dump.json files? I can send you a private message if you prefer to share privately.

Hi @mpaladin

I can share those. Private message would be preferred.

Thanks,

Kevin

Hi @kevswims ,

I sent you a private message.

Hi @kevswims ,

Texas Instruments compilers are not supported on linux, as described on the documentation page:

  • Texas Instruments compilers on Windows and macOS for ARM, C2000, C6000, C7000, MSP430, and PRU

The reason for which they are not supported on linux is that their binaries are statically linked and the build-wrapper uses dynamic libraries to observe compiler invocations.

There is an alternative way to run the analyzer, which is to use a JSON Compilation Database, you should be able to find a tool to generate a Compilation Database. Then, the steps to use a Compilation Database for the analysis are described in the documentation.

Thanks @mpaladin,

For anyone else who comes across this, I was able to use Bear (GitHub - rizsotto/Bear: Bear is a tool that generates a compilation database for clang tooling.) to wrap the compilation call and generate the compile_commands.json file using the following command:

bear --use-cc cl430 gmake -j4

With this analysis is working.

1 Like

Hi @kevswims ,

thank you for sharing and I am glad that you managed to get it working.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.