mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 12:53:29 +00:00
xtensa: Revert back Makefile for trax test
Revert back the regression of 766aa57084
This commit is contained in:
39
components/xtensa/trax/test/Makefile
Normal file
39
components/xtensa/trax/test/Makefile
Normal file
@@ -0,0 +1,39 @@
|
||||
PROG_BIN := test.bin
|
||||
PROG_ELF := test.elf
|
||||
OBJ := test.o
|
||||
PREFIX := xtensa-esp32-elf-
|
||||
CC := $(PREFIX)gcc
|
||||
LD := $(PREFIX)ld
|
||||
GDB ?= $(PREFIX)gdb
|
||||
CFLAGS := -g -O0
|
||||
LDFLAGS := -L $(IDF_PATH)/components/bootloader/subproject/main/ld/esp32 \
|
||||
-T bootloader.ld \
|
||||
-u entry \
|
||||
-e entry \
|
||||
-g
|
||||
|
||||
TRACE_FILE := trace_pro.bin
|
||||
GDB_LOG := gdb_log.txt
|
||||
GDB_LOG_REF := gdb_log_expected.txt
|
||||
|
||||
all: $(PROG_BIN)
|
||||
|
||||
$(PROG_ELF): $(OBJ)
|
||||
$(LD) $(LDFLAGS) -o $@ $<
|
||||
|
||||
$(PROG_BIN): $(PROG_ELF)
|
||||
esptool.py --chip esp32 elf2image --output $@ --flash_freq 40m --flash_mode dio $<
|
||||
|
||||
flash: $(PROG_BIN)
|
||||
esptool.py --port $(ESPPORT) write_flash 0x1000 $(PROG_BIN)
|
||||
|
||||
test:
|
||||
rm -f $(TRACE_FILE)
|
||||
$(GDB) -n --batch -x gdbinit | tee $(GDB_LOG)
|
||||
diff $(GDB_LOG) $(GDB_LOG_REF)
|
||||
@echo "Test pass"
|
||||
|
||||
clean:
|
||||
rm -f $(PROG_ELF) $(PROG_BIN) $(OBJ) $(TRACE_FILE) $(GDB_LOG)
|
||||
|
||||
.PHONY: all clean flash test
|
Reference in New Issue
Block a user