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.