This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// main.c | |
// External HS XT Config bits | |
_FOSC( POSCMD_HS & OSCIOFNC_OFF ); | |
_FOSCSEL( FNOSC_PRI & IESO_OFF ); | |
_FWDT( FWDTEN_OFF ); | |
int i = 0; |