Picofuse is an SDK for developing embedded systems. You can use it to build applications that run on various boards and hosts, leveraging Objective-C and the provided frameworks. See the [examples](examples) for how to get started:
/opt, or another absolute path of your choice.PICOFUSE_SDK environment variable to the installation path, if it's not /opt/picofuse.examples directory, such as helloworld.make to build your project on the host, or make DEVICES=<device> to build for a specific device: one of the project's JSON files, such as presto for presto.json, or a board, such as pico_w.SDLWindow, PimoroniPresto or LinuxInputBuild it with make doc, which runs Doxygen in Docker and writes it to doc/.
Each release has a tarball for each host: linux-amd64, linux-arm64 (which covers a Raspberry Pi) and darwin-arm64. Each is a whole picofuse/ tree, to unpack in /opt: picofuse and picofuse-objc for the host, with picotool and testrunner, and for each board in boards.txt, with the [examples](examples) and the [tutorial](tutorial). A release is built with picofuse's release of the same tag, so picofuse is tagged first.
picofuse-objc is built against an installed copy of picofuse, and is installed into the same place, so that the two make up one installation. That's /opt/picofuse, unless you set PREFIX to another absolute path for both.
This builds and installs the Objective-C runtime and the Foundation, Application, Graphics, Devices and Network frameworks:
lib/<target>/libpicofuse-objc-gcc.a, -foundation.a, -application.a, -graphics.a, -devices.a and -network.a, with a pkg-config file for each in lib/<target>/pkgconfig/. <target> is the board, or the host (e.g. darwin-arm64)include/runtime/, include/Foundation/, include/Application/, include/Graphics/, include/Devices/ and include/Network/ - their headerscmake/picofuse_objc.cmake and cmake/picofuse_objc_devices.cmake - what a program builds withexamples/ and tutorial/ - the [examples](examples), and the [tutorial](tutorial), whose links to them work in the installation tooA program links a framework other than Application with picofuse_objc_executable(... FRAMEWORKS Devices), which links only the parts it uses, and Devices brings Graphics with it. A window on a Mac or Linux needs SDL3, which picofuse finds when it's built.
A program describes its hardware in a JSON file beside its sources, one for each setup, such as examples/bricks/presto.json:
DEVICES names the file: make DEVICES=presto, or -D DEVICES=prestohost.json, with no board, for the host"board" is the board it's built for, so a program doesn't need PICO_BOARDDEVICES=pico_wNXApplicationFeatureDevices, [[application deviceManager] display] is its display, and only the classes it names are linked--devices <file> adds settings, such as a panel's "vcom"The frameworks themselves are still built for a board with PICO_BOARD, below.
Requirements:
Install picofuse, then test and install this:
OBJC_COMPILER for another.clang (and its gcc alias) can't be used: it doesn't support the GCC Objective-C runtime on a Mac.Requirements on Debian (tested with trixie), where gobjc is the Objective-C compiler for GCC:
Install picofuse, then test and install this:
Requirements, in addition to CMake and pkg-config:
arm-none-eabi-gcc), which compiles picofuse and links programs. On a Mac, brew install --cask gcc-arm-embedded/opt/LLVM-ET-Arm-19.1.5-Darwin-universalInstall picofuse for the board, then this. For example, for a Pico 2 W:
PICO_BOARD cross-compiles for that board.make PICO_BOARD=pico2_w BUILD_DIR=build-pico2_w test. This needs openocd, and the host installation of picofuse, for testrunner.cmake -B <build directory> -D PICO_BOARD=<board> -D LLVM_ARM_TOOLCHAIN=<dir> first.pico for the Pico, pico_w for the Pico W and pico2 for the Pico 2.