AWS Quickconnect demo fails to build

Hello,

I purchased the STM32L4S5 IoT discovery board (and, accidentally, the STM32L475 IoT discovery board which is irritatingly incompatible) for the purposes of demonstrating AWS IoT on FreeRTOS embedded systems, and I have been having nothing but misery and pain.

With the latest version of STM32CubeIDE and the quickconnect demo package, I am unable to build the demo project, as there is seemingly a linker error with the SBSFU package (ld is giving a “no such file or directory” error for se_interface_app.o despite me very clearly pointing the linker include directory at it and specifying the file explicitly as a linked file).

I have been tinkering with codebases for the SMT32L475 for days with little success, and just now am still not successful with getting the STM32L5S board demo loaded.

I have also attempted to use the demo for the Texas Instruments CC3220SF board with little success as well, and found out that the tutorial for that board is deprecated in the aws documentation and uses the deprecated amazon-freertos repository.

It appears as though a significant amount of code has been abandoned in the deprecation of the amazon-freertos repository (most notably iot_wifi, etc) and that there seems to exist no current demos that make use of the AWS libraries post-deprecation, so its very difficult to determine how these libraries should actually be used in their current state.

I have been trying to make use of demos that are explicitly advertised on the Amazon FreeRTOS page as being qualified partner devices to no success, and I am also unable to make use of one of the demos explicitly featured on the FreeRTOS webpage as a “quick connect” demo, as the code no longer builds, and removing the SBSFU-dependent code is a hugely no trivial task.

Does anybody have any pointers on how to get a demo built and running on any embedded device whatsoever? Im at my wits end trying to figure this out.

Can you share the complete log? Also, can you share the your complete code so that we can give it a try?

I am using the quickconnect demo from the FreeRTOS webpage for the STM32L4S5 board, found here in step 1: www_freertos_org/quickconnect/stm32l4-quickconnect/

(New users aren’t allowed to put links in posts, so all the links are weird here)

I am using the most recent version of STM32CubeIDE, which at the time of this post is:

Version: 1.15.1
Build: 21094_20240412_1041 (UTC)

I have also attempted the aws demo found in X-CUBE-AWS v2.2.1
This board appears to have been abandoned in version 3.0.0, as the only board found in that package is the B_u585i_iot02A, and I’m very hesitant to buy another dev board to try and see if that code might work.

The errors I come across in the beginning when initially trying to build the demo with no modification is the following:

../Application/User/sysmem.c:64:1: error: unknown type name 'caddr_t'
   64 | caddr_t _sbrk(int incr)
      | ^~~~~~~
../Application/User/sysmem.c: In function '_sbrk':
../Application/User/sysmem.c:78:33: error: 'caddr_t' undeclared (first use in this function)
   78 |                         return (caddr_t) -1;
      |                                 ^~~~~~~
../Application/User/sysmem.c:78:33: note: each undeclared identifier is reported only once for each function it appears in
../Application/User/sysmem.c:83:25: error: expected ';' before 'prev_heap_cur'
   83 |         return (caddr_t) prev_heap_cur;
      |                         ^~~~~~~~~~~~~~
      |                         ;
../Application/User/sysmem.c:69:15: warning: variable 'prev_heap_cur' set but not used [-Wunused-but-set-variable]
   69 |         char *prev_heap_cur;
      |               ^~~~~~~~~~~~~
../Application/User/sysmem.c:84:1: warning: control reaches end of non-void function [-Wreturn-type]
   84 | }
      | ^
make[1]: *** [Application/User/subdir.mk:66: Application/User/sysmem.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [makefile:99: all] Error 2

I converted caddr_t to void* based on the reccommendation I found here: community_st_com/t5/stm32cubeide-mcus/core-src-sysmem-c-38-1-error-unknown-type-name-caddr-t/td-p/56309

Then, when implementing that fix, I come across the offending SBSFU error:

arm-none-eabi-gcc "../Application/User/sysmem.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DUSE_HAL_DRIVER -DUSE_WIFI '-DMBEDTLS_USER_CONFIG_FILE=<mbedtls_user_config.h>' -DENABLE_IMAGE_STATE_HANDLING -DDEBUG -DSTM32L4S5xx -D__BYTE_ORDER__=__ORDER_LITTLE_ENDIAN__ -c -I../../Inc -I../../config_files -I../../../../BootLoader_STSAFE/2_Images_SBSFU/SBSFU/App -I../../../../BootLoader_STSAFE/2_Images_SECoreBin/Inc -I../../../../BootLoader_STSAFE/Linker_Common/STM32CubeIDE -I../../../../../../../Middlewares/ST/STM32_Key_Management_Services/iKMS -I../../../../../../../Middlewares/ST/STM32_Secure_Engine/Core -I../../../../../../../Drivers/CMSIS/Device/ST/STM32L4xx/Include -I../../../../../../../Drivers/CMSIS/Include -I../../../../../../../Drivers/STM32L4xx_HAL_Driver/Inc -I../../../../../../../Drivers/STM32L4xx_HAL_Driver/Inc/Legacy -I../../../../../../../Drivers/BSPv2/B-L475E-IOT01 -I../../../../../../../Drivers/BSPv2/Components/es_wifi -I../../../../../../../Drivers/BSPv2/Components/hts221 -I../../../../../../../Drivers/BSPv2/Components/lis3mdl -I../../../../../../../Drivers/BSPv2/Components/lps22hb -I../../../../../../../Drivers/BSPv2/Components/lsm6dsl -I../../../../../../../Drivers/BSPv2/Components/vl53l0x -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/abstractions/wifi/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/abstractions/posix/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/3rdparty/tinycbor -I../../../../../../../Middlewares/Third_Party/amazon-freertos/demos/network_manager -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/aws/ota/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/demos/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/abstractions/secure_sockets/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/3rdparty/mbedtls/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/abstractions/pkcs11/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/3rdparty/http_parser -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/c_sdk/standard/common/include/private -I../../../../../../../Middlewares/Third_Party/amazon-freertos/freertos_kernel/portable/GCC/ARM_CM4F -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/3rdparty/jsmn -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/pkcs11/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/c_sdk/standard/serializer/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/c_sdk/aws/shadow/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/aws/ota/src -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/c_sdk/standard/https/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/abstractions/platform/freertos/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/freertos_kernel/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/demos/dev_mode_key_provisioning/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/aws/greengrass/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/aws/greengrass/src -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/c_sdk/standard/mqtt/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/c_sdk/standard/common/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/tls/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/abstractions/pkcs11/mbedtls -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/utils/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/abstractions/platform/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/c_sdk/aws/defender/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/crypto/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/3rdparty/pkcs11 -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/include -Os -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Application/User/sysmem.d" -MT"Application/User/sysmem.o"  -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Application/User/sysmem.o"
arm-none-eabi-gcc -z max-page-size=0x200 -o "B-L4S5I-IOT01_aws_demos.elf" @"objects.list" ../../../../BootLoader_STSAFE/2_Images_SBSFU/STM32CubeIDE/B-L4S5I-IOT01_2_Images_SBSFU/Debug/se_interface_app.o  -mcpu=cortex-m4 -T"C:\ST\STM32CubeExpansion_Cloud_AWS_V2.2.1\Projects\B-L4S5I-IOT01A\Applications\Cloud\aws_demos\STM32CubeIDE\STM32L4S5VITX_FLASH_sbsfu.ld" --specs=nosys.specs -Wl,-Map="B-L4S5I-IOT01_aws_demos.map" -Wl,--gc-sections -static -Xlinker -L ../../../../BootLoader_STSAFE/Linker_Common/STM32CubeIDE  -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
C:/ST/STM32CubeIDE_1.15.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.100.202403111256/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: cannot use executable file '../../../../BootLoader_STSAFE/2_Images_SBSFU/STM32CubeIDE/B-L4S5I-IOT01_2_Images_SBSFU/Debug/se_interface_app.o' as input to a link
collect2.exe: error: ld returned 1 exit status
make[1]: *** [makefile:106: B-L4S5I-IOT01_aws_demos.elf] Error 1
make: *** [makefile:99: all] Error 2

This does not solve the issue: community_st_com/t5/stm32-mcus-security/the-update-to-cubeide-1-6-0-cause-a-linker-error-compiling-the/td-p/229682

This appears to address the issue, but I don’t know enough about SBSFU to know how exactly to apply the fixes suggested here to the demo: community_st_com/t5/stm32-mcus-security/bug-x-cube-sbsfu-linker-error-with-gnu-tools-for-stm32-10-3-2021/td-p/111903

This is, after all, a demo, and its hard to troubleshoot and reason about a codebase of the scale and complexity and dependencies of the AWS demo when I can’t get a working compilation going.

There is a mention in that post about this being an issue with the most GNU recent toolchain, so I went ahead and downloaded and installed the most likely toolchain that was used to build this demo, 7-2018-q2-update, which I did through Project->properties->C/C++ Build->Settings->MCU Toolchain->Open Toolchain Manager.

Building with this toolchain results in a different set of errors:

arm-none-eabi-gcc "C:/ST/STM32CubeExpansion_Cloud_AWS_V2.2.1/Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/source/FreeRTOS_POSIX_mqueue.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DUSE_HAL_DRIVER -DUSE_WIFI '-DMBEDTLS_USER_CONFIG_FILE=<mbedtls_user_config.h>' -DENABLE_IMAGE_STATE_HANDLING -DDEBUG -DSTM32L4S5xx -D__BYTE_ORDER__=__ORDER_LITTLE_ENDIAN__ -c -I../../Inc -I../../config_files -I../../../../BootLoader_STSAFE/2_Images_SBSFU/SBSFU/App -I../../../../BootLoader_STSAFE/2_Images_SECoreBin/Inc -I../../../../BootLoader_STSAFE/Linker_Common/STM32CubeIDE -I../../../../../../../Middlewares/ST/STM32_Key_Management_Services/iKMS -I../../../../../../../Middlewares/ST/STM32_Secure_Engine/Core -I../../../../../../../Drivers/CMSIS/Device/ST/STM32L4xx/Include -I../../../../../../../Drivers/CMSIS/Include -I../../../../../../../Drivers/STM32L4xx_HAL_Driver/Inc -I../../../../../../../Drivers/STM32L4xx_HAL_Driver/Inc/Legacy -I../../../../../../../Drivers/BSPv2/B-L475E-IOT01 -I../../../../../../../Drivers/BSPv2/Components/es_wifi -I../../../../../../../Drivers/BSPv2/Components/hts221 -I../../../../../../../Drivers/BSPv2/Components/lis3mdl -I../../../../../../../Drivers/BSPv2/Components/lps22hb -I../../../../../../../Drivers/BSPv2/Components/lsm6dsl -I../../../../../../../Drivers/BSPv2/Components/vl53l0x -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/abstractions/wifi/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/abstractions/posix/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/3rdparty/tinycbor -I../../../../../../../Middlewares/Third_Party/amazon-freertos/demos/network_manager -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/aws/ota/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/demos/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/abstractions/secure_sockets/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/3rdparty/mbedtls/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/abstractions/pkcs11/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/3rdparty/http_parser -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/c_sdk/standard/common/include/private -I../../../../../../../Middlewares/Third_Party/amazon-freertos/freertos_kernel/portable/GCC/ARM_CM4F -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/3rdparty/jsmn -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/pkcs11/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/c_sdk/standard/serializer/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/c_sdk/aws/shadow/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/aws/ota/src -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/c_sdk/standard/https/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/abstractions/platform/freertos/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/freertos_kernel/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/demos/dev_mode_key_provisioning/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/aws/greengrass/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/aws/greengrass/src -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/c_sdk/standard/mqtt/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/c_sdk/standard/common/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/tls/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/abstractions/pkcs11/mbedtls -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/utils/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/abstractions/platform/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/c_sdk/aws/defender/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/crypto/include -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/3rdparty/pkcs11 -I../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/include -Os -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/FreeRTOS_POSIX_mqueue.d" -MT"Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/FreeRTOS_POSIX_mqueue.o"  -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/FreeRTOS_POSIX_mqueue.o"
arm-none-eabi-gcc: error: unrecognized command line option '-fcyclomatic-complexity'
make[1]: *** [Middlewares/amazon-freertos/libraries/freertos_plus/standard/utils/subdir.mk:22: Middlewares/amazon-freertos/libraries/freertos_plus/standard/utils/iot_pki_utils.o] Error 1
make[1]: *** Waiting for unfinished jobs....
arm-none-eabi-gcc: error: unrecognized command line option '-fcyclomatic-complexity'
make[1]: *** [Middlewares/amazon-freertos/libraries/freertos_plus/standard/utils/subdir.mk:24: Middlewares/amazon-freertos/libraries/freertos_plus/standard/utils/iot_system_init.o] Error 1
arm-none-eabi-gcc: error: unrecognized command line option '-fcyclomatic-complexity'
make[1]: *** [Middlewares/amazon-freertos/libraries/freertos_plus/standard/tls/subdir.mk:19: Middlewares/amazon-freertos/libraries/freertos_plus/standard/tls/iot_tls.o] Error 1
arm-none-eabi-gcc: error: unrecognized command line option '-fcyclomatic-complexity'
make[1]: *** [Middlewares/amazon-freertos/libraries/freertos_plus/standard/pkcs11/subdir.mk:19: Middlewares/amazon-freertos/libraries/freertos_plus/standard/pkcs11/iot_pkcs11.o] Error 1
arm-none-eabi-gcc: error: unrecognized command line option '-fcyclomatic-complexity'
make[1]: *** [Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/subdir.mk:49: Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/FreeRTOS_POSIX_clock.o] Error 1
arm-none-eabi-gcc: error: unrecognized command line option '-fcyclomatic-complexity'
make[1]: *** [Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/subdir.mk:51: Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/FreeRTOS_POSIX_mqueue.o] Error 1
make: *** [makefile:99: all] Error 2
"make -j24 all" terminated with exit code 2. Build might be incomplete.

Which was easy enough to solve, -fcyclomatic-complexity is a relatively new analysis feature for gcc, and that can be disabled via a checkbox in Project->properties->C/C++ Build->Settings->MCU GCC Compiler->Miscellaneous

So then when I try to build it again, I get the following errors:

In file included from C:/ST/QuickConnectTrue/STM32L4_AWS_QuickConnect/Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/utils/src/iot_system_init.c:30:0:
../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/abstractions/secure_sockets/include/iot_secure_sockets.h:54:10: fatal error: iot_secure_sockets_config_defaults.h: No such file or directory
 #include "iot_secure_sockets_config_defaults.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
arm-none-eabi-gcc "C:/ST/QuickConnectTrue/STM32L4_AWS_QuickConnect/Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/source/FreeRTOS_POSIX_unistd.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DUSE_HAL_DRIVER -DUSE_WIFI -DSENSOR '-DMBEDTLS_USER_CONFIG_FILE=<mbedtls_user_config.h>' -DENABLE_IMAGE_STATE_HANDLING -DDEBUG -DSTM32L4S5xx -D__BYTE_ORDER__=__ORDER_LITTLE_ENDIAN__ -c -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/FreeRTOS_POSIX_unistd.d" -MT"Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/FreeRTOS_POSIX_unistd.o"  -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/FreeRTOS_POSIX_unistd.o" @"Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/FreeRTOS_POSIX_unistd.c_includes.args"
make[1]: *** [Middlewares/amazon-freertos/libraries/freertos_plus/standard/utils/subdir.mk:24: Middlewares/amazon-freertos/libraries/freertos_plus/standard/utils/iot_system_init.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from C:/ST/QuickConnectTrue/STM32L4_AWS_QuickConnect/Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/source/FreeRTOS_POSIX_clock.c:36:0:
../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/include/FreeRTOS_POSIX.h:38:10: fatal error: FreeRTOS_POSIX_portable_default.h: No such file or directory
 #include "FreeRTOS_POSIX_portable_default.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from C:/ST/QuickConnectTrue/STM32L4_AWS_QuickConnect/Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/source/FreeRTOS_POSIX_pthread_barrier.c:35:0:
../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/include/FreeRTOS_POSIX.h:38:10: fatal error: FreeRTOS_POSIX_portable_default.h: No such file or directory
 #include "FreeRTOS_POSIX_portable_default.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from C:/ST/QuickConnectTrue/STM32L4_AWS_QuickConnect/Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/source/FreeRTOS_POSIX_mqueue.c:35:0:
../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/include/FreeRTOS_POSIX.h:38:10: fatal error: FreeRTOS_POSIX_portable_default.h: No such file or directory
 #include "FreeRTOS_POSIX_portable_default.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
C:/ST/QuickConnectTrue/STM32L4_AWS_QuickConnect/Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/tls/src/iot_tls.c:35:10: fatal error: iot_default_root_certificates.h: No such file or directory
 #include "iot_default_root_certificates.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/subdir.mk:49: Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/FreeRTOS_POSIX_clock.o] Error 1
In file included from C:/ST/QuickConnectTrue/STM32L4_AWS_QuickConnect/Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/source/FreeRTOS_POSIX_sched.c:32:0:
../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/include/FreeRTOS_POSIX.h:38:10: fatal error: FreeRTOS_POSIX_portable_default.h: No such file or directory
 #include "FreeRTOS_POSIX_portable_default.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from C:/ST/QuickConnectTrue/STM32L4_AWS_QuickConnect/Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/source/FreeRTOS_POSIX_pthread_cond.c:35:0:
../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/include/FreeRTOS_POSIX.h:38:10: fatal error: FreeRTOS_POSIX_portable_default.h: No such file or directory
 #include "FreeRTOS_POSIX_portable_default.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/subdir.mk:55: Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/FreeRTOS_POSIX_pthread_barrier.o] Error 1
make[1]: *** [Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/subdir.mk:51: Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/FreeRTOS_POSIX_mqueue.o] Error 1
make[1]: *** [Middlewares/amazon-freertos/libraries/freertos_plus/standard/tls/subdir.mk:19: Middlewares/amazon-freertos/libraries/freertos_plus/standard/tls/iot_tls.o] Error 1
In file included from C:/ST/QuickConnectTrue/STM32L4_AWS_QuickConnect/Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/source/FreeRTOS_POSIX_pthread.c:36:0:
../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/include/FreeRTOS_POSIX.h:38:10: fatal error: FreeRTOS_POSIX_portable_default.h: No such file or directory
 #include "FreeRTOS_POSIX_portable_default.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/subdir.mk:57: Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/FreeRTOS_POSIX_pthread_cond.o] Error 1
make[1]: *** [Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/subdir.mk:61: Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/FreeRTOS_POSIX_sched.o] Error 1
In file included from C:/ST/QuickConnectTrue/STM32L4_AWS_QuickConnect/Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/source/FreeRTOS_POSIX_semaphore.c:35:0:
../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/include/FreeRTOS_POSIX.h:38:10: fatal error: FreeRTOS_POSIX_portable_default.h: No such file or directory
 #include "FreeRTOS_POSIX_portable_default.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/ST/QuickConnectTrue/STM32L4_AWS_QuickConnect/Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/source/FreeRTOS_POSIX_pthread_mutex.c:36:0:
../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/include/FreeRTOS_POSIX.h:38:10: fatal error: FreeRTOS_POSIX_portable_default.h: No such file or directory
 #include "FreeRTOS_POSIX_portable_default.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
compilation terminated.
make[1]: *** [Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/subdir.mk:53: Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/FreeRTOS_POSIX_pthread.o] Error 1
In file included from C:/ST/QuickConnectTrue/STM32L4_AWS_QuickConnect/Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/source/FreeRTOS_POSIX_timer.c:35:0:
../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/include/FreeRTOS_POSIX.h:38:10: fatal error: FreeRTOS_POSIX_portable_default.h: No such file or directory
 #include "FreeRTOS_POSIX_portable_default.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/subdir.mk:59: Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/FreeRTOS_POSIX_pthread_mutex.o] Error 1
make[1]: *** [Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/subdir.mk:63: Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/FreeRTOS_POSIX_semaphore.o] Error 1
In file included from C:/ST/QuickConnectTrue/STM32L4_AWS_QuickConnect/Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/source/FreeRTOS_POSIX_unistd.c:32:0:
../../../../../../../Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/include/FreeRTOS_POSIX.h:38:10: fatal error: FreeRTOS_POSIX_portable_default.h: No such file or directory
 #include "FreeRTOS_POSIX_portable_default.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/subdir.mk:67: Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/FreeRTOS_POSIX_unistd.o] Error 1
make[1]: *** [Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/subdir.mk:65: Middlewares/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/FreeRTOS_POSIX_timer.o] Error 1
make: *** [makefile:101: all] Error 2

So now it appears that a couple critical headers are missing. for iot_secure_sockets_config_defaults.h, I searched and found it in STM32L4_AWS_QuickConnect\Projects\B-L4S5I-IOT01A\Applications\Cloud\aws_demos\STM32CubeIDE\Middlewares\amazon-freertos\libraries\abstractions\secure_sockets\include\ and discovered the secure_sockets directory wasn’t included, so I added that into the project, and then added the include path for the header, which got rid of that error.

For iot_default_root_certificates.h, I tried to set an include path to:
STM32L4_AWS_QuickConnect\Middlewares\Third_Party\amazon-freertos\libraries\c_sdk\standard\common\include\private, but that seemed to fail, so I copied the header file into a separate include directory.

And on to FreeRTOS_POSIX_portable_default.h, I have no clue why its not being picked up, especially as FreeRTOS_POSIX.h is raising the problem, and it exists in the exact same directory (Middlewares/Third_Party/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_posix/include/)

At this point, I gave up. I don’t know how much more tinkering, header file wrangling, include path fixing, etc. I need to do in order to get this to build, but it has taken a tremendous amount of time for me to still fail to build this. I tried to go with the premiere demo that is presented front and center on the FreeRTOS website (freertos org/quickconnect/index.html), and while the prebuilt executable demonstrating functionality works, the source code is enormously inaccessible and seemingly impossible to build.

Apologies for the delayed response. I tried building the code and I got the exact same errors as you. I was able to build the version X-CUBE-AWS v2.0.0 with the following changes -

  1. Include #include <sys/types.h> in sysmem.c to fix the caddr_t issue.
  2. Apply the solution described in this post.
  3. Build SBSFU porject first and then aws_demos next.

After this the project aws_demos builds but the signing in post build step still fails. I am reaching out to the people more familiar with QuickConnect.