Makefile 897 B

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