You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Andrea Barisani 2a6556683f allow dcp.DeriveKey DMA memory region override 5 days ago
_dev Remove openocd config 2 months ago
arm Merge branch 'master' into development 2 weeks ago
bits tidying 1 year ago
board Merge branch 'master' into development 3 weeks ago
dma Fix typo 3 months ago
example move example application to 2 years ago
internal/reg Revert "restore build constraint for reg.Move" 8 months ago
soc allow dcp.DeriveKey DMA memory region override 5 days ago
LICENSE tidying 6 months ago bump release 4 weeks ago
go.mod improve code with go1.17 new unsafe API 4 months ago
go.sum move example application to 2 years ago

TamaGo - bare metal Go for ARM SoCs

tamago |

Copyright (c) F-Secure Corporation

TamaGo gopher


Andrea Barisani |

Andrej Rosano |


TamaGo is a framework that enables compilation and execution of unencumbered Go applications on bare metal ARM System-on-Chip (SoC) components.

The projects spawns from the desire of reducing the attack surface of embedded systems firmware by removing any runtime dependency on C code and Operating Systems.

The TamaGo framework consists of the following components:

  • A modified Go distribution which extends GOOS support to the tamago target, allowing bare metal execution.

  • Go packages for SoC driver support.

  • Go packages for board support.

The modifications are meant to be minimal for both the Go distribution (< ~4000 LOC changed) and the target application (one import required), with a clean separation from other architectures.

Strong emphasis is placed on code re-use from existing architectures already included within the standard Go runtime, see Internals.

Both aspects are motivated by the desire of providing a framework that allows secure Go firmware development on embedded systems.

Current release level

GitHub release Build Status

The current release for the TamaGo modified Go distribution is tamago1.17.3, which adds GOOS=tamago support to go1.17.3.

Binary releases for amd64 and armv7l Linux hosts are available.


The main documentation can be found on the project wiki.

The package API documentation can be found on

Supported hardware

The following table summarizes currently supported SoCs and boards.

SoC Board SoC package Board package
NXP i.MX6ULZ USB armory Mk II imx6 usbarmory/mark-two
NXP i.MX6ULL MCIMX6ULL-EVK imx6 mx6ullevk
BCM2835 Raspberry Pi Zero bcm2835 pi/pizero
BCM2835 Raspberry Pi 1 Model A+ bcm2835 pi/pi1
BCM2835 Raspberry Pi 1 Model B+ bcm2835 pi/pi1
BCM2836 Raspberry Pi 2 Model B bcm2835 pi/pi2


Go applications are simply required to import, the relevant board package to ensure that hardware initialization and runtime support takes place:

import (
	// Example for USB armory Mk II
	_ ""

Build the TamaGo compiler (or use the latest binary release):

cd tamago-go-latest/src && ./all.bash
cd ../bin && export TAMAGO=`pwd`/go

Go applications can be compiled with the compiler built in the previous step, with the addition of a few flags/variables:

# Example for USB armory Mk II
  ${TAMAGO} build -ldflags "-T 0x80010000  -E _rt0_arm_tamago -R 0x1000"

See the respective board package README file for compilation information for each specific target.

Executing and debugging

See the respective board package README file for execution and debugging information for each specific target (real or emulated).

The example application provides sample driver usage and instructions for native as well as emulated execution.


tamago |
Copyright (c) F-Secure Corporation

These source files are distributed under the BSD-style license found in the LICENSE file.

The TamaGo logo is adapted from the Go gopher designed by Renee French and licensed under the Creative Commons 3.0 Attributions license. Go Gopher vector illustration by Hugo Arganda.