# Raspberry pi pico led blinking Host Machine: Ubuntu 18.04 ## 建立流程 ### 建立基本環境 ```bash= cd ~ mkdir pico cd pico git clone -b master https://github.com/raspberrypi/pico-sdk.git cd pico-sdk git submodule update --init cd .. git clone -b master https://github.com/raspberrypi/pico-examples.git sudo apt install doxygen ``` ### 取得toolchain ```bash= sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential ``` ### 以blink範例為例 ```bash= cd pico-examples mkdir build cd build export PICO_SDK_PATH=../../pico-sdk cmake .. cd blink make cp blink.uf2 /pico的磁區/ ``` 遇到問題:**CMake 3.12 or higher is required. You are running version 3.10.2**, 先移除版本較低的cmake ```bash= sudo apt remove cmake ``` 之後參考[資料](https://blog.csdn.net/iLOVEJohnny/article/details/103681032)以手動的方式提升到較新的版本。 ## 參考資料: 1. https://www.raspberrypi.org/blog/how-to-blink-an-led-with-raspberry-pi-pico-in-c/ 2. https://datasheets.raspberrypi.org/pico/getting-started-with-pico.pdf ###### tags: `raspberry pi`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up