1# CMake toolchain file for ULP
2
3set(CMAKE_SYSTEM_NAME Generic)
4
5# Compiler is only used for preprocessing
6set(CMAKE_C_COMPILER "xtensa-esp32-elf-gcc")
7
8set(CMAKE_ASM_COMPILER "esp32ulp-elf-as")
9set(CMAKE_LINKER "esp32ulp-elf-ld")
10
11if(NOT ASM_DIALECT)
12    set(ASM_DIALECT "")
13endif()
14
15set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "${CMAKE_ASM${ASM_DIALECT}_COMPILER} \
16                                    <DEFINES> <INCLUDES> -o <OBJECT> -c <SOURCE>")
17set(CMAKE_EXE_LINKER_FLAGS "-A elf32-esp32ulp -nostdlib" CACHE STRING "ULP Linker Base Flags")
18set(CMAKE_ASM_LINK_EXECUTABLE "${CMAKE_LINKER} <FLAGS> <CMAKE_ASM_LINK_FLAGS> \
19                                <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
20