This is a quick and dirty boilerplate repo to get you started quickly developing games for the PicoSystem.
- Install the tool chain.
$ sudo apt update
$ sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib build-essential
- Update the submodules. This pulls in Raspberry Pi's Pico SDK, Pimoroni's PicoSystem Sdk and pulls TinyUSB into pico-sdk.
$ git submodule update --init
$ cd pico-sdk
$ git submodule update --init
$ cd ..
- Create the build folder and build hello-world.
After making you'll be able to drag the
build/games/hello-world/hello-world.uf2
into the PicoSystem when it's booted into DFU mode.
$ mkdir build
$ cd build
$ cmake ..
$ make -j8
- Create a new folder under games.
$ mkdir games/new-game
- Create your game entry file in the new folder, the following can be used as a template.
#include "picosystem.hpp"
using namespace picosystem;
void init()
{
}
void update(uint32_t time_ms)
{
}
void draw()
{
}
- Create a new CMakeLists.txt in the new folder, the following can be used as a template.
cmake_minimum_required(VERSION 3.13)
project({ProjectName})
picosystem_executable(
{ProjectName}
{GameFile}.cpp
)
pixel_double({ProjectName})
disable_startup_logo({ProjectName})
Replacing {ProjectName} with the name of the project and {GameFile} with the name of the file created in the previous step.
- Add the new folder into the
games/CMakeLists.txt
add_subdirectory(hello-world)
add_subdirectory({NewFolder})
-
Write your game!
-
Build your game. After making you'll be able to drag the
build/games/{ProjectName}/{ProjectName}.uf2
into the PicoSystem when it's booted into DFU mode.
$ cd build
$ cmake ..
$ make -j8