1# The purpose of this Makefile is to build dummy ELF files required to run idf_monitor tests. 2 3# Make sure the toolchains are in the PATH: 4PREFIX_XTENSA ?= xtensa-esp32-elf- 5PREFIX_RISCV ?= riscv32-esp-elf- 6 7PROG_XTENSA := dummy_xtensa.elf 8PROG_RISCV := dummy_riscv.elf 9 10# This actually depends on the value of portUSING_MPU_WRAPPERS. 11# I.e. ESP32-S2 would also have TASK_NAME_OFFSET=52 since portUSING_MPU_WRAPPERS is 0. 12CPPFLAGS_XTENSA := -DTASK_NAME_OFFSET=56 13CPPFLAGS_RISCV := -DTASK_NAME_OFFSET=52 14 15all: $(PROG_XTENSA) $(PROG_RISCV) 16 17$(PROG_XTENSA): dummy.c 18 $(PREFIX_XTENSA)gcc $(CPPFLAGS_XTENSA) --specs=nosys.specs -o $@ -g $^ 19 chmod -x $@ 20 21# ^ chmod is there so that we don't have to add ELF files to executables list 22 23$(PROG_RISCV): dummy.c 24 $(PREFIX_RISCV)gcc $(CPPFLAGS_RISCV) --specs=nosys.specs -o $@ -g $^ 25 chmod -x $@ 26 27clean: 28 rm -f $(PROG_XTENSA) $(PROG_RISCV) 29 30.PHONY: clean all 31