Merge branch 'bugfix/revert_make_xtensa_trax' into 'master'

xtensa: Revert back Makefile for trax test

See merge request espressif/esp-idf!16048
pull/7966/head
morris 2021-11-23 01:58:29 +00:00
commit b077400f0f
2 zmienionych plików z 41 dodań i 1 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -4,7 +4,7 @@ Hardware assisted breakpoint 1 at 0x4008043d: file test.c, line 22.
Temporary breakpoint 1, entry () at test.c:22
22 for (int i = 0; i < 10; ++ i) {
Program stopped.
Program received signal SIGINT, Interrupt.
entry () at test.c:26
26 }
0001: Indirect branch message, 2 packets, PC range 0x40080400 - 0x4008040a, target PC 0x40080411, icnt=9, uaddr=0x11, exc=0
@ -38227,3 +38227,4 @@ Dump of assembler code from 0x4008042c to 0x40080430:
0x4008042c <done+0>: entry a1, 32
0x4008042f <done+3>: mov.n a7, a1
End of assembler dump.
[Inferior 1 (Remote target) detached]