1# the name of the target operating system 2set(CMAKE_SYSTEM_NAME Generic) 3 4set(CMAKE_SYSTEM_PROCESSOR arm) 5 6# which compilers to use for C 7set(TARGET_COMPILE_OPTIONS -mthumb -march=armv7-m -mfloat-abi=soft) 8set(CMAKE_C_COMPILER arm-none-eabi-gcc -nostdlib) 9 10# where is the target environment located 11set(CMAKE_FIND_ROOT_PATH /usr/bin) 12 13# adjust the default behavior of the FIND_XXX() commands: 14# search programs in the host environment 15set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 16 17# search headers and libraries in the target environment 18set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 19set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 20 21set(_HAVE_PICOLIBC_TLS_API TRUE) 22 23set(FORMAT_DEFAULT_DOUBLE 1) 24set(FORMAT_DEFAULT_FLOAT 0) 25set(FORMAT_DEFAULT_INTEGER 0) 26 27set(PICOLIBC_LINK_FLAGS -nostartfiles -T ${CMAKE_CURRENT_SOURCE_DIR}/cmake/TC-arm-none-eabi.ld -lgcc) 28