[ARCHIVED] Follow-up on the previous topic "Is Pico SDK supported?"

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [ARCHIVED] Follow-up on the previous topic "Is Pico SDK supported?"

    New

    Hello,

    Thank you very much, with that, I have successfully configured SEGGER Embedded Studio to work with the SDK. I can now *externally* compile and then program/debug using a J-Link.

    First, I have downloaded and run pico-setup-windows, then I have created a copy of "Developer Command Prompt for Pico", renamed it to "SES with Pico Development Environment" and set it to run a copy of "pico-env.cmd" which in the end calls SES so that SES runs with all the necessary environment variables.

    From this point on, I run SES using that shortcut I have created.

    Then, I have installed the RP2040 CPU Support package using SEGGER Embedded Studio (SES) Package manager. Then, created an externally built executable project for RP2040.

    Then, using "Pico Project Generator", I have generated the project under my SES project folder which creates the main .c file, "CMakeLists.txt" file, "pico_sdk_import.cmake" file and the "build" directory. I also copied "src" folder of the sdk to the project directory and renamed it to "sdk".

    Then, in Project Settings for Common under SES, I have modified the "User Build Step" as in the attachment 1.

    Then, edited "User Include Directories" under "Preprocessor" in Project Settings for Common under SES as follows (the list is not complete but I was too lazy to add more, you can add more once you notice SES cannot index the functions you want):

    Source Code

    1. $(ProjectDir)/RP2040/Device/Include
    2. $(ProjectDir)/build/generated/pico_base
    3. $(ProjectDir)/sdk/boards/include
    4. $(ProjectDir)/sdk/common/boot_picoboot/include
    5. $(ProjectDir)/sdk/common/boot_uf2/include
    6. $(ProjectDir)/sdk/common/pico_base/include
    7. $(ProjectDir)/sdk/common/pico_binary_info/include
    8. $(ProjectDir)/sdk/common/pico_bit_ops/include
    9. $(ProjectDir)/sdk/common/pico_divider/include
    10. $(ProjectDir)/sdk/common/pico_stdlib/include
    11. $(ProjectDir)/sdk/common/pico_sync/include
    12. $(ProjectDir)/sdk/common/pico_time/include
    13. $(ProjectDir)/sdk/common/pico_usb_reset_interface/include
    14. $(ProjectDir)/sdk/common/pico_util/include
    15. $(ProjectDir)/sdk/rp2_common/boot_stage2/asminclude
    16. $(ProjectDir)/sdk/rp2_common/boot_stage2/include
    17. $(ProjectDir)/sdk/rp2_common/hardware_adc/include
    18. $(ProjectDir)/sdk/rp2_common/hardware_base/include
    19. $(ProjectDir)/sdk/rp2_common/hardware_claim/include
    20. $(ProjectDir)/sdk/rp2_common/hardware_clocks/include
    21. $(ProjectDir)/sdk/rp2_common/hardware_divider/include
    22. $(ProjectDir)/sdk/rp2_common/hardware_dma/include
    23. $(ProjectDir)/sdk/rp2_common/hardware_exception/include
    24. $(ProjectDir)/sdk/rp2_common/hardware_flash/include
    25. $(ProjectDir)/sdk/rp2_common/hardware_gpio/include
    26. $(ProjectDir)/sdk/rp2_common/hardware_i2c/include
    27. $(ProjectDir)/sdk/rp2_common/hardware_interp/include
    28. $(ProjectDir)/sdk/rp2_common/hardware_irq/include
    29. $(ProjectDir)/sdk/rp2_common/hardware_pio/include
    30. $(ProjectDir)/sdk/rp2_common/hardware_pll/include
    31. $(ProjectDir)/sdk/rp2_common/hardware_pwm/include
    32. $(ProjectDir)/sdk/rp2_common/hardware_resets/include
    33. $(ProjectDir)/sdk/rp2_common/hardware_rtc/include
    34. $(ProjectDir)/sdk/rp2_common/hardware_spi/include
    35. $(ProjectDir)/sdk/rp2_common/hardware_sync/include
    36. $(ProjectDir)/sdk/rp2_common/hardware_timer/include
    37. $(ProjectDir)/sdk/rp2_common/hardware_uart/include
    38. $(ProjectDir)/sdk/rp2_common/hardware_vreg/include
    39. $(ProjectDir)/sdk/rp2_common/hardware_watchdog/include
    40. $(ProjectDir)/sdk/rp2_common/hardware_xosc/include
    41. $(ProjectDir)/sdk/rp2_common/pico_bit_ops/include
    42. $(ProjectDir)/sdk/rp2_common/pico_bootrom/include
    43. $(ProjectDir)/sdk/rp2_common/pico_bootsel_via_double_reset/include
    44. $(ProjectDir)/sdk/rp2_common/pico_cxx_options/include
    45. $(ProjectDir)/sdk/rp2_common/pico_divider/include
    46. $(ProjectDir)/sdk/rp2_common/pico_double/include
    47. $(ProjectDir)/sdk/rp2_common/pico_fix/rp2040_usb_device_enumeration/include
    48. $(ProjectDir)/sdk/rp2_common/pico_float/include
    49. $(ProjectDir)/sdk/rp2_common/pico_int64_ops/include
    50. $(ProjectDir)/sdk/rp2_common/pico_malloc/include
    51. $(ProjectDir)/sdk/rp2_common/pico_mem_ops/include
    52. $(ProjectDir)/sdk/rp2_common/pico_multicore/include
    53. $(ProjectDir)/sdk/rp2_common/pico_platform/include
    54. $(ProjectDir)/sdk/rp2_common/pico_printf/include
    55. $(ProjectDir)/sdk/rp2_common/pico_runtime/include
    56. $(ProjectDir)/sdk/rp2_common/pico_standard_link/include
    57. $(ProjectDir)/sdk/rp2_common/pico_stdio/include
    58. $(ProjectDir)/sdk/rp2_common/pico_stdio_semihosting/include
    59. $(ProjectDir)/sdk/rp2_common/pico_stdio_uart/include
    60. $(ProjectDir)/sdk/rp2_common/pico_stdio_usb/include
    61. $(ProjectDir)/sdk/rp2_common/pico_stdlib/include
    62. $(ProjectDir)/sdk/rp2_common/pico_unique_id/include
    63. $(ProjectDir)/sdk/rp2040/hardware_structs/include
    64. $(ProjectDir)/sdk/rp2040/hardware_regs/include
    Display All

    I have then built the project and showed SES where to look for the binary as in attachment 2.

    And this is all! SEGGER Embedded Studio is now editing the files, running external CMake and nmake, and then programming AND also debugging the RP2040 :)
    Images
    • SES Project options.png

      17.32 kB, 867×648, viewed 7 times
    • SES Project options_2.png

      16.16 kB, 880×683, viewed 8 times
    • SES Debugging Action.png

      73.45 kB, 2,560×1,040, viewed 8 times
  • New

    Hello,

    Thank you for sharing your setup.
    Great to hear that the Pico SDK is now working with your ES Setup as expected.

    To keep this information available for other users as well we will now close and archive this thread.

    Happy debugging!

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.