1. 系统与工具要求

PC平台: Windows 11 专业版

Windows GCC: gcc-15.1.0-64.exe

GNU Make: 4.3

Git: 2.49.0

cmake: 4.0.2

python:3.12.11

Arm GNU Toolchain Downloads – Arm Developer

 2. 工具安装与验证

2.1 工具安装

winget安装依赖工具(Windows Package Manager)

管理员身份 打开 cmd.exe或者PowerShell,运行:

winget install Kitware.CMake Ninja-build.Ninja python Git.Git 7zip.7zip Arm.GnuArmEmbeddedToolchain

windows安装包下载临时目录

C:\Users\Administrator\AppData\Local\Temp\WinGet

安装日志:

Microsoft Windows [版本 10.0.26100.4061]
(c) Microsoft Corporation。保留所有权利。C:\Users\Administrator>winget install Kitware.CMake Ninja-build.Ninja python Git.Git 7zip.7zip
找到已安装的现有包。正在尝试升级已安装的包...
找到已安装的现有包。正在尝试升级已安装的包...
找不到可用的升级。
配置的源中没有可用的较新的包版本。
已安装程序包: Ninja-build.Ninja
找到已安装的现有包。正在尝试升级已安装的包...
找不到可用的升级。
配置的源中没有可用的较新的包版本。
已安装程序包: python
找到已安装的现有包。正在尝试升级已安装的包...
找不到可用的升级。
配置的源中没有可用的较新的包版本。
已安装程序包: Git.Git
(1/1) 已找到 CMake [Kitware.CMake] 版本 4.0.3
此应用程序由其所有者授权给你。
Microsoft 对第三方程序包概不负责,也不向第三方程序包授予任何许可证。
正在下载 https://github.com/Kitware/CMake/releases/download/v4.0.3/cmake-4.0.3-windows-x86_64.msi██████████████████████████████  32.9 MB / 32.9 MB
已成功验证安装程序哈希
正在启动程序包安装...
已成功安装

GCC/Make安装

从http://www.equation.com/servlet/equation.cmd?fa=fortra 下载gcc套件,gcc套件内包含make,因为编译picotool需要gcc所以一并就装了这俩。

解压gcc套件,比如默认按照在了个人账户目录内为 C:\Users\Administrator\gcc

ARM GNU Toolchain:

arm-gnu-toolchain-14.2.rel1-mingw-w64-x86_64-arm-none-eabi.zip

7z.exe x "arm-gnu-toolchain-14.2.rel1-mingw-w64-x86_64-arm-none-eabi.zip" -o"arm-gnu-toolchain-14.2" -y

 2.2 工具验证

验证方法:

命令行中输入以下指令,会打印出版本信息

make -v
GNU Make 4.3cmake --version
cmake version 4.0.2git -v
git version 2.49.0.windows.1python -V
Python 3.12.11arm-none-eabi-gcc -v

3 SDK环境搭建

3.1 官方参考文档

在github中获取树莓派pico的sdk和example(内容可参考树莓派pico提供的资料)

pico/getting-started-with-pico.pdf

pico/pico-datasheet.pdf

pico/raspberry-pi-pico-c-sdk.pdf

pico/raspberry-pi-pico-python-sdk.pdf

rp2040/hardware-design-with-rp2040.pdf

rp2040/rp2040-datasheet.pdf

3.2 SDK源码获取

可通过官网获取以下信息

sdk github链接https://github.com/raspberrypi/pico-sdk

example github链接https://github.com/raspberrypi/pico-examples

通过git下载好sdk和example,进入pico-sdk中,git执行此条指令

git submodule update --init

该过程是更新sdk中第三方的库,例如usb、wifi等,更新内容在pico_sdk lib文件夹

3.3 编译

首先添加一下sdk环境变量将pico-sdk的文件路径添加PICO_SDK_PATH。

进入pico-examples参考工程目录

# 进入pico-examples文件夹中
cd D:\workspace\raspberrypi\pico-examples\
# 创建build目录
mkdir build
# 进入到build目录
cd build
# 生成Makefile文件
D:\workspace\raspberrypi\pico-examples\build>cmake -G "MinGW Makefiles" ..
Using PICO_SDK_PATH from environment ('D:\workspace\raspberrypi\pico-sdk')
PICO_SDK_PATH is D:/workspace/raspberrypi/pico-sdk
Defaulting platform (PICO_PLATFORM) to 'rp2040' since not specified.
Defaulting target board (PICO_BOARD) to 'pico' since not specified.
Using board configuration from D:/workspace/raspberrypi/pico-sdk/src/boards/include/boards/pico.h
Pico Platform (PICO_PLATFORM) is 'rp2040'.
-- Defaulting build type to 'Release' since not specified.
Defaulting compiler (PICO_COMPILER) to 'pico_arm_cortex_m0plus_gcc' since not specified.
Configuring toolchain based on PICO_COMPILER 'pico_arm_cortex_m0plus_gcc'
Defaulting PICO_GCC_TRIPLE to 'arm-none-eabi'
-- The C compiler identification is GNU 14.2.1
-- The CXX compiler identification is GNU 14.2.1
-- The ASM compiler identification is GNU
-- Found assembler: D:/workspace/zephyrproject/zephyr-sdk/arm-none-eabi-gcc-14.2.1/bin/arm-none-eabi-gcc.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: D:/workspace/zephyrproject/zephyr-sdk/arm-none-eabi-gcc-14.2.1/bin/arm-none-eabi-gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: D:/workspace/zephyrproject/zephyr-sdk/arm-none-eabi-gcc-14.2.1/bin/arm-none-eabi-g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Build type is Release
-- Found Python3: C:/Users/Administrator/AppData/Local/Programs/Python/Python313/python.exe (found version "3.13.4") found components: Interpreter
TinyUSB available at D:/workspace/raspberrypi/pico-sdk/lib/tinyusb/src/portable/raspberrypi/rp2040; enabling build support for USB.
BTstack available at D:/workspace/raspberrypi/pico-sdk/lib/btstack
cyw43-driver available at D:/workspace/raspberrypi/pico-sdk/lib/cyw43-driver
lwIP available at D:/workspace/raspberrypi/pico-sdk/lib/lwip
mbedtls available at D:/workspace/raspberrypi/pico-sdk/lib/mbedtls
CMake Warning at D:/workspace/raspberrypi/pico-sdk/tools/Findpicotool.cmake:30 (message):No installed picotool with version 2.1.1 found - building from sourceIt is recommended to build and install picotool separately, or to setPICOTOOL_FETCH_FROM_GIT_PATH to a common directory for all your SDKprojects
Call Stack (most recent call first):D:/workspace/raspberrypi/pico-sdk/tools/CMakeLists.txt:138 (find_package)D:/workspace/raspberrypi/pico-sdk/tools/CMakeLists.txt:493 (pico_init_picotool)D:/workspace/raspberrypi/pico-sdk/src/cmake/on_device.cmake:56 (picotool_postprocess_binary)blink/CMakeLists.txt:13 (pico_add_extra_outputs)# 由于下载https://github.com/raspberrypi/picotool.git非常困难
# 这里需要修改pico-sdk目录下的tools/Findpicotool.cmake文件
# 使用https://gitee.com/msntec/picotool.git镜像源替换
Downloading Picotool
Only building blink_any for non W boards as PICO_CYW43_SUPPORTED is not set
Skipping encrypted example which is unsupported on this platform
Skipping hello_dcp example which is unsupported on this platform
Skipping runtime_flash_permissions example which is unsupported on this platform
Skipping dvi_out_hstx_encoder example which is unsupported on this platform
Skipping spi_lcd example which is unsupported on this platform
Skipping multicore_doorbell example which is unsupported on this platform
Skipping hello_otp example which is unsupported on this platform
Skipping boot_info example which is unsupported on this platform
Skipping universal examples as PICO_RISCV_TOOLCHAIN_PATH and PICO_ARM_TOOLCHAIN_PATH are not defined
Skipping TinyUSB dual examples, as TinyUSB hw/mcu/raspberry_pi/Pico-PIO-USB submodule unavailable
Skipping SHA256 examples as pico_sha256 or pico_mbedtls unavailable
Skipping FreeRTOS examples as FREERTOS_KERNEL_PATH not defined
-- Configuring done (53.7s)
-- Generating done (30.2s)
-- Build files have been written to: D:/workspace/raspberrypi/pico-examples/build

 会遇到pico-tool下载问题,请使用下面资源替代

D:\msys64\home\Weston\pico-sdk> git diff tools/Findpicotool.cmake
warning: in the working copy of 'tools/Findpicotool.cmake', LF will be replaced by CRLF the next time Git touches it
diff --git a/tools/Findpicotool.cmake b/tools/Findpicotool.cmake
index e5bfaea..cbc2e3a 100644
--- a/tools/Findpicotool.cmake
+++ b/tools/Findpicotool.cmake
@@ -36,7 +36,7 @@ if (NOT TARGET picotool)message("Downloading Picotool")FetchContent_Populate(picotool QUIET
-            GIT_REPOSITORY https://github.com/raspberrypi/picotool.git
+            GIT_REPOSITORY https://gitee.com/msntec/picotool.gitGIT_TAG developSOURCE_DIR ${picotool_INSTALL_DIR}/picotool-src

进入到build目录下的blink工程

接着执行编译指令,不出意外,接着就是刷刷的编译时间

make -j4Building ASM object pico-sdk/src/rp2040/boot_stage2/CMakeFiles/bs2_default.dir/compile_time_choice.S.obj
Built target picotoolForceReconfigure
Creating directories for 'picotoolBuild'
Linking ASM executable bs2_default.elf
No download step for 'picotoolBuild'
No update step for 'picotoolBuild'
Built target bs2_default
No patch step for 'picotoolBuild'
Generating bs2_default.bin
Generating bs2_default_padded_checksummed.S
Performing configure step for 'picotoolBuild'
Not searching for unused variables given on the command line.
Building ASM object pico-sdk/src/rp2040/boot_stage2/CMakeFiles/bs2_default_library.dir/bs2_default_padded_checksummed.S.obj
Built target bs2_default_library
-- The C compiler identification is GNU 15.1.0
-- The CXX compiler identification is GNU 15.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Users/Administrator/gcc/bin/gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Users/Administrator/gcc/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using the single-header code from D:/workspace/raspberrypi/pico-examples/build/_deps/picotool-src/lib/nlohmann_json/single_include/
PICOTOOL_NO_LIBUSB is set - no USB support will be built
-- Configuring done (5.3s)
-- Generating done (0.4s)
-- Build files have been written to: D:/workspace/raspberrypi/pico-examples/build/_deps/picotool-build
Performing build step for 'picotoolBuild'
-- The C compiler identification is GNU 15.1.0
[  2%] Built target errors
-- The C compiler identification is GNU 15.1.0
-- The CXX compiler identification is GNU 15.1.0
-- The CXX compiler identification is GNU 15.1.0
-- The ASM compiler identification is GNU
-- The ASM compiler identification is GNU
-- Found assembler: C:/Users/Administrator/gcc/bin/gcc.exe
-- Found assembler: C:/Users/Administrator/gcc/bin/gcc.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Users/Administrator/gcc/bin/gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working C compiler: C:/Users/Administrator/gcc/bin/gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Users/Administrator/gcc/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working CXX compiler: C:/Users/Administrator/gcc/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Using precompiled enc_bootloader.elf
-- Configuring done (4.3s)
-- Generating done (0.0s)
-- Build files have been written to: D:/workspace/raspberrypi/pico-examples/build/_deps/picotool-build/enc_bootloader
Using precompiled enc_bootloader.elf
-- Configuring done (4.4s)
-- Generating done (0.0s)
-- Build files have been written to: D:/workspace/raspberrypi/pico-examples/build/_deps/picotool-build/enc_bootloader_mbedtls
[  4%] Built target elf
[ 11%] Built target enc_bootloader
[ 18%] Built target enc_bootloader_mbedtls
[ 20%] Built target embedded_data_no_libusb
[ 22%] Built target elf2uf2
[ 90%] Built target mbedtls
[ 92%] Built target bintool
[100%] Built target picotool
Performing install step for 'picotoolBuild'
[  2%] Built target errors
[ 70%] Built target mbedtls
[ 72%] Built target elf
[ 79%] Built target enc_bootloader
[ 81%] Built target elf2uf2
[ 88%] Built target enc_bootloader_mbedtls
[ 90%] Built target bintool
[ 92%] Built target embedded_data_no_libusb
[100%] Built target picotool
Install the project...
-- Install configuration: "Release"
Performing test step for 'picotoolBuild'
picotool v2.1.2-develop (Windows, GNU-15.1.0, Release)
Completed 'picotoolBuild'
Built target picotoolBuild
Building C object blink/CMakeFiles/blink.dir/blink.c.obj
......
......
Linking CXX executable blink.elf
Built target blinkD:\workspace\raspberrypi\pico-examples\build\blink>dirVolume in drive D is DATAVolume Serial Number is 0EFA-D4A2Directory of D:\workspace\raspberrypi\pico-examples\build\blink2025/06/18  21:08    <DIR>          .
2025/06/18  21:06    <DIR>          ..
2025/06/18  21:08             6,764 blink.bin
2025/06/18  21:08           125,987 blink.dis
2025/06/18  21:08           351,204 blink.elf
2025/06/18  21:08           398,194 blink.elf.map
2025/06/18  21:08            19,091 blink.hex
2025/06/18  21:08            13,824 blink.uf2
2025/06/18  21:07    <DIR>          CMakeFiles
2025/06/18  21:05             1,551 cmake_install.cmake
2025/06/18  21:05           118,156 Makefile
2025/06/18  21:05    <DIR>          picotool8 File(s)      1,034,771 bytes4 Dir(s)  3,577,542,651,904 bytes free

下载方法:按住BOOT键进行上电,使电脑弹出虚拟U盘,将.uf2文件拖拽到树莓派pico的虚拟U盘中,这时树莓派pico会自动重启,运行下载后的程序。

到此,整个树莓派pico的基础环境就算搭建完成啦。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:http://www.pswp.cn/pingmian/85263.shtml
繁体地址,请注明出处:http://hk.pswp.cn/pingmian/85263.shtml
英文地址,请注明出处:http://en.pswp.cn/pingmian/85263.shtml

如若内容造成侵权/违法违规/事实不符,请联系英文站点网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【C语言极简自学笔记】重讲运算符

一、算术操作符 算术操作符描述把两个操作数相加-第一个操作数减去第二个操作数*把两个操作数相乘/分子除以分母%取模运算符&#xff0c;整除后的余数 注意&#xff1a;1.除号的两端都是整数的时候执行的是整数的除法&#xff0c;两端只要有一个浮点数&#xff0c;就执行浮点…

持续集成 CI/CD-Jenkins持续集成GitLab项目打包docker镜像推送k8s集群并部署至rancher

Jenkins持续集成GitLab项目 GitLab提交分支后触发Jenkis任务 之前是通过jar包在shell服务器上进行手动部署&#xff0c;麻烦且耗时。现通过Jenkins进行持续集成实现CI/CD。以test分支为例 提交即部署。 由于是根据自己实际使用过程 具体使用到了 gitlabjenkinsdockerharborra…

Apache Iceberg与Hive集成:非分区表篇

引言 在大数据处理领域&#xff0c;Apache Iceberg凭借其先进的表格式设计&#xff0c;为大规模数据分析带来了新的可能。当Iceberg与Hive集成时&#xff0c;这种强强联合为数据管理与分析流程提供了更高的灵活性和效率。本文将聚焦于Iceberg与Hive集成中的非分区表场景&#…

webpack 如何区分开发环境和生产环境

第一种方法: 方法出处&#xff1a;命令行接口&#xff08;CLI&#xff09; | webpack 中文文档 1.利用webpack.config.js 返回的是个函数&#xff0c;利用函数的参数&#xff0c;来区分环境 具体步骤 1&#xff09; package.json文件&#xff1a;在npm scripts 命令后面追加 …

React组件通信——context(提供者/消费者)

Context 是 React 提供的一种组件间通信方式&#xff0c;主要用于解决跨层级组件 props 传递的问题。它允许数据在组件树中"跨级"传递&#xff0c;无需显式地通过每一层 props 向下传递。 一、Context 核心概念 1. 基本组成 React.createContext&#xff1a;创建 C…

“微信短剧小程序开发指南:从架构设计到上线“

1. 引言&#xff1a;短剧市场的机遇与挑战 近年来&#xff0c;短视频和微短剧市场呈现爆发式增长&#xff0c;用户碎片化娱乐需求激增。短剧小程序凭借轻量化、社交传播快、变现能力强等特点&#xff0c;成为内容创业的新风口。然而&#xff0c;开发一个稳定、流畅且具备商业价…

RPC与RESTful对比:两种API设计风格的核心差异与实践选择

# RPC与RESTful对比&#xff1a;两种API设计风格的核心差异与实践选择 ## 一、架构哲学与设计目标差异 1. **RPC&#xff08;Remote Procedure Call&#xff09;** - **核心思想**&#xff1a;将远程服务调用伪装成本地方法调用&#xff08;方法导向&#xff09; - 典型行为…

【pytest进阶】pytest之钩子函数

什么是 hook (钩子)函数 经常会听到钩子函数(hook function)这个概念,最近在看目标检测开源框架mmdetection,里面也出现大量Hook的编程方式,那到底什么是hook?hook的作用是什么? what is hook ?钩子hook,顾名思义,可以理解是一个挂钩,作用是有需要的时候挂一个东西…

深度学习计算——动手学深度学习5

环境&#xff1a;PyCharm python3.8 1. 层和块 块&#xff08;block&#xff09;可以描述 单个层、由多个层组成的组件或整个模型本身。 使用块进行抽象的好处&#xff1a; 可将块组合成更大的组件(这一过程通常是递归) 如 图5.1.1所示。通过定义代码来按需生成任意复杂度…

NodeJS的fs模块的readFile和createReadStream区别以及常见方法

Node.js 本身没有像 Java 那样严格区分字符流和字节流&#xff0c;区别主要靠编码&#xff08;encoding&#xff09;来控制数据是以 Buffer&#xff08;二进制字节&#xff09;形式还是字符串&#xff08;字符&#xff09;形式处理。 详细解释&#xff1a; 方面JavaNode.js字节…

基于二进制XOR运算的机器人运动轨迹与对称图像自动生成算法

原创&#xff1a;项道德&#xff08;daode3056,daode1212&#xff09; 新的算法出现&#xff0c;往往能给某些行业与产业带来革命与突破。为探索机器人运动轨迹与对称图像自动生成算法&#xff0c;本人已经通过18种算法的测试&#xff0c;最终&#xff0c;以二进制的XOR运算为…

Spring AI 项目实战(七):Spring Boot + Spring AI Tools + DeepSeek 智能工具平台(附完整源码)

系列文章 序号文章名称1Spring AI 项目实战(一):Spring AI 核心模块入门2Spring AI 项目实战(二):Spring Boot + AI + DeepSeek 深度实战(附完整源码)3Spring AI 项目实战(三):Spring Boot + AI + DeepSeek 打造智能客服系统(附完整源码)4Spring AI 项目实战(四…

spring-webmvc @RequestHeader 典型用法

典型用法 基础用法&#xff1a;获取指定请求头值 GetMapping("/info") public String getInfo(RequestHeader("User-Agent") String userAgent) {return "User-Agent: " userAgent; }如果请求中包含 User-Agent 请求头&#xff0c;则其值将被…

Ubuntu:20.04中安装docker

是的&#xff0c;您列出的命令是完整的安装步骤&#xff0c;但为了确保100%可靠性和处理可能的问题&#xff0c;我建议进行以下优化和补充&#xff1a; 完整优化的安装脚本&#xff08;包含错误处理和验证&#xff09; #!/bin/bash# 1. 彻底清理旧版本和配置 sudo apt remove…

大数据实时风控引擎:Spark Streaming、Kafka、Flink与Doris的融合实践

大数据实时风控引擎&#xff1a;Spark Streaming、Kafka、Flink与Doris的融合实践 在数字金融、电商交易与在线服务的核心战场&#xff0c;风险控制能力已成为业务的生命线。传统批量风控模式在应对瞬息万变的欺诈攻击、信用风险时捉襟见肘。本文将深入探讨如何利用**Spark St…

【创龙瑞芯微 RK3576 全国产 ARM 八核 2.2GHz 工业开发板-硬件说明书】

前 言 本文主要介绍TL3576-EVM评估板硬件接口资源以及设计注意事项等内容。 RK3576J/RK3576处理器的IO电平标准一般为1.8V、3.3V,上拉电源一般不超过3.3V或1.8V,当外接信号电平与IO电平不匹配时,中间需增加电平转换芯片或信号隔离芯片。按键或接口需考虑ESD设计,ESD器件…

一文吃透ADB,从入门到精通

目录 一、ADB 简介1.1 什么是 ADB1.2 ADB 的工作原理1.3 ADB 的安装与环境配置 二、ADB 基础命令2.1 设备连接相关命令2.2 应用管理命令2.3 文件传输命令 三、ADB 高级命令3.1 ADB Shell 深入探究3.2 日志查看与分析3.3 设备信息获取3.4 屏幕操作与录制 四、ADB 常见问题与解决…

PostgreSQL高可用架构设计与实践指南

# PostgreSQL高可用架构设计与实践指南 ## 一、高可用性核心诉求 PostgreSQL作为企业级关系型数据库&#xff0c;高可用设计需要满足以下关键指标&#xff1a; - 故障恢复时间&#xff08;RTO&#xff09;&#xff1a;秒级到分钟级自动切换能力 - 数据损失容忍度&#xff0…

今天我想清楚了

首先说一声抱歉&#xff0c;很多天没有更新了&#xff0c;因为在我这里&#xff0c;我的内心感到迷茫&#xff0c;从来没有这样过&#xff0c;不知道为什么自己一直要做的事&#xff0c;进度太慢了&#xff0c;因为我的人生是空虚的&#xff0c;我感觉我做的不够好&#xff0c;…

代码随想录day3链表1

new关键字 1.new是一个关键字&#xff0c;用于开辟空间&#xff0c;开辟的空间在堆上&#xff0c;而一般声明的变量存放在栈上&#xff1b; 2.new得到的是一段空间的首地址。所以一般需要用指针来存放这段地址 new int(10);//返回new出来这块内存的地址int *pnew int(10);//…