No description, website, or topics provided.
Clone or download
Pull request Compare This branch is 1 commit ahead, 4 commits behind Safecast:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


A firmware project for the Safecast geiger counter (see based on ARM Cortex-M3 MCU (STM32F101RET6,

Please see the LICENSE file for licensing information.

User firmware loaders and log uploading


A simple tool for updating to the latest firmware release and uploading logs for Mac OS X is available here:

Source code for these firmware loaders is available here:


You need to install the FTDI drivers from here: You may also need to install the VisualStudio runtime from here:

You can then run the windows tool which is available here:


See the source in firmware_loader (also compiled when you execute make upload monitor inside firmware directory).


The initial codebase was forked from the libmaple project. This provides board support for the STM32 microcontroller. libmaple has been modified to suit the purposes of this project, support for the STM32F103RET6 which this geiger counter uses was added. A few of the functions provided by libmaple have the potential to block under certain error conditions, this has been patched. libmaple also comes with a C++ wrapper library called "Wirish" for the most part this has been removed.

To build the software you need a ARM G++ compiler toolchain that targets bare metal. We have been using the Codesourcey tools:

In particular the 32bit Linux binary distribution: gcc-arm-none-eabi-latest-linux32.tar.gz

You will also need a copy of imagemagick.

To build the codebase you may want to download/extract this and add it to your path. You should then be able to run make in the firmware subdirectory to build a firmware image (safecast.bin).

To program the firmware you can use the tool provided in the firmware_loader subdirectory. To build it type "make". The script "test" containing a usage example.

Example Build Setup

  • Install imagemagick
sudo apt-get install imagemagick
  • Get the codesourcey tool chain
mkdir $HOME/armcompiler
cd $HOME/armcompiler
tar xzvf gcc-arm-none-eabi-latest-linux32.tar.gz
  • Add codesourcery tools to your path, this can be added to your .bashrc:
export PATH=$PATH:$HOME/armcompiler/arm/bin
  • And then checkout and build:
cd $HOME/gitcode # or whereever you want to keep your code 
git clone
git checkout devel # work on development branch
cd firmware
make upload # you may need to type make in ../firmware_loader first.