Cmake failure with 20.11 AzureSphere SDK

Steve Osselton 21 Reputation points
2020-12-03T10:53:39.113+00:00

With the latest 20.11 SDK cmake fails as 20.11 has not been added to the set of supported SDK versions in /opt/azurespheresdk/CMakeFiles/AzureSphereToolchainBase.cmake

AzureSphereToolchainBase.cmake:set(sdks_2004_or_later "20.04" "20.07" "20.10")

Manually adding "20.11" to this list fixes the problem. Think the SDK needs an update. Realise this isn't actually a question, is there a better place to post bugs ?

Reference Documentation:
https://learn.microsoft.com/en-us/azure-sphere/app-development/using-cmake-functions

I quote "You must specify the Azure Sphere SDK version for your build by calling the azsphere_configure_tools "

Azure Sphere
Azure Sphere
An Azure internet of things security solution including hardware, operating system, and cloud components.
168 questions
{count} vote

3 answers

Sort by: Most helpful
  1. Steve Osselton 21 Reputation points
    2020-12-08T18:11:01.477+00:00

    If your CMakeLists.txt contains:

    azsphere_configure_tools (TOOLS_REVISION "20.11")

    Then a build will fail with:

    CMake Error at /opt/azurespheresdk/CMakeFiles/AzureSphere.cmake:38 (message):
    azsphere_configure_tools: unsupported tools version "20.11". Only
    ['20.04', '20.07', '20.10'] are supported.
    Call Stack (most recent call first):
    CMakeLists.txt:4 (azsphere_configure_tools)

    -- Configuring incomplete, errors occurred!

    This happens because /opt/azurespheresdk/CMakeFiles/AzureSphereToolchainBase.cmake does not contain a version entry for 20.11

    set(sdks_2004_or_later "20.04" "20.07" "20.10")

    This is what came with the 20.11 SDK install. Editing this file so you have:

    set(sdks_2004_or_later "20.04" "20.07" "20.10" "20.11")

    Then things work. CMake is just checking whether sdks_2004_or_later contains the specified TOOLS_REVISION - 20.11

    1 person found this answer helpful.

  2. Chandranmsft 856 Reputation points
    2020-12-09T22:11:08.937+00:00

    Hello Steve - Thanks for providing feedback on the SDK CMakeLists issue. Could you please share the documentation you mentioned in above response.

    ......and according to the documentation this means I should have in my cmake file:

    1 person found this answer helpful.

  3. AshokPeddakotla-MSFT 34,701 Reputation points
    2021-02-17T04:47:48.043+00:00

    @Steve Osselton Here is an update on this issue:

    We would like inform you that, this issue is being tracked for 21.02 release. Thanks for your understanding.

    Do let us know if you have any further queries, we would be happy to assist you.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.