-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.me
42 lines (35 loc) · 2.42 KB
/
README.me
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
You need to do everything in a virtual ubuntu desktop. You need to use WSL:
To install WSL and Ubuntu:
In cmd run the command:
wsl --install
In virtual desktop terminal (should automatically enter it):
Enter new username and password (remember them)
run the commands:
sudo apt update
sudo apt-get upgrade
sudo apt install git cmake gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential libstdc++-arm-none-eabi-newlib
cd ~/
mkdir pico
cd pico
git clone -b master https://github.com/raspberrypi/pico-sdk.git --recursive
cd
sudo nano .bashrc
At the end of the file add the line export PICO_SDK_PATH = home/username/pico/pico-sdk
Press 'ctrl o' then 'enter' to save and then 'ctrl x' to return to the terminal. Then:
source .bashrc
When you want to open the virtual desktop terminal, there is now an installed app called 'Ubuntu' - click on it - it annoyingly opens up on startup everytime you boot your pc unless you uninstall the app.
As far as I know, to uninstall this whole virtual desktop, just click on uninstall on the ubuntu app in the start menu and restart PC.
The linux drive in File Explorer contains the files of Ubuntu. Everything for pico is in home/username/pico.
To compile:
In file explorer, go to the pico-sdk folder then /tools/pioasm and open pio_disassembler.h with VSCode (convenience) and add the line '#include <inttypes.h>' after the '#include <cstdint>' line and save the file.
Create project directory in the /home/username/pico directory (or wherever you want but it has to be in the linux/ubuntu drive) and add the C file that you created in VS (just copy it over from your windows drive to the linux drive).
You can do all this using File Explorer.
Add all the base files (within the folder of this repo) to project directory and amend CMakeList.txt, following the comments (project name can be anything just keep it consistent throughout the file).
In the ubuntu terminal, cd into project directory then run the commands:
mkdir build
cd build
cmake ..
make -j8
(8 in -j8 being number of CPU cores your PC has - its for quicker compiling).
UF2 is found in the build folder - it is the only UF2 file in there.
If your ubuntu terminal gets full and messy, run the command 'clear'. Works on pi 3 too I think.