Skip to content

Pico don't reset automaticlly after programed on SDK 2.1.0 #2191

Closed
@Temperature6

Description

@Temperature6

With the same configure(cmake files, clion openocd download e.g.) ,pico will reset automaticlly after programed when I use sdk1.5.0, bug it doesn't work when I use SDK2.1.0

This is my pico_sdk_impot.cmake

# This is a copy of <PICO_SDK_PATH>/external/pico_sdk_import.cmake

# This can be dropped into an external project to help locate this SDK
# It should be include()ed prior to project()

#set(PICO_SDK_PATH "D:/EmbeddedDevelop/rpi_pico/sdk_151/pico-sdk")
set(PICO_SDK_PATH "D:/EmbeddedDevelop/rpi_pico/sdk_210/pico-sdk-2.1.0")

if (DEFINED ENV{PICO_SDK_PATH} AND (NOT PICO_SDK_PATH))
    set(PICO_SDK_PATH $ENV{PICO_SDK_PATH})
    message("Using PICO_SDK_PATH from environment ('${PICO_SDK_PATH}')")
endif ()

if (DEFINED ENV{PICO_SDK_FETCH_FROM_GIT} AND (NOT PICO_SDK_FETCH_FROM_GIT))
    set(PICO_SDK_FETCH_FROM_GIT $ENV{PICO_SDK_FETCH_FROM_GIT})
    message("Using PICO_SDK_FETCH_FROM_GIT from environment ('${PICO_SDK_FETCH_FROM_GIT}')")
endif ()
...........

I'd like to switch sdk version by comment and uncomment the "set" statement,

And this is my cmakelist.txt

cmake_minimum_required(VERSION 3.21)

set(PICO_BOARD pico)
set(PICO_PLATFORM rp2040)

# initialize the SDK based on PICO_SDK_PATH
# note: this must happen before project()
include(pico_sdk_import.cmake)


project(rp2040_sdk210_test C CXX ASM)


set(CMAKE_C_STANDARD 11)

# Initialize the SDK
pico_sdk_init()

add_executable(${PROJECT_NAME} main.c)
target_link_libraries(${PROJECT_NAME} pico_stdlib)

# create map/bin/hex/uf2 file in addition to ELF.
pico_add_extra_outputs(${PROJECT_NAME})

This clion openocd download settings is unchanged when I switch sdk version
Image

Am I forgetting what else I should configure?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions