How to setup C/C++ SDK of Raspberry Pi Pico W On Raspberry Pi Model 3b+

Posted

in

by

Tags:

The C/C++ SDK has development tools for both development boards.

There are various methods of the SDK. You can use this in Windows, MAC etc.
But the easiest and simplest method is the use of Raspberry Pi itself.

Step 1: Follow Chapter 1 of the Getting Started with Raspberry Pi Pico https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf

Step 2: Follow Chapter 8: Creating your own project
copy the files from pico W folder, which you will find under the pico-examples folder. The blink project will be under the wifi folder.

Step 3: add the following line to your CMakeLists.text file

set(PICO_BOARD pico_w)

Sample CMakeLists.text

cmake_minimum_required(VERSION 3.13)
include(pico_sdk_import.cmake)
project(test_project C CXX ASM)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
set(PICO_BOARD pico_w)
pico_sdk_init()
add_executable(test
test.c
)
pico_enable_stdio_usb(test 1)
pico_enable_stdio_uart(test 0)
pico_add_extra_outputs(test)

target_link_libraries(test 
					pico_stdlib
					pico_cyw43_arch_none
					)

NOTE: you can set the pico board to pico w. when you issue cmake ..
Only use one method of setting the pico w board.

cmake -DPICO_BOARD=pico_w ..

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *