element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Legacy Personal Blogs Adventures with the Raspberry Pi pico - part 1
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: neilk
  • Date Created: 27 Jan 2021 4:55 PM Date Created
  • Views 5841 views
  • Likes 13 likes
  • Comments 10 comments
  • raspberry pico
Related
Recommended

Adventures with the Raspberry Pi pico - part 1

neilk
neilk
27 Jan 2021

My pico arrived on Monday, 24 January, but I had other things that I had to do, so I resisted starting on it until Tuesday, 25th.

 

I'm documenting everything to make sure that I understand what's going on!

 

 

The Easy Bit!!!

 

  • Open the package and have a good look - very easy!!!

 

  • Follow the instructions in: https://www.raspberrypi.org/documentation/pico/getting-started/  in the tab labelled "Getting started with C/C++

 

    • Plugging a micro USB plug into the socket on the pico, whilst simultaneously pressing the BOOTSEL button on the pico will not be easy!
    • To get round this, I plugged the male end of a male A to female A USB extension cable into my PC and had the female end sitting conveniently on my desk.
    • I then plugged a short USB A male to micro USB cable into the micro USB connector on the pico board. The male A end is not yet connected, so no power!
    • Yes!!! When I connected the pico to the PC, by plugging the USB A male on the short cable into the USB A female on the extension cable, whilst simultaneously pressing the BOOTSEL button on the pico, there was a warble from the PC speaker, and the pico appeared as a removeable drive called RPI-RP2 (:I) - 127Mb - In File Manager on the PC.
    • Yes!!! I downloaded the UF2 file for blink - blink.UF2, 25kB, to the Downloads folder on the PC.
    • YES!!! I copied and pasted the UF2 file onto the RPI-RP2 drive.There was a warble, the RPI-RP2 drive disappeared from the File Manager window and the LED on the pico started flashing!

 

  • Disconnect from the PC and, obviously, the LED stops flashing.
  • Reconnect to the PC and the LED starts flashing.
  • Disconnect and reconnect, whilst pressing the BOOTSEL button: the LED stops flashing, the RPI-RP2 drive reappears and the pico is ready to be reflashed.
  • Disconnect and reconnect: the RPI-RP2 drive disappears and does not reappear; the LED starts flashing again. I just wanted to check that placing the pico into the reflash mode didn't destroy the resident program.

 

 

Now It Gets Much Harder!!

 

Because I have a stable, if outdated, development environment for Arduino/Esp8266 installed on my main W10 PC, I decided to try and install the pico environment on an ASUS W10 laptop.

 

For this next section I have used:

 

https://datasheets.raspberrypi.org/pico/getting-started-with-pico.pdf

EDIT - the above document has been revised and sections renumbered since this blog was written

 

And shabaz 's blog: Working with the Raspberry Pi Pico with Windows and C/C++

 

I've also looked at posts from michaelkellett  jomoenginer14rhb

 

Firstly, following shabaz's blog:

 

1. Downloaded and installed Visual Studio Code from the Visual Studio Website link. Seemed OK

 

2. Within VS, installed the CMake tools extension. Seemed OK.

 

3. Downloaded CMake from the CMake website link. Installation was more problematic:

    • The CMake installation didn't like the presence of ASUS Smart Gesture software, which supports the laptop trackpad, and asked for permission to remove it before it would proceed; not a problem, because I don't use the trackpad; I always use a mouse!
    • Eventually, after removing the ASUS package, installation proceeded for a while and then hung, claiming there was another installation in progress (?)
    • I cancelled the installation (which took quite a while to roll back) and then tried again......same problem!
    • I rebooted the laptop and tried the installation again - this time it ran to completion, BUT, failed to show me the screen  which would allow me to choose the System Path option, as shown in shabaz's screen shot.
    • I uninstalled CMake and re-installed again. this time, I got the System Path screen, made the appropriate choice and the installation ran to completion.

 

4. Downloaded and installed the the Build Tools for Visual Studio, using the link and shabaz's screenshot. It took a while.

 

5. Following shabaz's next screen shot, I installed C++ Build Tools. The comment that it might take a few minutes was an understatement! It took about 20 minutes!

 

6. Following shabaz's advice, I then switched to the pico getting started guide (see above) using the links in section 8.2.1 to download and install:

 

    • ARM GCC complier. Don't forget to tick the box to register the PATH to the environment variable.

 

    • Python 3. I already had 3.7 32-bit installed; I upgraded to 3.7 64-bit.
      • I needed to customise the installation to add Python to the PATH variable.
      • I forced the installation Folder to be C:\Program Files\Python37 - this is NOT the default installation location.
      • I also followed the instructions in the NOTE box to create a symlink between Python3.exe and Python.exe - don't forget to open the command window with administrator privileges.

 

    • Git. During the installation, dont forget to:
      • Change the default editor - I chose Notepad++
      • Check the box to allow Git to be used from third-party tools
      • Check the box for "Checkout as-is, Commit as-is"
      • Check the box for "Use Windows default console window"
      • Check the box for "Enable experimental support for pseudo consoles"

(I have no idea what some of the above means! image)

 

7. I continued to follow the the pico getting started guide at Section 8.2.2 EDIT: 9.2.2, to Load the SDK and examples

    • Opened a command window
    • Created a a folder structure: C:\Users\pico\Downloads and then entered all the commands as shown

 

8. I followed Section 8.2.3  EDIT: 9.2.3 in the getting started document

    • All went well until I got to: C:\Users\pico\Downloads\pico-examples\build> cmake -G "NMake Makefiles" .. which ran but produced a number of errors, relating to being unable to open certain files for witing, suggesting that the Visual Studio Developer Command prompt needed opening with administrator privileges.
    • I closed the VS window and reopened with administrator privileges.
    • I repeated C:\Users\pico\Downloads\pico-examples\build> cmake -G "NMake Makefiles" .. and it appeared to run to completion except for being unable to find Doxygen.
    • I then ran the final command: C:\Users\pico\Downloads\pico-examples\build> nmake and the screen filled with loads and loads of coloured messages, which didn't seem to be errors!!!!!!!!!!!!
    • This was similar to shabaz's screenshot and went on for a considerable time
    • It appears to be successfully building all the pico examples!!!
    • This is not what section 8.2.3EDIT: 9.2.3 said would be happening! They appear to have left out a step where I should have been identifying the "hello world" example.
    • After almost an hour, everything has stopped and I'm pretty sure I've compiled and built all of the examples.

 

9. Using File manager, I can navigate to .....\build\blink\ folder, where I can find (amongst other files) blink.uf2, 25k. This is the file I need to flash the pico.

 

10. BIG TEST:

    • Unplugged the pico from the PC and plugged it into the laptop, with the BOOTSEL button pressed down.
    • The laptop warbled and the RPI-RP2 drive appeared in the File manager window
    • Copied the blink.uf2 file from ....\build\blink\ and pasted it onto the RPI-RP2 drive.
    • Laptop warbled and the LED on the pico started flashing.
    • SUCCESS!!!

 

CONCLUSIONS:

 

1. I appear to have successfully built the pico SDK.

 

2. I appear to have successfully built/compliled all the examples.

 

3. At least one of the examples actually works - blink.

 

 

 

Next Step:

Learn how to modify the blink source file - to blink2 -  build/compile it and then flash the pico with the modified file.

  • Sign in to reply

Top Comments

  • dubbie
    dubbie over 4 years ago +3
    Neil, This is all very good stuff. I am tempted to have a go at 'doing' C on the Pico myself as I prefer C. It does look kind of complicated but perhaps I'll give it a go. Also, where did you get your…
  • shabaz
    shabaz over 4 years ago +3
    Hi Neil, This is great, thanks for testing out the steps, and clarifying things, especially with the parts I had not covered, like Python, compiler and so on. Also glad to hear the executable finally worked…
  • michaelkellett
    michaelkellett over 4 years ago +3
    Hello Neil, Great - I got there once from command line but never from VS - there are some things I don't think I set up quite right so I'll try again when I get time. MK
Parents
  • michaelkellett
    michaelkellett over 4 years ago

    Hello Neil,

     

    Great - I got there once from command line but never from VS - there are some things I don't think I set up quite right so I'll try again when I get time.

     

    MK

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • michaelkellett
    michaelkellett over 4 years ago

    Hello Neil,

     

    Great - I got there once from command line but never from VS - there are some things I don't think I set up quite right so I'll try again when I get time.

     

    MK

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
  • neilk
    neilk over 4 years ago in reply to michaelkellett

    Thanks Michael. I could tell you were pretty frustrated with it!

     

    I'll be trying VS soon - not right now though!

     

    Neil

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube