• sales

    +86-0755-88291180

Raspberry Pi Pico RP2040 Configure C Environment Windows and Raspberry Pi

Method 1 Raspberry Pi platform

Installation the compilation environment 

sudo apt-get install cmake --fix-missing

sudo apt-get install gcc-arm-none-eabi


SDK download

git clone -b master https://github.com/raspberrypi/pico-sdk.git

cd pico-sdk

git submodule update --init --recursive


The program needs to point to the SDK path

export PICO_SDK_PATH=../../pico-sdk 

(Change to your true path, Now you not need do this code , when you make program, you need this code )

Method 2 Window platform

1】Install the compilation environment.

MingW

arm-gnu-toolchain

Git

cmake

download these tools from the official website. During the installation process, make sure to add the bin directory to the PATH environment variable.


2SDK download

To obtain the Raspberry Pi Pico SDK and examples from GitHub

3】camke

To add the pico sdk file path to the environment variables:



Open the CMakeLists.txt file in the pico-examples folder, and add the PICO_SDK_PATH by

setting the path to the pico-sdk.




Create a new folder named "build" and navigate into it. Then, within the "build" folder, enter the "cmd" directory.

Then, enter the following command in the command line:cmake -G "MinGW Makefiles" ..

Next, execute the compilation command: make -j4




After that, the .uf2 file generated in the build folder can be transferred to the Pico for execution.