Error when setting PicoSDK to 2.3.0

Sysprogs forums Forums VisualGDB Error when setting PicoSDK to 2.3.0

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #37368
    TerryR
    Participant

    On the VisualGDB Project Properties page I have a choice of Pico SDK 2.2.0 or 2.3.0.  If I choose 2.2.0 the cmake reloads, and I can compile my project. If I select 2.3.0 I get the following error during cmake reload…

    System.NullReferenceException: Object reference not set to an instance of an object.
    at q51.b(xe4 a)
    at iv.f.u(String a, String b)
    at fp2.g_2(ok3 a)
    at qs.j(List1 d, List1 e, String b, Boolean& a, y83& c)
    at qs.e()
    at gb2.k_2_2_2_2_2_2_2_2_2_2_2_2_2(of3 a, rv b)
    at vc2.o1(ToolchainSubtype a)
    at rv..ctor(VisualGDBProjectSettings2 h, fc1 a, xz e, l g, ku3 c, IDELevelProjectInfoForBuilding f, AlternateDebuggerSetup b, String d)
    at u04.h4(IDELevelProjectInfoForBuilding a)
    at u04.f3(lh3 a)
    at u04.a2(k b, Int32 a)

    It appears as though an object pointer somewhere is NULL?  I have no idea how to interpret that error message to identify the bad reference. Something to do with “ToolchainSubtype”?

    The 2.3.0 SDK was initially loaded using the Pico extension in VS Code, but I did an overwrite reload using VisualGDB; that didn’t fix the problem.

    If I use VS Code with the same CMakeLists.txt file, cmake loads, and it compiles O.K. The VS Code Pico extension adds a header to the CMakeLists.txt; I wrapped that in a conditional statement so that VisualGDB doesn’t process those cmake commands specific to VS Code. My VisualGDB project properties adds the “VisualGDB” cmake definition.

    if ( NOT DEFINED VisualGDB)
    # == DO NOT EDIT THE FOLLOWING LINES for the Raspberry Pi Pico VS Code Extension to work if(WIN32)
    set(USERHOME $ENV{USERPROFILE})
    else()
    set(USERHOME $ENV{HOME})
    endif()
    set(sdkVersion 2.3.0)
    set(toolchainVersion 15_2_Rel1)
    set(picotoolVersion 2.3.0)
    set(picoVscode ${USERHOME}/.pico-sdk/cmake/pico-vscode.cmake)
    if (EXISTS ${picoVscode})
    include(${picoVscode})
    endif()
    #====================================================================================
    endif()

     

    • This topic was modified 1 day ago by TerryR.
    #37370
    support
    Keymaster

    Hi,

    VisualGDB and the Pico VS Code extension use slightly different project formats. E.g. the VS Code extension hardcodes the SDK version in CMakeLists.txt, while VisualGDB stores it in its own properties file.

    You might be able to get it working by creating 2 projects side-by-side, and merging them one step at a time, but it could require some non-trivial troubleshooting and is generally not recommended.

    If you want full interoperability with VS Code, you may want to try VisualGDB for VS Code (visualgdb-vscode-0.0.1.vsix). It transparently translates the VS Code variables to CodeVROOM, so you can just click Open Workspace in VisualGDB inside VS Code, and immediately get the VisualGDB GUI for your project.

     

    Attachments:
    You must be logged in to view attached files.
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.