I'm trying to link azure IoT freertos sdk library to my STM32F446 CubeMX project. I'm using Cmake as a build system. I've followed the steps given in the Github description:
my top level cmake file looks like this:
When running cmake it works fine and successfully generates make files for my project and Azure sdk, but when I'm trying to build it with make it gives an error shown in the attached log output.
Expected behavior
No response
Steps to reproduce the issue
No response
Relevant log output
cmake \
-G "MinGW Makefiles" \
-Bbuild \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_TOOLCHAIN_FILE=gcc-arm-none-eabi.cmake \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DDUMP_ASM=OFF
-- The C compiler identification is GNU 10.3.1
-- The CXX compiler identification is GNU 10.3.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/binaries/gcc-arm-none-eabi-10.3-2021.10-win32/gcc-arm-none-eabi-10.3-2021.10/bin/arm-none-eabi-gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/binaries/gcc-arm-none-eabi-10.3-2021.10-win32/gcc-arm-none-eabi-10.3-2021.10/bin/arm-none-eabi-g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The ASM compiler identification is GNU
-- Found assembler: C:/binaries/gcc-arm-none-eabi-10.3-2021.10-win32/gcc-arm-none-eabi-10.3-2021.10/bin/arm-none-eabi-gcc.exe
Vcpkg integrate step.
-- Read version from C:/Users/Dell/Desktop/CubeMx/makefile_test_project/libs/azure-iot-middleware-freertos/libraries/azure-sdk-for-c/sdk/inc/azure/core/az_version.h
-- AZ_SDK_VERSION_MAJOR 1
-- AZ_SDK_VERSION_MINOR 5
-- AZ_SDK_VERSION_PATCH 0
-- AZ_SDK_VERSION_PRERELEASE beta.1
-- Configuring done (1.5s)
-- Generating done (0.2s)
-- Build files have been written to: C:/Users/Dell/Desktop/CubeMx/makefile_test_project/build
C:/binaries/make-3.81/bin/make -C build --no-print-directory
[ 1%] Building C object libs/azure-iot-middleware-freertos/source/azure-sdk-for-c/sdk/src/azure/platform/CMakeFiles/az_noplatform.dir/az_noplatform.c.obj
[ 2%] Linking C static library libaz_noplatform.a
[ 2%] Built target az_noplatform
[ 3%] Building C object libs/azure-iot-middleware-freertos/source/azure-sdk-for-c/sdk/src/azure/core/CMakeFiles/az_core.dir/az_base64.c.obj
[ 4%] Building C object libs/azure-iot-middleware-freertos/source/azure-sdk-for-c/sdk/src/azure/core/CMakeFiles/az_core.dir/az_context.c.obj
[ 5%] Building C object libs/azure-iot-middleware-freertos/source/azure-sdk-for-c/sdk/src/azure/core/CMakeFiles/az_core.dir/az_http_pipeline.c.obj
[ 7%] Building C object libs/azure-iot-middleware-freertos/source/azure-sdk-for-c/sdk/src/azure/core/CMakeFiles/az_core.dir/az_http_policy.c.obj
[ 8%] Building C object libs/azure-iot-middleware-freertos/source/azure-sdk-for-c/sdk/src/azure/core/CMakeFiles/az_core.dir/az_http_policy_logging.c.obj
[ 9%] Building C object libs/azure-iot-middleware-freertos/source/azure-sdk-for-c/sdk/src/azure/core/CMakeFiles/az_core.dir/az_http_policy_retry.c.obj
[ 10%] Building C object libs/azure-iot-middleware-freertos/source/azure-sdk-for-c/sdk/src/azure/core/CMakeFiles/az_core.dir/az_http_request.c.obj
[ 11%] Building C object libs/azure-iot-middleware-freertos/source/azure-sdk-for-c/sdk/src/azure/core/CMakeFiles/az_core.dir/az_http_response.c.obj
[ 13%] Building C object libs/azure-iot-middleware-freertos/source/azure-sdk-for-c/sdk/src/azure/core/CMakeFiles/az_core.dir/az_json_reader.c.obj
[ 14%] Building C object libs/azure-iot-middleware-freertos/source/azure-sdk-for-c/sdk/src/azure/core/CMakeFiles/az_core.dir/az_json_token.c.obj
[ 15%] Building C object libs/azure-iot-middleware-freertos/source/azure-sdk-for-c/sdk/src/azure/core/CMakeFiles/az_core.dir/az_json_writer.c.obj
[ 16%] Building C object libs/azure-iot-middleware-freertos/source/azure-sdk-for-c/sdk/src/azure/core/CMakeFiles/az_core.dir/az_log.c.obj
[ 17%] Building C object libs/azure-iot-middleware-freertos/source/azure-sdk-for-c/sdk/src/azure/core/CMakeFiles/az_core.dir/az_precondition.c.obj
[ 19%] Building C object libs/azure-iot-middleware-freertos/source/azure-sdk-for-c/sdk/src/azure/core/CMakeFiles/az_core.dir/az_span.c.obj
[ 20%] Linking C static library libaz_core.a
[ 20%] Built target az_core
[ 21%] Building C object libs/azure-iot-middleware-freertos/source/azure-sdk-for-c/sdk/src/azure/iot/CMakeFiles/az_iot_common.dir/az_iot_common.c.obj
[ 22%] Linking C static library libaz_iot_common.a
[ 22%] Built target az_iot_common
[ 23%] Building C object libs/azure-iot-middleware-freertos/source/azure-sdk-for-c/sdk/src/azure/iot/CMakeFiles/az_iot_provisioning.dir/az_iot_provisioning_client.c.obj
[ 25%] Building C object libs/azure-iot-middleware-freertos/source/azure-sdk-for-c/sdk/src/azure/iot/CMakeFiles/az_iot_provisioning.dir/az_iot_provisioning_client_sas.c.obj
[ 26%] Linking C static library libaz_iot_provisioning.a
[ 26%] Built target az_iot_provisioning
[ 27%] Building C object libs/azure-iot-middleware-freertos/source/CMakeFiles/coremqtt.dir/__/libraries/coreMQTT/source/core_mqtt_serializer.c.obj
[ 28%] Building C object libs/azure-iot-middleware-freertos/source/CMakeFiles/coremqtt.dir/__/libraries/coreMQTT/source/core_mqtt_state.c.obj
[ 29%] Building C object libs/azure-iot-middleware-freertos/source/CMakeFiles/coremqtt.dir/__/libraries/coreMQTT/source/core_mqtt.c.obj
[ 30%] Linking C static library libcoremqtt.a
[ 30%] Built target coremqtt
[ 32%] Building C object libs/azure-iot-middleware-freertos/source/azure-sdk-for-c/sdk/src/azure/iot/CMakeFiles/az_iot_hub.dir/az_iot_adu_client.c.obj
[ 33%] Building C object libs/azure-iot-middleware-freertos/source/azure-sdk-for-c/sdk/src/azure/iot/CMakeFiles/az_iot_hub.dir/az_iot_hub_client.c.obj
[ 34%] Building C object libs/azure-iot-middleware-freertos/source/azure-sdk-for-c/sdk/src/azure/iot/CMakeFiles/az_iot_hub.dir/az_iot_hub_client_sas.c.obj
[ 35%] Building C object libs/azure-iot-middleware-freertos/source/azure-sdk-for-c/sdk/src/azure/iot/CMakeFiles/az_iot_hub.dir/az_iot_hub_client_telemetry.c.obj
[ 36%] Building C object libs/azure-iot-middleware-freertos/source/azure-sdk-for-c/sdk/src/azure/iot/CMakeFiles/az_iot_hub.dir/az_iot_hub_client_c2d.c.obj
[ 38%] Building C object libs/azure-iot-middleware-freertos/source/azure-sdk-for-c/sdk/src/azure/iot/CMakeFiles/az_iot_hub.dir/az_iot_hub_client_twin.c.obj
[ 39%] Building C object libs/azure-iot-middleware-freertos/source/azure-sdk-for-c/sdk/src/azure/iot/CMakeFiles/az_iot_hub.dir/az_iot_hub_client_methods.c.obj
[ 40%] Building C object libs/azure-iot-middleware-freertos/source/azure-sdk-for-c/sdk/src/azure/iot/CMakeFiles/az_iot_hub.dir/az_iot_hub_client_commands.c.obj
[ 41%] Building C object libs/azure-iot-middleware-freertos/source/azure-sdk-for-c/sdk/src/azure/iot/CMakeFiles/az_iot_hub.dir/az_iot_hub_client_properties.c.obj
[ 42%] Linking C static library libaz_iot_hub.a
[ 42%] Built target az_iot_hub
[ 44%] Building C object libs/azure-iot-middleware-freertos/source/CMakeFiles/az_iot_middleware_freertos.dir/azure_iot_adu_client.c.obj
[ 45%] Building C object libs/azure-iot-middleware-freertos/source/CMakeFiles/az_iot_middleware_freertos.dir/azure_iot_hub_client.c.obj
C:\Users\Dell\AppData\Local\Temp\cc1iBg8C.s: Assembler messages:
C:\Users\Dell\AppData\Local\Temp\cc1iBg8C.s:50: Error: selected processor does not support requested special purpose register -- `msr basepri,r3'
C:\Users\Dell\AppData\Local\Temp\cc1iBg8C.s:51: Error: selected processor does not support `isb ' in ARM mode
C:\Users\Dell\AppData\Local\Temp\cc1iBg8C.s:52: Error: selected processor does not support `dsb ' in ARM mode
C:\Users\Dell\AppData\Local\Temp\cc1iBg8C.s:176: Error: selected processor does not support requested special purpose register -- `msr basepri,r3'
C:\Users\Dell\AppData\Local\Temp\cc1iBg8C.s:177: Error: selected processor does not support `isb ' in ARM mode
C:\Users\Dell\AppData\Local\Temp\cc1iBg8C.s:178: Error: selected processor does not support `dsb ' in ARM mode
C:\Users\Dell\AppData\Local\Temp\cc1iBg8C.s:204: Error: selected processor does not support requested special purpose register -- `msr basepri,r3'
C:\Users\Dell\AppData\Local\Temp\cc1iBg8C.s:205: Error: selected processor does not support `isb ' in ARM mode
C:\Users\Dell\AppData\Local\Temp\cc1iBg8C.s:206: Error: selected processor does not support `dsb ' in ARM mode
C:\Users\Dell\AppData\Local\Temp\cc1iBg8C.s:304: Error: selected processor does not support requested special purpose register -- `msr basepri,r3'
C:\Users\Dell\AppData\Local\Temp\cc1iBg8C.s:305: Error: selected processor does not support `isb ' in ARM mode
C:\Users\Dell\AppData\Local\Temp\cc1iBg8C.s:306: Error: selected processor does not support `dsb ' in ARM mode
C:\Users\Dell\AppData\Local\Temp\cc1iBg8C.s:332: Error: selected processor does not support requested special purpose register -- `msr basepri,r3'
C:\Users\Dell\AppData\Local\Temp\cc1iBg8C.s:333: Error: selected processor does not support `isb ' in ARM mode
C:\Users\Dell\AppData\Local\Temp\cc1iBg8C.s:334: Error: selected processor does not support `dsb ' in ARM mode
make[3]: *** [libs/azure-iot-middleware-freertos/source/CMakeFiles/az_iot_middleware_freertos.dir/azure_iot_hub_client.c.obj] Error 1
make[2]: *** [libs/azure-iot-middleware-freertos/source/CMakeFiles/az_iot_middleware_freertos.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [build] Error 2
Code of Conduct
[X] I agree to follow this project's Code of Conduct
Is there an existing issue for this?
Version
1.1.0
Description of the issue
I'm trying to link azure IoT freertos sdk library to my STM32F446 CubeMX project. I'm using Cmake as a build system. I've followed the steps given in the Github description: my top level cmake file looks like this:
set(FREERTOS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/CubeMX/Middlewares/Third_Party CACHE STRING "") set(FREERTOS_PORT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/CubeMX/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F CACHE STRING "") set(CONFIG_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/config CACHE STRING "")
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/libs/azure-iot-middleware-freertos) target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE az::iot_middleware::freertos)
When running cmake it works fine and successfully generates make files for my project and Azure sdk, but when I'm trying to build it with make it gives an error shown in the attached log output.
Expected behavior
No response
Steps to reproduce the issue
No response
Relevant log output
Code of Conduct