Skip to content

Instantly share code, notes, and snippets.

# This CMakeLists file is for SiLabs EFM32PG12 MCU development
# and is based off of the CMakeLists file for STM MCU development found here: https://gist.github.com/elmot/3b4f0e9f8b23864fdf8bb509c329d051
cmake_minimum_required(VERSION 3.17)
set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_VERSION 1)
# specify cross compilers and tools
# Note that you will have to add the path to the ARM toolchain to $PATH
set(CMAKE_C_COMPILER arm-none-eabi-gcc)
// main.c
// External HS XT Config bits
_FOSC( POSCMD_HS & OSCIOFNC_OFF );
_FOSCSEL( FNOSC_PRI & IESO_OFF );
_FWDT( FWDTEN_OFF );
int i = 0;