Skip to content

Instantly share code, notes, and snippets.

@bshewan
bshewan / CMakeLists.txt
Created March 6, 2023 14:55 — forked from elmot/CMakeLists.txt
CMakeLists.txt template for ARM GCC projects
cmake_minimum_required(VERSION 3.17)
set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_VERSION 1)
# specify cross compilers and tools
set(CMAKE_C_COMPILER arm-none-eabi-gcc)
set(CMAKE_CXX_COMPILER arm-none-eabi-g++)
set(CMAKE_ASM_COMPILER arm-none-eabi-gcc)
set(CMAKE_AR arm-none-eabi-ar)
set(CMAKE_OBJCOPY arm-none-eabi-objcopy)
set(CMAKE_OBJDUMP arm-none-eabi-objdump)
#include <iostream>
using namespace std;
int main( int argc, char **argv )
{
cout << "Hello World" << endl;
return 0;
}