# My notes on getting setup - Linux targeting 32blit, picosystem, VGAboard, HTML and windows exe

**URL:** https://forums.pimoroni.com/t/my-notes-on-getting-setup-linux-targeting-32blit-picosystem-vgaboard-html-and-windows-exe/18070
**Category:** Beta Testers
**Created:** [October 19, 2021, 5:35am UTC](https://forums.pimoroni.com/t/my-notes-on-getting-setup-linux-targeting-32blit-picosystem-vgaboard-html-and-windows-exe/18070 "2021-10-19T05:35:23Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![mgarcia](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/mgarcia/32/5619_2.png) [@mgarcia](https://forums.pimoroni.com/u/mgarcia)
#### Post date: [October 19, 2021, 5:35am UTC](https://forums.pimoroni.com/t/my-notes-on-getting-setup-linux-targeting-32blit-picosystem-vgaboard-html-and-windows-exe/18070/1 "2021-10-19T05:35:23Z")

</div>

ETA prime, did a review of the PicoSystem and threw down a challenge to play some community made games on his next video!

[![](https://us1.discourse-cdn.com/flex016/uploads/pimoroni/original/2X/b/b419b3f357a15dacac840c93255b7ffceef2b338.jpeg "A New Handheld Powered By The Same Raspberry Pi Pico Chip!") ](https://www.youtube.com/watch?v=m_5voWb7MYU)

PicoSystem and VGA Board a [very similar](https://github.com/32blit/32blit-sdk/blob/master/docs/pico.md#board-specific-details), so if you choose to get a VGA Board instead, I think that should be fine.

This forum has limits on links and replies… :/

---

<div class="post-metadata">

### Author: ![mgarcia](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/mgarcia/32/5619_2.png) [@mgarcia](https://forums.pimoroni.com/u/mgarcia)
#### Post date: [October 19, 2021, 5:35am UTC](https://forums.pimoroni.com/t/my-notes-on-getting-setup-linux-targeting-32blit-picosystem-vgaboard-html-and-windows-exe/18070/2 "2021-10-19T05:35:57Z")

</div>

I’m not an expert, there’s a lot of noob hacks here, but to encourage others, here are my notes on setting up.

32blit is very impressive how it can target so many platforms!  
Sorry I wont be mentioning Mac or chrome OS’s, I’m not familiar at all with them.

I’m mostly in the 32blit discord (Chat) - [32blit](https://discord.gg/7qM9ftC)  
But I can try and answer/help here to.

**General noob tips:**

The 32blit documentation is pretty good, but I still got caught out here and there.  
Keep folders names simple, ie no spaces or none ASCI chars, including user name!

Make sure your .profile or .bash\_profile etc can be run correctly in your window terminal before starting!  
Sometimes they have access issues, ie a quick fix can be:  
chmod 777 $HOME/.bash\_profile

If you want to build faster use:  
make -j4  
The number is the threads to run, the more the faster

I’m a git,cmake,arm noob, it’s best to git clone each repo then to download them as zips, this is required by some, but best to do for all, IE:  
git clone -b master [GitHub - raspberrypi/pico-sdk](https://github.com/raspberrypi/pico-sdk.git)

---

<div class="post-metadata">

### Author: ![mgarcia](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/mgarcia/32/5619_2.png) [@mgarcia](https://forums.pimoroni.com/u/mgarcia)
#### Post date: [October 19, 2021, 5:36am UTC](https://forums.pimoroni.com/t/my-notes-on-getting-setup-linux-targeting-32blit-picosystem-vgaboard-html-and-windows-exe/18070/3 "2021-10-19T05:36:34Z")

</div>

Each target has it’s own build folder in the 32blit-sdk (or your game) folder  
ie build.stm32 build.em etc.

Here is the directory structure at the end.

> $HOME/
> 
> > emsdk  
> > pico-sdk  
> > 32blit-tools  
> > pico-extras  
> > pico-sdk  
> > gcc-arm-none-eabi-9-2020-q2-update (not required, and probably a me thing)   
> > .local/bin (auto generated - location of the 32blit tool)  
> > 32blit-beta (latest branch for pico devices)
> 
> > 32blit-sdk/
> > 
> > > build  
> > > build.picosystem  
> > > build.vgaboard  
> > > build.win  
> > > build.em  
> > > build.stm32

**My setup.**

I thought I would use a new linux flavor, I went with MX (debian based) and picked XFCE (and unknowingly stable).  
Here are the links:  
[https://distrowatch.com/?newsid=11206](https://distrowatch.com/?newsid=11206)

> **[MX-Linux - Browse /Final at SourceForge.net](https://sourceforge.net/projects/mx-linux/files/Final/)**
>
> MX-Linux project

---

<div class="post-metadata">

### Author: ![mgarcia](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/mgarcia/32/5619_2.png) [@mgarcia](https://forums.pimoroni.com/u/mgarcia)
#### Post date: [October 19, 2021, 5:37am UTC](https://forums.pimoroni.com/t/my-notes-on-getting-setup-linux-targeting-32blit-picosystem-vgaboard-html-and-windows-exe/18070/4 "2021-10-19T05:37:42Z")

</div>

MX-19.4\_July\_x64.iso

Eclipse, my IDE of choose for over 20years now!  
[https://www.eclipse.org/downloads/packages/release/2021-09/r/eclipse-ide-cc-developers](https://www.eclipse.org/downloads/packages/release/2021-09/r/eclipse-ide-cc-developers)

I installed this to a Virtual Box image, so it’s self contained, the USB devices are automatically forward to the VM.

**-----------------------------------------------------------------**  
_ **linux** _

Easy one, but install gdb if you plan on debugging natively!  
Follow: [32blit-sdk/Linux.md at master · 32blit/32blit-sdk · GitHub](https://github.com/32blit/32blit-sdk/blob/master/docs/Linux.md)

The OS app control keys are (see hardware-test app):

Dpad = arrow keys or WASD  
A = Z key  
B = X key  
X = C key  
Y = V key

Home = 1 key  
Menu = 2 or ESC key

Joystick = Mouse within app screen  
Joystick press = 3 key

Tilt controls, I don’t know.

---

<div class="post-metadata">

### Author: ![mgarcia](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/mgarcia/32/5619_2.png) [@mgarcia](https://forums.pimoroni.com/u/mgarcia)
#### Post date: [October 19, 2021, 5:38am UTC](https://forums.pimoroni.com/t/my-notes-on-getting-setup-linux-targeting-32blit-picosystem-vgaboard-html-and-windows-exe/18070/5 "2021-10-19T05:38:12Z")

</div>

**-----------------------------------------------------------------**  
_ **32blit tool** _

I found this part a bit confusing.

In your $HOME folder (not 32blit root)  
git clone the [GitHub - 32blit/32blit-tools: 32blit asset management and upload tool](https://github.com/32blit/32blit-tools)

It also requires:

> **[GitHub - pimoroni/boilerplate-python: Boilerplate and common files/structure...](https://github.com/pimoroni/boilerplate-python)**
>
> Boilerplate and common files/structure for a Pimoroni Python library. - GitHub - pimoroni/boilerplate-python: Boilerplate and common files/structure for a Pimoroni Python library.

I don’t know the git commands to do it, but basically I just download the zip and extract it into the 32blit-tools dir.

Next, I had issues running pip3, not in the path (of sudo possibly), again, I brought forced scripts that used pip3, replacing it with  
python3 -m pip

pip3 install 32blit  
or  
python3 -m pip install 32blit

That will build tool and install the tool into ~/.local/bin and add the path to your env file setting, ie .profile

---

<div class="post-metadata">

### Author: ![mgarcia](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/mgarcia/32/5619_2.png) [@mgarcia](https://forums.pimoroni.com/u/mgarcia)
#### Post date: [October 19, 2021, 5:39am UTC](https://forums.pimoroni.com/t/my-notes-on-getting-setup-linux-targeting-32blit-picosystem-vgaboard-html-and-windows-exe/18070/6 "2021-10-19T05:39:15Z")

</div>

**-----------------------------------------------------------------**  
_ **stm32** _

AKA 32blit: [https://32blit.com/](https://32blit.com/)

First do this, give your user access to serial device!

> <https://github.com/esp8266/source-code-examples/issues/26>
>
> I had an issue , while trying to do flash
> Cannot open /dev/ttyUSB0: Permission …denied
> 
> https://bugs.launchpad.net/ubuntu/+source/gtkterm/+bug/949597
> 
> I palliated to this problem with the command " sudo chmod -R 777 /dev/ttyUSB0 " each time I wanted to flash. 
> 
> Do you know more about these bugs ? This maybe due to an ubuntu bug (Ubuntu 16 LTS) but I don't know

On my debian stable, or the MX repo the gcc-arm-none-eabi package (from 2018) couldn’t build the stm32.  
I had to “brought force it”… and downloaded the tar.bz2 file and extracted it and manually fixed up the paths in .profile  
PATH="$HOME/gcc-arm-none-eabi-9-2020-q2-update/bin:$PATH"

---

<div class="post-metadata">

### Author: ![mgarcia](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/mgarcia/32/5619_2.png) [@mgarcia](https://forums.pimoroni.com/u/mgarcia)
#### Post date: [October 19, 2021, 5:39am UTC](https://forums.pimoroni.com/t/my-notes-on-getting-setup-linux-targeting-32blit-picosystem-vgaboard-html-and-windows-exe/18070/7 "2021-10-19T05:39:49Z")

</div>

gcc-arm-none-eabi-9-2020-q2-update-x86\_64-linux.tar.bz2 from [GNU Toolchain | GNU Arm Embedded Toolchain Downloads – Arm Developer](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads)  
I had to specifcy -DPICO\_TOOLCHAIN\_PATH=$HOME/gcc-arm-none-eabi-9-2020-q2-update in stm32/pico cmake commands below.

32blit can printf to the TTY terminal, install one, ie:  
sudo apt-get install putty cu minicom screen  
I found screen to work the easiest (no params), ie:  
screen /dev/ttyACM0

Updated the firmware:

> <https://github.com/32blit/32blit-sdk/blob/master/docs/32Blit-Firmware.md#building--flashing-the-32blit-firmware>

Put the 32blit in DFU mode (hold X/Y and press reset) , winplug the USB cable in.  
32blit flash firmware/firmware.bin  
or  
make firmware-update.flash

next install the launcher:  
32blit install launcher/launcher.blit  
or  
make launcher.flash

intall all the other demos (see bottom of Makefile for more info):  
make install DEMO-NAME.flash

You now should have a working and demo loaded 32blit!

---

<div class="post-metadata">

### Author: ![mgarcia](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/mgarcia/32/5619_2.png) [@mgarcia](https://forums.pimoroni.com/u/mgarcia)
#### Post date: [October 19, 2021, 5:40am UTC](https://forums.pimoroni.com/t/my-notes-on-getting-setup-linux-targeting-32blit-picosystem-vgaboard-html-and-windows-exe/18070/8 "2021-10-19T05:40:21Z")

</div>

**-----------------------------------------------------------------**  
_ **Emscripten** _

Follow:

> <https://github.com/32blit/32blit-sdk/blob/master/docs/Emscripten.md>

make sure paths are correctly executed when a new shell/terminal is open, ie: source $HOME/emsdk/emsdk\_env.sh

mkdir build.em  
cd build.em  
emcmake cmake … -D32BLIT\_DIR=$HOME/32blit-sdk  
make

I like to create a script file that starts the server is helpful:  
#!/bin/bash  
python3 -m http.server

Run in a terminal and CTRL C to stop it.

I don’t know why, but firefox doesn’t like it, chrome browser works fine.  
The keyboard buttons (from hardware-test app):  
[http://0.0.0.0:8000/32blit-sdk/build.em/examples/hardware-test/hardware-test.html](http://0.0.0.0:8000/32blit-sdk/build.em/examples/hardware-test/hardware-test.html)

Same as the OS controls.

---

<div class="post-metadata">

### Author: ![mgarcia](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/mgarcia/32/5619_2.png) [@mgarcia](https://forums.pimoroni.com/u/mgarcia)
#### Post date: [October 19, 2021, 5:40am UTC](https://forums.pimoroni.com/t/my-notes-on-getting-setup-linux-targeting-32blit-picosystem-vgaboard-html-and-windows-exe/18070/9 "2021-10-19T05:40:52Z")

</div>

**-----------------------------------------------------------------**  
_ **windows exe** _

> <https://github.com/32blit/32blit-sdk/blob/master/docs/Windows-WSL.md#installing-the-mingw-compilertools>

sudo apt-get install mingw-w64

after: sudo mkdir -p /opt/local/

make it accessible:  
sudo chmod -R 777 /opt/local

in 32blit-sdk root

cd to  
mkdir build.win32  
cd build.win32

cmake … -DCMAKE\_TOOLCHAIN\_FILE=…/mingw.toolchain  
make -j4

**-----------------------------------------------------------------**  
_ **setting up PicoSystem / VGA BOARD** _

VGA BOARD

> **[Pimoroni Pico VGA Demo Base – Pimoroni](https://shop.pimoroni.com/products/pimoroni-pico-vga-demo-base)**
>
> Built especially to showcase the low cost, feature-rich RP2040 chip on the Raspberry Pi Pico, this board has VGA output, an SD card slot, digital I2S audio output, and more!

---

<div class="post-metadata">

### Author: ![mgarcia](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/mgarcia/32/5619_2.png) [@mgarcia](https://forums.pimoroni.com/u/mgarcia)
#### Post date: [October 19, 2021, 5:41am UTC](https://forums.pimoroni.com/t/my-notes-on-getting-setup-linux-targeting-32blit-picosystem-vgaboard-html-and-windows-exe/18070/10 "2021-10-19T05:41:25Z")

</div>

PicoSystem

> **[PicoSystem – Pimoroni](https://shop.pimoroni.com/products/picosystem)**
>
> A tiny hackable dev handheld with RP2040 at its heart ❤

Both being based on the RP Pico, require the same source code, nothing is built in these folders.

> **[GitHub - raspberrypi/pico-sdk](https://github.com/raspberrypi/pico-sdk)**
>
> Contribute to raspberrypi/pico-sdk development by creating an account on GitHub.

---

<div class="post-metadata">

### Author: ![mgarcia](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/mgarcia/32/5619_2.png) [@mgarcia](https://forums.pimoroni.com/u/mgarcia)
#### Post date: [October 19, 2021, 5:42am UTC](https://forums.pimoroni.com/t/my-notes-on-getting-setup-linux-targeting-32blit-picosystem-vgaboard-html-and-windows-exe/18070/11 "2021-10-19T05:42:10Z")

</div>

Also read the PDF section 2.1. Get the SDK and examples

> **[getting-started-with-pico.pdf](https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf)**
>
> 32.95 MB

In your $HOME folder (not 32blit root)  
git clone -b master [GitHub - raspberrypi/pico-sdk](https://github.com/raspberrypi/pico-sdk.git)  
cd pico-sdk  
git submodule update --init

---

<div class="post-metadata">

### Author: ![Caperjack1953](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/caperjack1953/32/7923_2.png) [@Caperjack1953](https://forums.pimoroni.com/u/Caperjack1953)
#### Post date: [October 19, 2021, 2:11pm UTC](https://forums.pimoroni.com/t/my-notes-on-getting-setup-linux-targeting-32blit-picosystem-vgaboard-html-and-windows-exe/18070/12 "2021-10-19T14:11:54Z")

</div>

thta read just blew my ADHD all to hell ,great post ,thanks for posting , I dont code ,just use otheres and I thank you and otheres for doing that part for people like me , I have the VGABoard hanging pretty on my Pi/Pico wall ,tried a few time using others instructions ,but never got anywere and Gave Up .

---

<div class="post-metadata">

### Author: ![mgarcia](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/mgarcia/32/5619_2.png) [@mgarcia](https://forums.pimoroni.com/u/mgarcia)
#### Post date: [October 20, 2021, 5:07am UTC](https://forums.pimoroni.com/t/my-notes-on-getting-setup-linux-targeting-32blit-picosystem-vgaboard-html-and-windows-exe/18070/13 "2021-10-20T05:07:01Z")

</div>

sorry about that, i ask for it to get removed,  
My full notes are here:  
[https://cdn.discordapp.com/attachments/585104736462569474/899898060044374036/pico.txt](https://cdn.discordapp.com/attachments/585104736462569474/899898060044374036/pico.txt)

---

<div class="post-metadata">

### Author: ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)
#### Post date: [October 20, 2021, 8:39am UTC](https://forums.pimoroni.com/t/my-notes-on-getting-setup-linux-targeting-32blit-picosystem-vgaboard-html-and-windows-exe/18070/14 "2021-10-20T08:39:14Z")

</div>

@mgarcia Jack wasn’t complaining, not about what you posted. I’d leave it up.

---

<div class="post-metadata">

### Author: ![Caperjack1953](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/caperjack1953/32/7923_2.png) [@Caperjack1953](https://forums.pimoroni.com/u/Caperjack1953)
#### Post date: [October 21, 2021, 12:05pm UTC](https://forums.pimoroni.com/t/my-notes-on-getting-setup-linux-targeting-32blit-picosystem-vgaboard-html-and-windows-exe/18070/15 "2021-10-21T12:05:55Z")

</div>

Yeah,Leave it up for sure ,great post ,My brain’s the issue ;)

---

<div class="post-metadata">

### Author: ![mgarcia](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/mgarcia/32/5619_2.png) [@mgarcia](https://forums.pimoroni.com/u/mgarcia)
#### Post date: [October 23, 2021, 9:31am UTC](https://forums.pimoroni.com/t/my-notes-on-getting-setup-linux-targeting-32blit-picosystem-vgaboard-html-and-windows-exe/18070/16 "2021-10-23T09:31:42Z")

</div>

I put my notes on my website (somewhat formated) and linked it to [archive.org](http://archive.org), which has a downloadable Linux Virtual Box Virtual Machine, that’s what I use anyway.

> **[Linux Development Virutal Machine for 32blit SDK](http://mgarcia.org/Blog/2021-10-23-Linux-Development-Virutal-Machine-for-32blit-SDK)**
>
> Linux Development Virtual Machine for 32blit, PicoSystem, VGABoard (aka reference design by Raspberry Pi Pico)....
