element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Blog Use the Pico RP2350 in RISC-V mode without Pico VSCode Extension: build
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
GPIO Pinout
Raspberry Pi Wishlist
Comparison Chart
Quiz
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 15 Dec 2025 5:49 PM Date Created
  • Views 107 views
  • Likes 7 likes
  • Comments 5 comments
Related
Recommended
  • raspberry
  • pico
  • pico_eurocard
  • vscode
  • sdk

Use the Pico RP2350 in RISC-V mode without Pico VSCode Extension: build

Jan Cumps
Jan Cumps
15 Dec 2025

Raspberry published a VSCode extension for the Pico family. It's very useful and makes for an easy experience. I use it a lot.
But for projects I publish, I prefer that there is no dependency on either VSCode or the extension. That makes it easier for users and contributors that use another (or no) IDE.

What does the extension do?

  • creates ready to use projects, empty or from examples
  • downloads toolchains, SDK, debugger, make tools "as required by your project"
  • lets you configure the board, which Pico controller, ARM vs RISC-V, 
  • lets you switch all of those later on
  • helps with build, debug
  • useful utilities

image

Why work without extension?

The extension leaves a footprint in your CMake file. Part of the inserted settings, I'd prefer not to have in a makefile that I publish on GitHub: SDK, toolchain and picotool version.

image
If you work with several users on the same project - or on multiple PCs - it would require that everyone uses the same version of these. While that may not be required for your project. This doesn't work well with version control and team efforts.
The rest of the extension footprint in the CMake file, I don't like either. But it doesn't put any restrictions on users with a different setup - or without the extension. I'm OK with those.

Second reason is that makefiles that don't rely on the extension are easier to use in GitHub Actions (and other continuous integration pipelines).

How do I use it?

I install the extension, because it's the easiest way on a Windows machine to get all required software. And the easiest way in VSCode to create a ready-to-go project.

When I create a project for myself, or something I want to try out, I use the extension. If that project has one single target, I use the full extension. If I want to create multiple firmware binaries (e.g.: an I2C and a SPI variant of the same project), I use the Extension, with CMake Tools enabled.

For a project that goes to GitHub, I use plain CMake scripts, without the extension. In VSCode, I then use the CMake Tools extension to manage toolchains, configure and build the project. This extension doesn't alter your build scripts.

An extension-less CMakeList example

This is an example script. It doesn't have undesired dependency versions in it:

cmake_minimum_required(VERSION 3.28)

set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 26)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmodules-ts -fcommon -fno-rtti -fno-exceptions")
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# path to PICO utilities (if needed)
if (NOT DEFINED ENV{PIOASM_DIR})
        message("PIOASM: set PIOASM_DIR env variable if you use PIO")
else()
        message("PIOASM: PIOASM_DIR env variable is set to '$ENV{PIOASM_DIR}'")
        set(pioasm_DIR $ENV{PIOASM_DIR})
endif()
if (NOT DEFINED ENV{PICOTOOL_DIR})
        message("PICOTOOL: set PICOTOOL_DIR env variable if you create uf2 output with pico_add_extra_outputs()")
else()
        message("PICOTOOL: PICOTOOL_DIR env variable is set to '$ENV{PICOTOOL_DIR}'")
        set(picotool_DIR $ENV{PICOTOOL_DIR})
endif()

set(PICO_PLATFORM rp2350-riscv CACHE STRING "Pico Platform")
set(PICO_BOARD pico2_w CACHE STRING "Board type")

include(pico_sdk_import.cmake)

project(pico2_riscv_cmake_example C CXX ASM)

pico_sdk_init()

add_executable(${CMAKE_PROJECT_NAME})
target_sources(${CMAKE_PROJECT_NAME}
        PUBLIC
        ${CMAKE_CURRENT_SOURCE_DIR}/source/main.cpp
)
target_sources(${CMAKE_PROJECT_NAME}
        PUBLIC
        FILE_SET cxx_modules TYPE CXX_MODULES FILES
)

target_link_libraries( ${CMAKE_PROJECT_NAME}
        pico_stdlib
)

There is version info in the fille (line 1 - 4). But they describe either a minimum version, or the standard used. You can use different toolchains or build infra, as long as they offer the required functionality or standard.

image

Config needed:

  • set the Pico SDK location with PICO_SDK_PATH environment variable
  • if you want .uf2 output: set picotool directory with PICOTOOL_DIR
  • if you use the PIO controllers, set pioasm directory with PIOASM_DIR

If you use the extension, these are set for you.

You can set them in your operating system, on the CMake command line (with -D<variable>=<value>) or in your IDE, if you use one, 
The image below shows how to set them in the VSCode CMake Tools extension:

image

  • debug config : a follow up post, I'll show how to get a PicoProbe / Pi Debug Probe working in VSCode, when a project doesn't use the extension.

Thank you for reading

  • Sign in to reply
  • scottiebabe
    scottiebabe 1 day ago in reply to Jan Cumps

    Example from other rp2350 project, here I apply an fir filter

    image

    which compiles into

    image

    vldmia: floating point load with address increment and writeback 

    vldr: floating point register load

    vfma.f32: floating point multiply and accumulate

    pretty lean and mean without any effort. On the rp2040 every floating point operation is a function call taking 70 to 100 cycles.

    The rp2350 would do the dsp just as fast, or faster than some of these widgets (though driving a large displays is a bit more complicated)

    image

    https://youtu.be/RmtHmtOozic?t=527 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps 1 day ago in reply to Jan Cumps

    > But before today, at least 10 failed and abandoned attempts, in a period of - say - a year

    Correction: 6 months:  Do you have a CMake script for Pico2 RISC that doesn't need the VSCode Pico Extension? 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps 1 day ago

    It looks straightforward once you have a working makefile (like the one in the main post here). But I struggled to get existing projects working with the RISC-V cores, without the extension. And once I got the build working, I had debug issues.

    The work in the post above is from 1 morning and 1 evening of development. I got a working build before my workday started. And a working debug in the evening, after the day job.
    But before today, at least 10 failed and abandoned attempts, in a period of - say - a year.

    The final exercise today - after resetting my brain a bit, because of rabbit holes -  almost wrote itself. 
    Without those mishaps this would not have been possible. The human brain is a strange vehicle ...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps 1 day ago in reply to scottiebabe

    Do you have to do any assembler code to harvest the gain? Or just target your build to Pico2 instead of Pico1?

    Follow-up question (I watch CSPAN Slight smile): good results on ARM and RISC-V?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • scottiebabe
    scottiebabe 1 day ago

    floating point on the rp2040 is so slow, the new rp2350 is a wonderful product.

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube