aboutsummaryrefslogtreecommitdiffstats
path: root/README.html
blob: d6b2001885933162d3d1483f8ad8ceb2479c4c23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<h1>rpi-pico</h1>
<p>
 This is an overlay voor the Gentoo Linux distribution, it provides an ebuild
 for the
 <a href="https://raspberrypi.github.io/pico-sdk-doxygen/">Raspberry Pi Pico
  SDK</a>.
</p>
<h2>Why this overlay?</h2>
<p>
 I recently got interested in the
 <a href="https://www.raspberrypi.com/products/raspberry-pi-pico/">Raspberry Pi
  Pico</a> and the SDK is not in the main portage tree. Usual instructions tell
 you to install it in your home directory, but in my opinion software like this
 should be managed by your package manager so i started writing an ebuild. I'm
 sharing this to help other Gentoo users.
</p>
<h2>What is in this overlay?</h2>
<p>
 This overlay provides a single package: dev-utils/pico-sdk. It installs the
 SDK under /opt/pico-sdk-&lt;version&gt; and a symlink /opt/pico-sdk. It has
 some use flags to control which external parts get included:
</p>
<ul>
 <li>cyw43: Include the cyw43 driver for the Pico W's wireless hardware</li>
 <li>examples: Include source code examples</li>
 <li>lwip: Include the lwip IP Stack</li>
 <li>tinyusb: Include the tinyusb USB Stack (required for stdio over USB)</li>
</ul>
<p>
 You may notice that the ebuild does depend on cross-arm-none-eabi/binutils,
 cross-arm-none-eabi/gcc and cross-arm-none-eabi/newlib and these packages may
 not be available on your system. You can use crossdev (sys-devel/crossdev) to
 create them with the command: <b>crossdev -t arm-none-eabi --init-target</b>.
</p>
<h2>How to use this overlay?</h2>
<p>
 First you'll have to clone this overlay on a place you like, a common place
 these days is <b>/var/db/repos</b>. So cd into that directory and use
 <b>git clone https://code.pa4wdh.nl.eu.org/gentoo/rpi-pico</b>, this will
 create a directory called rpi-pico with the overlay in it.
</p>
<p>
 Next you have to make portage aware of the repo, for that you'll have to
 create a config file under <b>/etc/portage/repos.conf</b>. Create a file
 called <b>rpi-pico.conf</b> and give it these contents:
</p>
<pre>
[rpi-pico]
location = /var/db/repos/rpi-pico
sync-type = git
sync-uri = https://code.pa4wdh.nl.eu.org/gentoo/rpi-pico
</pre>
<p>
 If you placed the overlay on a different place than <b>/var/db/repos</b> make
 sure to adapt the <b>location</b> line to your needs.
</p>
<h2>What can i do with this?</h2>
<p>
 With the SDK installed you can start developing programs in the C programming
 language for the Raspberry Pi Pico. See
 <a href="https://github.com/raspberrypi/pico-sdk#quick-start-your-own-project">this documentation</a>
 to learn how to start your own project. To use the SDK set <b>PICO_SDK_PATH</b>
 to <b>/opt/pico-sdk</b> or include
 <b>include(/opt/pico-sdk/pico_sdk_init.cmake)</b> in your
 <b>CMakeLists.txt</b>.
</p>
<p>
 If you have any feedback on this overlay, you're quite likely to find me on
 the <a href="https://forums.gentoo.org">Gentoo forums</a>.
</p>
<p>
 Have fun!
</p>