news 2026/5/7 22:26:30

树莓派Pico在‌wsl环境移植nuttx

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
树莓派Pico在‌wsl环境移植nuttx

参考

rp2040/index.html
rp2040.rst

下载文件解压并重命名

# nuttxhttps://ghproxy.net/https://github.com/apache/nuttx/archive/refs/tags/nuttx-12.13.0.zip# appshttps://ghproxy.net/https://github.com/apache/nuttx-apps/archive/refs/tags/nuttx-12.13.0.zip# pico-sdkgitclone https://github.com/raspberrypi/pico-sdk.git--depth1cdpico-sdkgitsubmodule update--init--depth1# picotool (生成uf2的工具)gitclone https://github.com/raspberrypi/picotool.gitcdpicotool/build cmake..-DPICO_SDK_PATH=../../pico-sdkmake-j20sudomakeinstall

或者

gitclone--branchreleases/12.13\https://github.com/apache/nuttx.git nuttx
gitclone--branchreleases/12.13\https://github.com/apache/nuttx-apps.git apps
gitclone\https://github.com/raspberrypi/pico-sdk.gitcdpico-sdkgitsubmodule update--init
gitclone\https://github.com/raspberrypi/picotool.git

文件列表

minglie@mingActionLab:~/workspace/nuttx_prj$lsapps nuttx pico-sdk picotool

编译nuttx

# 安装依赖minglie@mingActionLab:~/workspace/nuttx_prj/nuttx$sudoaptupdate minglie@mingActionLab:~/workspace/nuttx_prj/nuttx$sudoaptinstall-ygcc-arm-none-eabi# 选择目标板minglie@mingActionLab:~/workspace/nuttx_prj/nuttx$ ./tools/configure.sh raspberrypi-pico:nsh# 编译minglie@mingActionLab:~/workspace/nuttx_prj/nuttx$make-j$(nproc)CPP: /mnt/d/workspace/gitee/nuttx_prj/nuttx/boards/arm/rp2040/raspberrypi-pico/scripts/raspberrypi-pico-flash.ld->/mntLD: nuttx Memory region Used Size Region Size %age Used flash:152KB2MB7.42% sram:8308B264KB3.07% Generating: nuttx.uf2 Done# 编译make-j$(nproc)

拷贝到wokwi工程目录

cpnuttx.uf2 /mnt/d/workspace/gitee/0/ming_picoman/cmake-build-debug/

拷贝到开发板

minglie@mingActionLab:~/workspace/nuttx_prj/nuttx$cpnuttx.uf2 /mnt/f/

拷贝到wokwi工程

minglie@mingActionLab:~/workspace/nuttx_prj/nuttx$cpnuttx.uf2 /mnt/f/

wokwi 仿真

wokwi.toml

[wokwi] version = 1 firmware = "cmake-build-debug/nuttx.uf2" rfc2217ServerPort = 4000

diagram.json

{"version":1,"author":"wang minglie","editor":"wokwi","parts":[{"type":"wokwi-pi-pico","id":"pico","top":-137.55,"left":22.8,"attrs":{"builder":"pico-sdk"}},{"type":"board-ssd1306","id":"oled1","top":-102.46,"left":221.03,"attrs":{"i2cAddress":"0x3c"}},{"type":"wokwi-vcc","id":"vcc1","top":-220.04,"left":220.8,"attrs":{}},{"type":"wokwi-gnd","id":"gnd1","top":-201.6,"left":345,"attrs":{}}],"connections":[["pico:GP0","$serialMonitor:RX","",[]],["pico:GP1","$serialMonitor:TX","",[]],["oled1:VCC","vcc1:VCC","red",["v-28.8","h-19.05"]],["gnd1:GND","oled1:GND","black",["v-9.6","h-86.4"]],["pico:GP4","oled1:SDA","green",["h-38.4","v-86.4","h297.6","v9.6"]],["pico:GP5","oled1:SCL","green",["h-67.2","v-115.2","h307.2"]]],"dependencies":{}}

测试

nsh>ls/: dev/ proc/ nsh>cd/dev nsh>ls/dev: console null ttyS0 zero

查看编译进去的app

nsh>helphelpusage:help[-v][<cmd>].cpexitmkrdrmdirtrue[cmpexprmountsettruncate ?dirnamefalsemvkillunamealiasdatefdinfo pidofpkillumountunaliasdffreeprintfsleepunsetbasenamedmesghelppsusleepuptimebreakechohexdumppwdsourcewatchcatenvlsreboottestxdcdexecmkdirrmtimewaitBuiltin Apps:ddgetprime hello nsh ostestshnsh>
版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/5/7 22:23:57

基于IEEE 14节点标准模型的复合微电网模型,微电网包括柴油发电机、光伏模型、电池储能系统、电弧炉等非线性负载附Simulink仿真

✅作者简介&#xff1a;热爱科研的Matlab仿真开发者&#xff0c;擅长毕业设计辅导、数学建模、数据处理、程序设计科研仿真。 &#x1f34e;完整代码获取 定制创新 论文复现点击&#xff1a;Matlab科研工作室 &#x1f447; 关注我领取海量matlab电子书和数学建模资料 &…

作者头像 李华
网站建设 2026/5/7 22:23:36

国产替代之NDBA100N10BT4H与VBL1105参数对比报告

N沟道功率MOSFET参数对比分析报告一、产品概述NDBA100N10BT4H&#xff1a;安森美&#xff08;onsemi&#xff09;N沟道100V功率MOSFET&#xff0c;具有极低导通电阻&#xff08;典型6.9mΩ15V&#xff09;&#xff0c;高电流能力&#xff08;连续100A&#xff09;&#xff0c;以…

作者头像 李华
网站建设 2026/5/7 22:23:33

FastAgent框架实战:从零构建LLM智能体应用的核心指南

1. 项目概述与核心价值最近在折腾大语言模型应用开发的朋友&#xff0c;估计都绕不开一个词&#xff1a;Agent。从简单的聊天机器人到能自主规划、调用工具完成复杂任务的智能体&#xff0c;这个概念火得不行。但说实话&#xff0c;很多框架要么上手门槛高&#xff0c;要么性能…

作者头像 李华
网站建设 2026/5/7 22:18:52

精馏塔温度系统的解耦控制策略【附代码】

✨ 本团队擅长数据搜集与处理、建模仿真、程序设计、仿真代码、EI、SCI写作与指导&#xff0c;毕业论文、期刊论文经验交流。 ✅ 专业定制毕设、代码 ✅ 如需沟通交流&#xff0c;查看文章底部二维码&#xff08;1&#xff09;逆解耦器与线性自抗扰控制相结合的控制方案&#x…

作者头像 李华
网站建设 2026/5/7 22:17:34

求职综合征的本质的庖丁解牛

它的本质是&#xff1a;个体在从“职业身份”向“市场商品”转化的过程中&#xff0c;因遭遇 不确定性 (Uncertainty)、被评估感 (Being Evaluated) 和 控制感丧失 (Loss of Control) 而引发的一种 适应性应激障碍 (Adaptive Stress Disorder)。它不是因为你“不够好”&#xf…

作者头像 李华