# AWS FreeRTOS IDT CmakeBuildSystem Failure

**URL:** <https://forums.freertos.org/t/aws-freertos-idt-cmakebuildsystem-failure/11240>\
**Category:** AWS\
**Created:** [November 30, 2020, 6:38am UTC](https://forums.freertos.org/t/aws-freertos-idt-cmakebuildsystem-failure/11240 "2020-11-30T06:38:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaushendra](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/kaushendra/32/1061_2.png) [@kaushendra](https://forums.freertos.org/u/kaushendra)\
**Post date:** [November 30, 2020, 6:38am UTC](https://forums.freertos.org/t/aws-freertos-idt-cmakebuildsystem-failure/11240/1 "2020-11-30T06:38:36Z")

</div>

Dear AWS and ST team,

I’m trying to setup IDT on Linux machine to qualify STM32WB55 microcontroller.  
This setup i’m doing it for the first time, hence need help from your side to start running IDT on Linux machine.

I have few questions listed below, requesting you to respond on it asap.

1. I have WB55\_AFR\_20191200 Source code available with me.
2. I have followed the link [idt\_pre-requisities](https://docs.aws.amazon.com/freertos/latest/userguide/device-tester-for-freertos-ug.html)

3.My Contents for userdata.json

```auto
    indent preformatted text by 4 spaces
{
  "sourcePath": "/home/kaushendra/IDT_TEST/STM_Release_Nov/WB55_AFR",
  "vendorPath": "{{testData.sourcePath}}/vendors/st/boards/p_nucleo_wb55",
  "buildTool": {
    "name": "make",
    "version": "v1",
    "command": [
      "/home/kaushendra/IDT_TEST/STM_Release_Nov/WB55_AFR/projects/st/p_nucleo_wb55/cmake/build_idt.sh {{testData.sourcePath}} {{enableTests}}"
    ]
  },
  "flashTool": {
    "name": "stmflash",
    "version": "v1",
    "command": [
      "/home/kaushendra/IDT_TEST/STM_Release_Nov/WB55_AFR/projects/st/p_nucleo_wb55/cmake/flash.sh {{testData.sourcePath}} {{buildImageName}}"
    ],
    "buildImageInfo" : {
      "testsImageName": "SBSFU_aws_tests.bin",
      "demosImageName": "SBSFU_aws_demos.bin"
    }
  },
  "clientWifiConfig": {
    "wifiSSID": "Kaushendra",
    "wifiPassword": "seed@123",
    "wifiSecurityType": "eWiFiSecurityWPA2"
  },
  "testWifiConfig": {
    "wifiSSID": "Kaushendra",
    "wifiPassword": "seed@123",
    "wifiSecurityType": "eWiFiSecurityWPA2"
  },
  "cmakeConfiguration": {
    "boardName": "p_nucleo_wb55",
    "vendorName": "st",
    "compilerName": "arm-gcc",
    "afrToolchainPath": "/home/kaushendra/st/stm32cubeide_1.4.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-arm-embedded.7-2018-q2-update.linux64_1.4.0.202007081208/tools/bin"
  }
}

```

4.My contents for device.json

```auto
    indent preformatted text by 4 spaces
[
  {
    "id": "stm32wb55",
    "sku": "STM_sku",
    "features": [
      {
        "name": "WIFI",
        "value": "No"
      },
      {
        "name": "OTA",
        "value": "No",
        "configs": [
          {
            "name": "OTADataPlaneProtocol",
            "value": "HTTP | MQTT | Both"
          }
        ]
      },
      {
        "name": "BLE",
        "value": "Yes"
      },
      {
        "name": "TCP/IP",
        "value": "No"
      },
      {
        "name": "TLS",
        "value": "Yes"
      },
      {
        "name": "PKCS11",
        "value": "ECC"
      },
      {
        "name": "KeyProvisioning",
        "value": "Import"
      }
    ],
    "devices": [
      {
        "id": "stm32wb55_id_1",
        "connectivity": {
          "protocol": "uart",
          "serialPort": "/dev/ttyACM0"
        }
      }
    ]
  }
]

```

1. My contents for resource.json

```auto
[
  {
    "id": "ble-stm32wb55",
    "features": [
      {"name":"ble", "version":"4.2"}
    ],
    "devices": [
      {
        "id": "ble-stm32wb55-1",
        "connectivity": {
          "protocol": "ssh",
          "ip": "192.168.43.107"
        }
      }
    ]
  }
]

```

6.Following errors i’m getting while performing IDT for test\_group

**1-CmakeBuildSystem**

```auto
> ========== Test Summary ==========
> Execution Time: 10m18s
> Tests Completed: 3
> Tests Passed: 2
> Tests Failed: 1
> Tests Skipped: 0
> ----------------------------------
> Test Groups:
> Optional Test Groups:
> CmakeBuildSystem: FAILED
> ----------------------------------
> Failed Tests:
> Group Name: CmakeBuildSystem
> Test Name: CmakeBuildDemos
> Reason: Test case timeout during execution. Please refer to /home/kaushendra/IDT_TEST/STM_Release_Nov/devicetester_afreertos_linux_1.6.2/devicetester_afreertos_linux/results/3a7c084a-30b4-11eb-8fd5-c03eba6cbb6a/logs/CmakeBuildSystem__Cmake_Build_Demos.log for more information.

```

**2-FullMQTT**

```auto
> ========== Test Summary ==========
> Execution Time: 8m6s
> Tests Completed: 6
> Tests Passed: 0
> Tests Failed: 6
> Tests Skipped: 0
> ----------------------------------
> Test Groups:
> FullMQTT: FAILED
> ----------------------------------
> Failed Tests:
> Group Name: FullMQTT
> Test Name: MQTT_System
> Reason: [Error: 205] FlashOrRunTestError: Failed to run test with error: failed to flash or run with error:

```

help and guidance will be appreciated.

Regards,  
kaushendra sah

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [November 30, 2020, 5:43pm UTC](https://forums.freertos.org/t/aws-freertos-idt-cmakebuildsystem-failure/11240/2 "2020-11-30T17:43:43Z")

</div>

Would you please share the content of the log file?

```auto
Reason: Test case timeout during execution. Please refer to /home/kaushendra/IDT_TEST/STM_Release_Nov/devicetester_afreertos_linux_1.6.2/devicetester_afreertos_linux/results/3a7c084a-30b4-11eb-8fd5-c03eba6cbb6a/logs/CmakeBuildSystem__Cmake_Build_Demos.log for more information.

```

For the second one, it seems that the flash command is not successful. Does the command configured in `"flashTool":` works by itself? Also, please share the execution logs:[https://docs.aws.amazon.com/freertos/latest/userguide/dt-afr-troublshooting.html](https://docs.aws.amazon.com/freertos/latest/userguide/dt-afr-troublshooting.html)

Thanks.

---

<div class="post-metadata">

**Author:** ![ArjunSalariya](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@ArjunSalariya](https://forums.freertos.org/u/ArjunSalariya)\
**Post date:** [December 1, 2020, 7:25am UTC](https://forums.freertos.org/t/aws-freertos-idt-cmakebuildsystem-failure/11240/3 "2020-12-01T07:25:08Z")

</div>

Hi Gaurav,

As kaushendra’s id is new,he’s not able to sent attachment.further communication will be using this id.  
Please find the `CmakeBuildSystem__Cmake_Build_Demos.log` in the attachment.  
Also i tried to debug Test case : **FullMQTT** at my end.

I have modified the flashtool configs.

> “flashTool”: {  
> “name”: “stmflash”,  
> “version”: “v1”,  
> “command”: [  
> “/home/kaushendra/IDT\_TEST/STM\_Release\_Nov/WB55\_AFR/projects/st/p\_nucleo\_wb55/cmake/flash.sh {{testData.sourcePath}} {{buildImageName}}”  
> ],  
> “buildImageInfo” : {  
> “testsImageName”: “aws\_tests”,  
> “demosImageName”: “aws\_demos”  
> }  
> },

Test Result:  
**\> ========== Test Summary ==========**  
**\> Execution Time: 40m14s**  
**\> Tests Completed: 48**  
**\> Tests Passed: 47**  
**\> Tests Failed: 1**  
**\> Tests Skipped: 0**  
**\> ----------------------------------**  
**\> Test Groups:**  
**\> FullMQTT: FAILED**  
**\> ----------------------------------**  
**\> Reason: Test case timeout during execution.**

> Please refer to /home/kaushendra/IDT\_TEST/STM\_Release\_Nov/devicetester\_afreertos\_linux\_1.6.2/devicetester\_afreertos\_linux/results/001c2f99-3313-11eb-af53-c03eba6cbb6a/logs/FullMQTT\_\_MQTT\_System.log

Please refer the FullMQTT\_\_MQTT\_System.log also provided in attachment.

help will be appreciated.

regards,  
arjun  
[001c2f99-3313-11eb-af53-c03eba6cbb6a.zip](https://forums.freertos.org/uploads/short-url/hvHN5SDvqcNYwb8mz9A8Xc2z5y0.zip) (90.4 KB)  
[3a7c084a-30b4-11eb-8fd5-c03eba6cbb6a.zip](https://forums.freertos.org/uploads/short-url/tvyYuo2GvkyBeUkt7TPBlphdKfX.zip) (20.5 KB)

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [December 2, 2020, 8:45pm UTC](https://forums.freertos.org/t/aws-freertos-idt-cmakebuildsystem-failure/11240/4 "2020-12-02T20:45:44Z")

</div>

**CMake Build** - Looking at the logs, it seems that the cmake is stuck. Would you please try to build aws\_demos using cmake separately and see where it gets stuck:

```auto
time="2020-11-27T18:57:11+05:30" level=info msg="[89%] Building C object CMakeFiles/afr_ota.dir/libraries/3rdparty/tinycrypt/lib/source/hmac.c.obj"
time="2020-11-27T18:57:11+05:30" level=info msg="[89%] Building C object CMakeFiles/afr_ota.dir/libraries/3rdparty/tinycrypt/lib/source/aes_encrypt.c.obj"
time="2020-11-27T18:57:11+05:30" level=info msg="[89%] Building C object CMakeFiles/afr_ota.dir/libraries/3rdparty/tinycrypt/lib/source/ctr_mode.c.obj"
time="2020-11-27T18:57:11+05:30" level=info msg="[89%] Building C object CMakeFiles/afr_ota.dir/libraries/3rdparty/tinycrypt/lib/source/utils.c.obj"
time="2020-11-27T18:57:12+05:30" level=info msg="[90%] Linking C static library afr_shadow.a"
time="2020-11-27T18:57:12+05:30" level=info msg="[90%] Built target afr_shadow"

```

**FullMQTT** - Looking at the logs below, it seems that the test is stuck. Would you run this test with debugger and see where is it stuck:

```auto
0 5605 [TestRunner] [INFO][INIT][lu] SDK successfully initialized.
1 5612 [TestRunner] [INFO][MQTT][lu] MQTT library successfully initialized.
2 5619 [TestRunner] [WARN][MQTT][lu] AWS IoT does not support disabling keep-alive. Default keep-alive of 1200 seconds will be used.

```

Thanks.

---

<div class="post-metadata">

**Author:** ![ArjunSalariya](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@ArjunSalariya](https://forums.freertos.org/u/ArjunSalariya)\
**Post date:** [December 7, 2020, 7:38am UTC](https://forums.freertos.org/t/aws-freertos-idt-cmakebuildsystem-failure/11240/5 "2020-12-07T07:38:33Z")

</div>

Hi Gurav,

I’m Validation my Cmake build via mannual Steps.  
by the time I would like to understand about “ **FreeRTOSIntegrity** ”  
I have my code supporting STMWB55 device build with **WB55\_AFR\_20191200**.  
Facing issue while running below Test.

**Test**

> FreeRTOSIntegrity

**Command**

> ./devicetester\_linux\_x86-64 run-suite --userdata userdata.json --group-id FreeRTOSIntegrity

**Result**

```auto
> ========== Test Summary ==========
> Execution Time: 1s
> Tests Completed: 1
> Tests Passed: 0
> Tests Failed: 1
> Tests Skipped: 0
> ----------------------------------
> Test Groups:
> FreeRTOSIntegrity: FAILED
> ----------------------------------
> Failed Tests:
> Group Name: FreeRTOSIntegrity
> Test Name: AmazonFreeRTOSSourceIntegrity

> Reason: Following files are modified : /home/kaushendra/IDT_TEST/STM_Release_Nov/FreeRTOS_Integrity/WB55_AFR/libraries/freertos_plus/aws/ota/test/aws_test_ota_agent.c, /home/kaushendra/IDT_TEST/STM_Release_Nov/FreeRTOS_Integrity/WB55_AFR/demos/ota/aws_iot_ota_update_demo.c, /home/kaushendra/IDT_TEST/STM_Release_Nov/FreeRTOS_Integrity/WB55_AFR/libraries/c_sdk/standard/ble/src/services/mqtt_ble/iot_ble_data_transfer.c, /home/kaushendra/IDT_TEST/STM_Release_Nov/FreeRTOS_Integrity/WB55_AFR/libraries/c_sdk/standard/ble/src/iot_ble_gap.c, /home/kaushendra/IDT_TEST/STM_Release_Nov/FreeRTOS_Integrity/WB55_AFR/libraries/abstractions/ble_hal/test/src/iot_test_ble_hal_afqp.c, /home/kaushendra/IDT_TEST/STM_Release_Nov/FreeRTOS_Integrity/WB55_AFR/demos/mqtt/iot_demo_mqtt.c, /home/kaushendra/IDT_TEST/STM_Release_Nov/FreeRTOS_Integrity/WB55_AFR/libraries/abstractions/ble_hal/test/src/iot_test_ble_hal_common.c

```

> [FreeRTOSIntegrity\_\_FreeRTOS\_Integrity.zip](https://forums.freertos.org/uploads/short-url/yDxGVRee4h83IxGtnERJz7nLeBD.zip) (1.7 KB)

Please help me understand the issue here.

Regards,  
kaushendra sah

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [December 7, 2020, 7:43pm UTC](https://forums.freertos.org/t/aws-freertos-idt-cmakebuildsystem-failure/11240/6 "2020-12-07T19:43:03Z")

</div>

So does CMake and FullMQTT tests pass for you?

The `FreeRTOSIntegrity` test ensures that you do not modify any file that you are not supposed to. From your logs, these are the files that the test is complaining about:

```auto
libraries/freertos_plus/aws/ota/test/aws_test_ota_agent.c
demos/ota/aws_iot_ota_update_demo.c
libraries/c_sdk/standard/ble/src/services/mqtt_ble/iot_ble_data_transfer.c
libraries/c_sdk/standard/ble/src/iot_ble_gap.c
libraries/abstractions/ble_hal/test/src/iot_test_ble_hal_afqp.c
demos/mqtt/iot_demo_mqtt.c
libraries/abstractions/ble_hal/test/src/iot_test_ble_hal_common.c

```

Would you please see why you need to modify these files?

Thanks.

---

<div class="post-metadata">

**Author:** ![ArjunSalariya](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@ArjunSalariya](https://forums.freertos.org/u/ArjunSalariya)\
**Post date:** [December 11, 2020, 9:27am UTC](https://forums.freertos.org/t/aws-freertos-idt-cmakebuildsystem-failure/11240/7 "2020-12-11T09:27:18Z")

</div>

Hi Gaurav,

**CMake Build**  
Yes we identified the problem here in mannual build.  
please check with below details:  
1–building aws\_demos  
pwd:/home/kaushendra/IDT\_TEST/STM\_Release\_Nov/WB55\_AFR

```
cmake -DVENDOR=st -DBOARD=p_nucleo_wb55 -DCOMPILER=arm-gcc -DAFR_TOOLCHAIN_PATH=/home/kaushendra/st/stm32cubeide_1.4.0/plugins/ com.st.stm32cube.ide.mcu.externaltools.gnu-arm-embedded.7-2018-q2-update.linux64_1.4.0.202007081208/tools/bin -DAFR_ENABLE_TESTS=0 -S . -B ./build

```

cd build/  
sudo make all -j4

2–building aws\_tests  
pwd:/home/kaushendra/IDT\_TEST/STM\_Release\_Nov/WB55\_AFR

```
cmake -DVENDOR=st -DBOARD=p_nucleo_wb55 -DCOMPILER=arm-gcc -DAFR_TOOLCHAIN_PATH=/home/kaushendra/st/stm32cubeide_1.4.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-arm-embedded.7-2018-q2-update.linux64_1.4.0.202007081208/tools/bin -DAFR_ENABLE_TESTS=1 -S . -B ./build

```

cd build/  
sudo make all -j4

–observation

1st-demo,2nd test(builds sucess)  
1st-test,2nd demo(builds issue in demos)

**FullMQTT**  
could you please help me undersatnd how to test with debugger and see where is it stuck.

**FreeRTOSIntegrity**  
I have verified the Source Code available with me and downloaded a fresh version of same using meld.I found some minor changes in Keep-alive and other parameters.  
My query here is to understand the failure scenario for FreeRTOSIntegrity.  
Can’t we manage to pass it with some minor libraries modification as it is required for our AWS Demo to work with the Board.

Regards,  
Arjun

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [December 11, 2020, 5:59pm UTC](https://forums.freertos.org/t/aws-freertos-idt-cmakebuildsystem-failure/11240/8 "2020-12-11T17:59:22Z")

</div>

**CMake Build**

> 1st-test,2nd demo(builds issue in demos)

What are these issues? If these are not already resolved, would you please share build logs.

**FullMQTT**

> could you please help me undersatnd how to test with debugger and see where is it stuck.

This depends on your hardware. I assume you could use STM32CubeIDE but I’d suggest checking with ST.

**FreeRTOSIntegrity**  
The reason you are not supposed to modify these files is because they are common files and are used by all the boards. Board specific configuration should go in a config file which is board specific. An example of a config file is this: [https://github.com/aws/amazon-freertos/blob/fd27d7bbd0d370004817c217b7fb95242f136b0d/vendors/st/boards/stm32l475\_discovery/aws\_demos/config\_files/aws\_demo\_config.h](https://github.com/aws/amazon-freertos/blob/fd27d7bbd0d370004817c217b7fb95242f136b0d/vendors/st/boards/stm32l475_discovery/aws_demos/config_files/aws_demo_config.h)

Are the changes you making cannot be done via config files? If so, would you please share those changes so that we can think of a portable solution.

Thanks.
