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):
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
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
- $(ProjectDir)/RP2040/Device/Include
- $(ProjectDir)/build/generated/pico_base
- $(ProjectDir)/sdk/boards/include
- $(ProjectDir)/sdk/common/boot_picoboot/include
- $(ProjectDir)/sdk/common/boot_uf2/include
- $(ProjectDir)/sdk/common/pico_base/include
- $(ProjectDir)/sdk/common/pico_binary_info/include
- $(ProjectDir)/sdk/common/pico_bit_ops/include
- $(ProjectDir)/sdk/common/pico_divider/include
- $(ProjectDir)/sdk/common/pico_stdlib/include
- $(ProjectDir)/sdk/common/pico_sync/include
- $(ProjectDir)/sdk/common/pico_time/include
- $(ProjectDir)/sdk/common/pico_usb_reset_interface/include
- $(ProjectDir)/sdk/common/pico_util/include
- $(ProjectDir)/sdk/rp2_common/boot_stage2/asminclude
- $(ProjectDir)/sdk/rp2_common/boot_stage2/include
- $(ProjectDir)/sdk/rp2_common/hardware_adc/include
- $(ProjectDir)/sdk/rp2_common/hardware_base/include
- $(ProjectDir)/sdk/rp2_common/hardware_claim/include
- $(ProjectDir)/sdk/rp2_common/hardware_clocks/include
- $(ProjectDir)/sdk/rp2_common/hardware_divider/include
- $(ProjectDir)/sdk/rp2_common/hardware_dma/include
- $(ProjectDir)/sdk/rp2_common/hardware_exception/include
- $(ProjectDir)/sdk/rp2_common/hardware_flash/include
- $(ProjectDir)/sdk/rp2_common/hardware_gpio/include
- $(ProjectDir)/sdk/rp2_common/hardware_i2c/include
- $(ProjectDir)/sdk/rp2_common/hardware_interp/include
- $(ProjectDir)/sdk/rp2_common/hardware_irq/include
- $(ProjectDir)/sdk/rp2_common/hardware_pio/include
- $(ProjectDir)/sdk/rp2_common/hardware_pll/include
- $(ProjectDir)/sdk/rp2_common/hardware_pwm/include
- $(ProjectDir)/sdk/rp2_common/hardware_resets/include
- $(ProjectDir)/sdk/rp2_common/hardware_rtc/include
- $(ProjectDir)/sdk/rp2_common/hardware_spi/include
- $(ProjectDir)/sdk/rp2_common/hardware_sync/include
- $(ProjectDir)/sdk/rp2_common/hardware_timer/include
- $(ProjectDir)/sdk/rp2_common/hardware_uart/include
- $(ProjectDir)/sdk/rp2_common/hardware_vreg/include
- $(ProjectDir)/sdk/rp2_common/hardware_watchdog/include
- $(ProjectDir)/sdk/rp2_common/hardware_xosc/include
- $(ProjectDir)/sdk/rp2_common/pico_bit_ops/include
- $(ProjectDir)/sdk/rp2_common/pico_bootrom/include
- $(ProjectDir)/sdk/rp2_common/pico_bootsel_via_double_reset/include
- $(ProjectDir)/sdk/rp2_common/pico_cxx_options/include
- $(ProjectDir)/sdk/rp2_common/pico_divider/include
- $(ProjectDir)/sdk/rp2_common/pico_double/include
- $(ProjectDir)/sdk/rp2_common/pico_fix/rp2040_usb_device_enumeration/include
- $(ProjectDir)/sdk/rp2_common/pico_float/include
- $(ProjectDir)/sdk/rp2_common/pico_int64_ops/include
- $(ProjectDir)/sdk/rp2_common/pico_malloc/include
- $(ProjectDir)/sdk/rp2_common/pico_mem_ops/include
- $(ProjectDir)/sdk/rp2_common/pico_multicore/include
- $(ProjectDir)/sdk/rp2_common/pico_platform/include
- $(ProjectDir)/sdk/rp2_common/pico_printf/include
- $(ProjectDir)/sdk/rp2_common/pico_runtime/include
- $(ProjectDir)/sdk/rp2_common/pico_standard_link/include
- $(ProjectDir)/sdk/rp2_common/pico_stdio/include
- $(ProjectDir)/sdk/rp2_common/pico_stdio_semihosting/include
- $(ProjectDir)/sdk/rp2_common/pico_stdio_uart/include
- $(ProjectDir)/sdk/rp2_common/pico_stdio_usb/include
- $(ProjectDir)/sdk/rp2_common/pico_stdlib/include
- $(ProjectDir)/sdk/rp2_common/pico_unique_id/include
- $(ProjectDir)/sdk/rp2040/hardware_structs/include
- $(ProjectDir)/sdk/rp2040/hardware_regs/include
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
