Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8041

SDK • Re: Did pio .program <name> and pio <source-file-name>.pio requirements change from SDK 1.5 to 2.0?

$
0
0
I can't really make any predictions as to whether pioasm builds will work on windows
It used to, but these days there are pre-built executables which avoids the time consuming builds of those, but more importantly means a native compiler for Windows isn't required.

The pre-built executables are downloadable assets from https://github.com/raspberrypi/pico-sdk-tools/releases/

To use those; these lines need adding to the CMakeLists.txt' - but continue reading before doing so -

Code:

set(picotool_DIR $ENV{PICO_SDK_PATH}/../picotool)set(pioasm_DIR   $ENV{PICO_SDK_PATH}/tools/pioasm)
My problem was, because it was copy-and-paste Pi code, it didn't have either and I had to go digging and Googling to discover what I needed, and I didn't find the answer as quickly as I expected.

To avoid having to add those to every 'CMakeLists.txt' copied from a Pi, and allow continued use of 'cmake ..' on the command line, the pragmatic solution is to hack the '${PICO_SDK_PATH}/external/pico_sdk_import.cmake' file and add them to its end. Windows may require Notepad to be 'Run as Administrator' to allow that.

This is what I have at the bottom of my '${PICO_SDK_PATH}/external/pico_sdk_import.cmake' -

Code:

# .---------------------------------------------------------------.# | Set the pre-built tool paths for Windows - 32-bit or 64-bit  |# |---------------------------------------------------------------|# |# |if(WIN32)# |  set(picotool_DIR ${PICO_SDK_PATH}/../picotool)# |  set(pioasm_DIR   ${PICO_SDK_PATH}/tools/pioasm)# |  message("Setting Windows pre-built tool paths ...")# |  message("  picotool_DIR = ${picotool_DIR}")# |  message("  pioasm_DIR   = ${pioasm_DIR}")# |endif()# |# |# |# `---------------------------------------------------------------'
With that I now have Windows command line builds working, VS Code builds using 'CMake Tools' working, and also NotePad++ and Geany builds working.

Statistics: Posted by hippy — Sat Jul 26, 2025 10:52 am



Viewing all articles
Browse latest Browse all 8041

Trending Articles