<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Adventures with the Raspberry Pi pico - part 3</title><link>/members-area/personalblogs/b/blog/posts/adventures-with-the-raspberry-pi-pico---part-3</link><description>INTRODUCTION This is the third part of a series of blogs devoted to programming the Raspberry Pi pico: Adventures with the Raspberry Pi pico - part 1 - Describes setting up the toolchain and building all the examples using the command line...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Adventures with the Raspberry Pi pico - part 3</title><link>https://community.element14.com/members-area/personalblogs/b/blog/posts/adventures-with-the-raspberry-pi-pico---part-3</link><pubDate>Wed, 03 Mar 2021 16:20:47 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:3c87a2fa-d146-47da-82d9-efa741131d9d</guid><dc:creator>neilk</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;a class="jive-link-external-small" href="https://datasheets.raspberrypi.org/pico/getting-started-with-pico.pdf" rel="nofollow ugc noopener" target="_blank"&gt;https://datasheets.raspberrypi.org/pico/getting-started-with-pico.pdf&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;has been revised and sections renumbered since I wrote this blog. I have edited the blog accordingly.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Neil&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=10781&amp;AppID=293&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Adventures with the Raspberry Pi pico - part 3</title><link>https://community.element14.com/members-area/personalblogs/b/blog/posts/adventures-with-the-raspberry-pi-pico---part-3</link><pubDate>Sat, 30 Jan 2021 13:27:21 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:3c87a2fa-d146-47da-82d9-efa741131d9d</guid><dc:creator>dubbie</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Neil,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;It makes my brain hurt just trying to read your Blog. I don&amp;#39;t think I will have any possibility of success with Visual Studio. I might stick to Arduino. Maybe one day they&amp;#39;ll stick a Raspberry Pi Pico into Arduino - that would be ideal&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Dubbie&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=10781&amp;AppID=293&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Adventures with the Raspberry Pi pico - part 3</title><link>https://community.element14.com/members-area/personalblogs/b/blog/posts/adventures-with-the-raspberry-pi-pico---part-3</link><pubDate>Fri, 29 Jan 2021 21:44:07 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:3c87a2fa-d146-47da-82d9-efa741131d9d</guid><dc:creator>shabaz</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Hi Neil!&lt;/p&gt;&lt;p&gt;I can help with some of these questions, although probably not as well as an expert!&lt;/p&gt;&lt;p&gt;Regarding how to create your own project, I&amp;#39;ve uploaded a file called project1.zip to the blog post &lt;a class="jive-link-blog-small" href="/products/raspberry-pi/b/blog/posts/working-with-the-raspberry-pi-pico-with-windows-and-c-c"&gt;Working with the Raspberry Pi Pico with Windows and C/C++&lt;/a&gt;&amp;nbsp; as an attachment (I could not attach it to this comment).&lt;/p&gt;&lt;p&gt;It&amp;#39;s a generic project. If you extract it to your pico folder (for example c:\development\pico), then it will look like this:&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/440x225/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-3c87a2fa-d146-47da-82d9-efa741131d9d/contentimage_5F00_207445.png:440:225]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Now you can rename the folder to anything you like, e.g. &lt;strong&gt;neil-project1&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Then, within that folder are these files:&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/322x199/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-3c87a2fa-d146-47da-82d9-efa741131d9d/contentimage_5F00_207446.png:322:199]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The important one to edit is &lt;strong&gt;CMakeLists.txt&lt;/strong&gt;. It will contain the following. Change the text &lt;strong&gt;project1&lt;/strong&gt; to be your new project name. Also, you can see that the code is comprised of &lt;strong&gt;main.c&lt;/strong&gt; and &lt;strong&gt;extrafunc.c&lt;/strong&gt; - all the pico examples use a single C file, but I figured I&amp;#39;d create an example project with an additional file so it can be seen how to add more files.&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/396x371/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-3c87a2fa-d146-47da-82d9-efa741131d9d/contentimage_5F00_207447.png:396:371]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;That&amp;#39;s it, you can now go into the c:\development\pico\neil-project1\build folder, and type (as before):&lt;/p&gt;&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:3ef06e6b-9b7d-4651-b12d-db8be7f5e991:type=text&amp;amp;text=cmake+-G+%22NMake+Makefiles%22+..]&lt;/p&gt;&lt;div&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;After that, to perform the build, type (as before) in the Developer Command Prompt:&lt;/p&gt;&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:3ef06e6b-9b7d-4651-b12d-db8be7f5e991:type=text&amp;amp;text=nmake]&lt;/p&gt;&lt;div&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;It will result in the &lt;strong&gt;neil-project1.uf2&lt;/strong&gt; file being created in the build folder.&lt;/p&gt;&lt;p&gt;You can repeat to create as many projects as desired : )&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The CMakeLists.txt creates a Makefile as far as I can tell (Makefiles can do a lot but typically tell the compiler and assembler and linker tools what files need to be compiled and assembled and linked). I&amp;#39;m sure I&amp;#39;m crudely simplifying or have got bits wrong, but in a nutshell it&amp;#39;s the place where you need to specify the files that are to be built and will join into your executable. When you typed the cmake command, the Makefile got created.&lt;/p&gt;&lt;p&gt;When you typed nmake, then the Makefile was read by the nmake program, and it called the appropriate compiler, assembler, linker, etc. (I think! I only broadly know the process, without really knowing the cmake and nmake tools).&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Finally, regarding git, none of what I&amp;#39;ve written here will store your code in any version control. You can use git commands to do that (provided you have created an account on github for instance) either from the command line, or using Visual Studio Code. It&amp;#39;s quite unintuitive how to do it (especially if you&amp;#39;ve come from older terminology for older version control systems). It probably is worthy of a separate blog. Anyway, you could do your version control in parallel if you wished, using the Github Desktop application. It&amp;#39;s an ugly way to do it but it works. Just not pretty. If you wished to do it from Visual Studio code, I have some notes somewhere, I don&amp;#39;t think I took screenshots though. The only downside is that learning to do it in Visual Code just means having to re-learn how to do it with other IDEs in future, if you ever changed tools.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=10781&amp;AppID=293&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>