tools: merge C3 changes into master

This commit is contained in:
Marius Vikhammer 2020-12-29 10:00:45 +08:00
parent de798541dc
commit 7fe16bae25
35 changed files with 426 additions and 47 deletions

View File

@ -15,6 +15,11 @@
.. tool-xtensa-esp32s3-elf-notes
---
.. tool-riscv32-esp-elf-notes
---
.. tool-esp32ulp-elf-notes

View File

@ -17,6 +17,11 @@
.. tool-xtensa-esp32s3-elf-notes
---
.. tool-riscv32-esp-elf-notes
---
.. tool-esp32ulp-elf-notes

View File

@ -112,6 +112,7 @@ components/soc/src/esp32/rtc_clk_common.h
components/esp_hw_support/port/esp32/regi2c_ctrl.h
components/esp_rom/include/esp32/rom/sha.h
components/esp_rom/include/esp32/rom/secure_boot.h
components/esp_rom/include/esp32c3/rom/spi_flash.h
components/esp_rom/include/esp32s2/rom/spi_flash.h
components/esp_rom/include/esp32s2/rom/cache.h
components/esp_rom/include/esp32s2/rom/secure_boot.h

View File

@ -16,7 +16,8 @@ TEST_LABELS = {
'test_apps': 'BOT_LABEL_CUSTOM_TEST',
'component_ut': ['BOT_LABEL_UNIT_TEST',
'BOT_LABEL_UNIT_TEST_32',
'BOT_LABEL_UNIT_TEST_S2'],
'BOT_LABEL_UNIT_TEST_S2',
'BOT_LABEL_UNIT_TEST_C3'],
}
BUILD_ALL_LABELS = [

View File

@ -80,17 +80,20 @@ class ExampleGroup(IDFCaseGroup):
SORT_KEYS = CI_JOB_MATCH_KEYS = ['env_tag', 'target']
LOCAL_BUILD_DIR = 'build_examples'
BUILD_JOB_NAMES = ['build_examples_cmake_{}'.format(target) for target in SUPPORTED_TARGETS]
EXAMPLE_TARGETS = SUPPORTED_TARGETS + PREVIEW_TARGETS
BUILD_JOB_NAMES = ['build_examples_cmake_{}'.format(target) for target in EXAMPLE_TARGETS]
class TestAppsGroup(ExampleGroup):
LOCAL_BUILD_DIR = 'build_test_apps'
BUILD_JOB_NAMES = ['build_test_apps_{}'.format(target) for target in SUPPORTED_TARGETS]
TEST_APP_TARGETS = SUPPORTED_TARGETS + PREVIEW_TARGETS
BUILD_JOB_NAMES = ['build_test_apps_{}'.format(target) for target in TEST_APP_TARGETS]
class ComponentUTGroup(TestAppsGroup):
LOCAL_BUILD_DIR = 'build_component_ut'
BUILD_JOB_NAMES = ['build_component_ut_{}'.format(target) for target in SUPPORTED_TARGETS]
UNIT_TEST_TARGETS = SUPPORTED_TARGETS + PREVIEW_TARGETS
BUILD_JOB_NAMES = ['build_component_ut_{}'.format(target) for target in UNIT_TEST_TARGETS]
class UnitTestGroup(IDFCaseGroup):
@ -98,7 +101,8 @@ class UnitTestGroup(IDFCaseGroup):
CI_JOB_MATCH_KEYS = ['test environment']
LOCAL_BUILD_DIR = 'tools/unit-test-app/builds'
BUILD_JOB_NAMES = ['build_esp_idf_tests_cmake_{}'.format(target) for target in SUPPORTED_TARGETS]
UNIT_TEST_TARGETS = SUPPORTED_TARGETS + PREVIEW_TARGETS
BUILD_JOB_NAMES = ['build_esp_idf_tests_cmake_{}'.format(target) for target in UNIT_TEST_TARGETS]
MAX_CASE = 50
ATTR_CONVERT_TABLE = {
@ -107,6 +111,7 @@ class UnitTestGroup(IDFCaseGroup):
DUT_CLS_NAME = {
'esp32': 'ESP32DUT',
'esp32s2': 'ESP32S2DUT',
'esp32c3': 'ESP32C3DUT',
'esp8266': 'ESP8266DUT',
}

View File

@ -463,6 +463,9 @@ class ESP32DUT(IDFDUT):
def _get_rom(cls):
return esptool.ESP32ROM
def erase_partition(self, esp, partition):
raise NotImplementedError()
class ESP32S2DUT(IDFDUT):
TARGET = "esp32s2"
@ -472,6 +475,21 @@ class ESP32S2DUT(IDFDUT):
def _get_rom(cls):
return esptool.ESP32S2ROM
def erase_partition(self, esp, partition):
raise NotImplementedError()
class ESP32C3DUT(IDFDUT):
TARGET = "esp32c3"
TOOLCHAIN_PREFIX = "riscv32-esp-elf-"
@classmethod
def _get_rom(cls):
return esptool.ESP32C3ROM
def erase_partition(self, esp, partition):
raise NotImplementedError()
class ESP8266DUT(IDFDUT):
TARGET = "esp8266"
@ -481,9 +499,12 @@ class ESP8266DUT(IDFDUT):
def _get_rom(cls):
return esptool.ESP8266ROM
def erase_partition(self, esp, partition):
raise NotImplementedError()
def get_target_by_rom_class(cls):
for c in [ESP32DUT, ESP32S2DUT, ESP8266DUT, IDFQEMUDUT]:
for c in [ESP32DUT, ESP32S2DUT, ESP32C3DUT, ESP8266DUT, IDFQEMUDUT]:
if c._get_rom() == cls:
return c.TARGET
return None

View File

@ -23,13 +23,14 @@ import junit_xml
from tiny_test_fw import TinyFW, Utility
from .DebugUtils import OCDBackend, GDBBackend, CustomProcess # noqa: export DebugUtils for users
from .IDFApp import IDFApp, Example, LoadableElfTestApp, UT, TestApp, ComponentUTApp # noqa: export all Apps for users
from .IDFDUT import IDFDUT, ESP32DUT, ESP32S2DUT, ESP8266DUT, ESP32QEMUDUT # noqa: export DUTs for users
from .IDFDUT import IDFDUT, ESP32DUT, ESP32S2DUT, ESP32C3DUT, ESP8266DUT, ESP32QEMUDUT # noqa: export DUTs for users
from .unity_test_parser import TestResults, TestFormat
# pass TARGET_DUT_CLS_DICT to Env.py to avoid circular dependency issue.
TARGET_DUT_CLS_DICT = {
'ESP32': ESP32DUT,
'ESP32S2': ESP32S2DUT,
'ESP32C3': ESP32C3DUT,
}

View File

@ -9,6 +9,8 @@ function(__add_dfu_targets)
set(dfu_pid "2")
elseif("${target}" STREQUAL "esp32s3")
set(dfu_pid "4")
elseif("${target}" STREQUAL "esp32c3")
return()
elseif("${target}" STREQUAL "linux")
return()
else()

View File

@ -295,6 +295,7 @@ class BuildSystem:
'ESP32': 'esp32',
'ESP32-S2': 'esp32s2',
'ESP32-S3': 'esp32s3',
'ESP32-C3': 'esp32c3',
'Linux': 'linux',
}

View File

@ -391,6 +391,7 @@ class SerialReader(StoppableThread):
self.serial.baudrate = self.baud
self.serial.rts = True # Force an RTS reset on open
self.serial.open()
time.sleep(0.005) # Add a delay to meet the requirements of minimal EN low time (2ms for ESP32-C3)
self.serial.rts = False
self.serial.dtr = self.serial.dtr # usbser.sys workaround
try:

View File

@ -38,4 +38,4 @@ GENERATORS = collections.OrderedDict([
SUPPORTED_TARGETS = ["esp32", "esp32s2"]
PREVIEW_TARGETS = ["esp32s3", "linux"]
PREVIEW_TARGETS = ["esp32s3", "esp32c3", "linux"]

View File

@ -597,7 +597,8 @@ class SectionsInfo(dict):
def _get_infos_from_file(self, info):
# Object file line: '{object}: file format elf32-xtensa-le'
object = Fragment.ENTITY.setResultsName("object") + Literal(":").suppress() + Literal("file format elf32-xtensa-le").suppress()
obj = Fragment.ENTITY.setResultsName("object") + Literal(":").suppress() + \
(Literal("file format elf32-") + (Literal("xtensa-le") | Literal("littleriscv"))).suppress()
# Sections table
header = Suppress(Literal("Sections:") + Literal("Idx") + Literal("Name") + Literal("Size") + Literal("VMA") +
@ -607,7 +608,7 @@ class SectionsInfo(dict):
Optional(Literal(","))))
# Content is object file line + sections table
content = Group(object + header + Group(ZeroOrMore(entry)).setResultsName("sections"))
content = Group(obj + header + Group(ZeroOrMore(entry)).setResultsName("sections"))
parser = Group(ZeroOrMore(content)).setResultsName("contents")

View File

@ -0,0 +1,30 @@
# The purpose of this Makefile is to build dummy ELF files required to run idf_monitor tests.
# Make sure the toolchains are in the PATH:
PREFIX_XTENSA ?= xtensa-esp32-elf-
PREFIX_RISCV ?= riscv32-esp-elf-
PROG_XTENSA := dummy_xtensa.elf
PROG_RISCV := dummy_riscv.elf
# This actually depends on the value of portUSING_MPU_WRAPPERS.
# I.e. ESP32-S2 would also have TASK_NAME_OFFSET=52 since portUSING_MPU_WRAPPERS is 0.
CPPFLAGS_XTENSA := -DTASK_NAME_OFFSET=56
CPPFLAGS_RISCV := -DTASK_NAME_OFFSET=52
all: $(PROG_XTENSA) $(PROG_RISCV)
$(PROG_XTENSA): dummy.c
$(PREFIX_XTENSA)gcc $(CPPFLAGS_XTENSA) --specs=nosys.specs -o $@ -g $^
chmod -x $@
# ^ chmod is there so that we don't have to add ELF files to executables list
$(PROG_RISCV): dummy.c
$(PREFIX_RISCV)gcc $(CPPFLAGS_RISCV) --specs=nosys.specs -o $@ -g $^
chmod -x $@
clean:
rm -f $(PROG_XTENSA) $(PROG_RISCV)
.PHONY: clean all

View File

@ -5,9 +5,4 @@ Use `run_test_idf_monitor.py` in order to run the test.
New tests can be added into `test_list` of `run_test_idf_monitor.py` and placing the corresponding files into the
`tests` directory.
Note: The `idf_monitor` is tested by a dummy ELF file which was generated by running the following commands::
dd if=/dev/zero of=tmp.bin bs=1 count=4
xtensa-esp32-elf-objcopy -I binary -O elf32-xtensa-le -B xtensa tmp.bin tmp.o
xtensa-esp32-elf-ld --defsym _start=0x40000000 tmp.o -o dummy.elf
chmod -x dummy.elf
Note: The `idf_monitor` is tested with dummy ELF files. Run `make` to build the ELF files for supported architectures.

View File

@ -0,0 +1,13 @@
/* Produces a minimal ELF file for espcoredump tests */
typedef struct {
char stuff[TASK_NAME_OFFSET];
char pcTaskName[16];
} TCB_t;
TCB_t foo;
int main(void)
{
return 0;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -27,9 +27,6 @@ except ImportError:
import idf_monitor
ELF_FILE = 'dummy.elf' # ELF file used for starting the monitor
def monitor_serial_reader_state(serial_reader, file_to_create):
"""
The purpose of this wrapper is to monitor the serial reader state of idf_monitor.py. file_to_create is created
@ -47,10 +44,16 @@ def main():
parser.add_argument('--port')
parser.add_argument('--print_filter')
parser.add_argument('--serial_alive_file')
parser.add_argument('--toolchain-prefix')
parser.add_argument('--decode-panic', default="disable")
parser.add_argument('--target', default=None)
parser.add_argument('--elf-file')
args = parser.parse_args()
serial_instance = serial.serial_for_url(args.port, 115200, do_not_open=True)
monitor = idf_monitor.Monitor(serial_instance, ELF_FILE, args.print_filter, 'make', toolchain_prefix='xtensa-esp32-elf-', eol='CR')
monitor = idf_monitor.Monitor(serial_instance, args.elf_file, args.print_filter, 'make',
toolchain_prefix=args.toolchain_prefix, eol='CR',
decode_panic=args.decode_panic, target=args.target)
sys.stderr.write('Monitor instance has been created.\n')
monitor_thread = threading.Thread(target=monitor_serial_reader_state,
args=(monitor.serial_reader, args.serial_alive_file))

View File

@ -29,16 +29,20 @@ import threading
import errno
import tempfile
XTENSA_ARGS = '--toolchain-prefix xtensa-esp32-elf-'
RISCV_ARGS = '--decode-panic backtrace --target esp32c3 --toolchain-prefix riscv32-esp-elf-'
test_list = (
# Add new tests here. All files should be placed in IN_DIR. Columns are:
# Input file Filter string File with expected output Timeout
('in1.txt', '', 'in1f1.txt', 60),
('in1.txt', '*:V', 'in1f1.txt', 60),
('in1.txt', 'hello_world', 'in1f2.txt', 60),
('in1.txt', '*:N', 'in1f3.txt', 60),
('in2.txt', 'boot mdf_device_handle:I mesh:E vfs:I', 'in2f1.txt', 420),
('in2.txt', 'vfs', 'in2f2.txt', 420),
('core1.txt', '', 'core1_out.txt', 60),
# Add new tests here. All files should be placed in IN_DIR. Columns are
# Input file Filter string File with expected output Timeout ELF file Extra args
('in1.txt', '', 'in1f1.txt', 60, 'dummy_xtensa.elf', XTENSA_ARGS),
('in1.txt', '*:V', 'in1f1.txt', 60, 'dummy_xtensa.elf', XTENSA_ARGS),
('in1.txt', 'hello_world', 'in1f2.txt', 60, 'dummy_xtensa.elf', XTENSA_ARGS),
('in1.txt', '*:N', 'in1f3.txt', 60, 'dummy_xtensa.elf', XTENSA_ARGS),
('in2.txt', 'boot mdf_device_handle:I mesh:E vfs:I', 'in2f1.txt', 420, 'dummy_xtensa.elf', XTENSA_ARGS),
('in2.txt', 'vfs', 'in2f2.txt', 420, 'dummy_xtensa.elf', XTENSA_ARGS),
('core1.txt', '', 'core1_out.txt', 60, 'dummy_xtensa.elf', XTENSA_ARGS),
('riscv_panic1.txt', '', 'riscv_panic1_out.txt', 60, 'dummy_riscv.elf', RISCV_ARGS),
)
IN_DIR = 'tests/' # tests are in this directory
@ -78,9 +82,12 @@ class TestRunner(object):
return self
def __exit__(self, type, value, traceback):
self.serversocket.shutdown(socket.SHUT_RDWR)
self.serversocket.close()
print('Socket was closed successfully')
try:
self.serversocket.shutdown(socket.SHUT_RDWR)
self.serversocket.close()
print('Socket was closed successfully')
except (OSError, socket.error):
pass
def accept_connection(self):
""" returns a socket for sending the input for idf_monitor which must be closed before calling this again. """
@ -102,7 +109,9 @@ def test_iteration(runner, test):
monitor_cmd = [sys.executable, IDF_MONITOR_WAPPER,
'--port', 'socket://{}:{}?logging=debug'.format(HOST, runner.port),
'--print_filter', test[1],
'--serial_alive_file', SERIAL_ALIVE_FILE]
'--serial_alive_file', SERIAL_ALIVE_FILE,
'--elf-file', test[4]]
monitor_cmd += test[5].split()
(master_fd, slave_fd) = pty.openpty()
print('\t', ' '.join(monitor_cmd), sep='')
print('\tstdout="{}" stderr="{}" stdin="{}"'.format(o_f.name, e_f.name, os.ttyname(slave_fd)))

View File

@ -40,7 +40,7 @@ espcoredump.py v0.4-dev
===============================================================
==================== ESP32 CORE DUMP START ====================
Crashed task handle: 0x3ffb5e80, name: '', GDB name: 'process 1073438336'
Crashed task handle: 0x3ffb5e80, name: 'main', GDB name: 'process 1073438336'
================== CURRENT THREAD REGISTERS ===================
exccause 0x1d (StoreProhibitedCause)
@ -112,41 +112,41 @@ a15 0x0 0
7 process 1073432444 0x40087e10 in ?? ()
8 process 1073413520 0x400812c4 in ?? ()
==================== THREAD 1 (TCB: 0x3ffb5e80, name: '') =====================
==================== THREAD 1 (TCB: 0x3ffb5e80, name: 'main') =====================
#0 0x400e37f7 in ?? ()
#1 0x400d0c31 in ?? ()
#2 0x40087018 in ?? ()
==================== THREAD 2 (TCB: 0x3ffb6d48, name: '') =====================
==================== THREAD 2 (TCB: 0x3ffb6d48, name: 'IDLE1') =====================
#0 0x40087010 in ?? ()
==================== THREAD 3 (TCB: 0x3ffb65e4, name: '') =====================
==================== THREAD 3 (TCB: 0x3ffb65e4, name: 'IDLE0') =====================
#0 0x40087010 in ?? ()
==================== THREAD 4 (TCB: 0x3ffb77a0, name: '') =====================
==================== THREAD 4 (TCB: 0x3ffb77a0, name: 'Tmr Svc') =====================
#0 0x400812c4 in ?? ()
#1 0x40089806 in ?? ()
#2 0x400898f3 in ?? ()
#3 0x40087018 in ?? ()
==================== THREAD 5 (TCB: 0x3ffb4bf0, name: '') =====================
==================== THREAD 5 (TCB: 0x3ffb4bf0, name: 'dport') =====================
#0 0x400812c4 in ?? ()
#1 0x4008913b in ?? ()
#2 0x400d0d5c in ?? ()
#3 0x40087018 in ?? ()
==================== THREAD 6 (TCB: 0x3ffafab4, name: '') =====================
==================== THREAD 6 (TCB: 0x3ffafab4, name: 'esp_timer') =====================
#0 0x400812c4 in ?? ()
#1 0x40087e10 in ?? ()
#2 0x400d1f4b in ?? ()
#3 0x40087018 in ?? ()
==================== THREAD 7 (TCB: 0x3ffb477c, name: '') =====================
==================== THREAD 7 (TCB: 0x3ffb477c, name: 'ipc1') =====================
#0 0x40087e10 in ?? ()
#1 0x40081a2b in ?? ()
#2 0x40087018 in ?? ()
==================== THREAD 8 (TCB: 0x3ffafd90, name: '') =====================
==================== THREAD 8 (TCB: 0x3ffafd90, name: 'ipc0') =====================
#0 0x400812c4 in ?? ()
#1 0x40087e10 in ?? ()
#2 0x40081a2b in ?? ()
@ -155,7 +155,11 @@ a15 0x0 0
======================= ALL MEMORY REGIONS ========================
Name Address Size Attrs
.data 0x400054 0x4 RW A
.text 0x400074 0x134 R XA
.eh_frame 0x4001a8 0x4 R A
.ctors 0x4011ac 0x8 RW A
.dtors 0x4011b4 0x8 RW A
.data 0x4011bc 0x4 RW A
.coredump.tasks.data 0x3ffb5e80 0x15c RW
.coredump.tasks.data 0x3ffb5cf0 0x188 RW
.coredump.tasks.data 0x3ffb6d48 0x15c RW

View File

@ -0,0 +1,151 @@
ESP-ROM:esp32c3-20200918
Build:Sep 18 2020
rst:0xc (RTC_SW_CPU_RST),boot:0xc (SPI_FAST_FLASH_BOOT)
Saved PC:0x40381f24
SPIWP:0xee
mode:DOUT, clock div:2
load:0x3fcd6100,len:0x14
load:0x3fcd6114,len:0x11d8
load:0x403d0000,len:0xd0c
load:0x403d2000,len:0x1b84
entry 0x403d0062
␛[0;33mW (37) bootloader_random: RNG for ESP32-C3 not currently supported␛[0m
␛[0;33mW (184) bootloader_random: RNG for ESP32-C3 not currently supported␛[0m
␛[0;33mW (196) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.␛[0m
Enter test name: Got test name: test_abort
abort() was called at PC 0x42003863 on core 0
Core 0 register dump:
MEPC : 0x403825fa RA : 0x40382a3e SP : 0x3fc8cd5c GP : 0x3fc887e0
TP : 0xa5a5a5a5 T0 : 0x37363534 T1 : 0x7271706f T2 : 0x33323130
S0/FP : 0x00000004 S1 : 0x3fc8cdc0 A0 : 0x3fc8cd88 A1 : 0x3fc8cdbe
A2 : 0x00000000 A3 : 0x3fc8cdb5 A4 : 0x00000001 A5 : 0x3fc8a000
A6 : 0x7a797877 A7 : 0x76757473 S2 : 0xa5a5a5a5 S3 : 0xa5a5a5a5
S4 : 0xa5a5a5a5 S5 : 0xa5a5a5a5 S6 : 0xa5a5a5a5 S7 : 0xa5a5a5a5
S8 : 0xa5a5a5a5 S9 : 0xa5a5a5a5 S10 : 0xa5a5a5a5 S11 : 0xa5a5a5a5
T3 : 0x6e6d6c6b T4 : 0x6a696867 T5 : 0x66656463 T6 : 0x62613938
MSTATUS : 0x00001881 MTVEC : 0x40380001 MCAUSE : 0x00000007 MTVAL : 0x00000000
MHARTID : 0x00000000
Stack memory:
3fc8cd5c: 0xa5a5a5a5 0x3fc8ce34 0x3fc8cdbc 0x403870ce 0x00000001 0x00000004 0x3fc8aaf4 0x3fc893b0
3fc8cd7c: 0x3fc8cdc0 0x3fc893cc 0x3fc8cdbc 0x726f6261 0x20292874 0x20736177 0x6c6c6163 0x61206465
3fc8cd9c: 0x43502074 0x34783020 0x33303032 0x20333638 0x63206e6f 0x2065726f 0x00000030 0x3fc80000
3fc8cdbc: 0xa5a50030 0x30303234 0x33363833 0x42003900 0x00000001 0xa5a5a5a5 0x3fc89cc0 0x42003866
3fc8cddc: 0x3fc8a000 0x0000000a 0x420018fc 0x420039ea 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0x42012ea6
3fc8cdfc: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0x40384206 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
3fc8ce1c: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0x00000154 0x3fc8cd4c 0x00000349
3fc8ce3c: 0x3fc89964 0x3fc89964 0x3fc8ce34 0x3fc8995c 0x00000018 0xdf6337cf 0xbccacfdd 0x3fc8ce34
3fc8ce5c: 0x00000000 0x00000001 0x3fc8be30 0x6e69616d 0xfa3b3d00 0x3f2a8cb8 0x002d1f13 0x00000000
3fc8ce7c: 0x3fc8ce20 0x00000001 0x00000000 0x00000000 0x00000000 0x0000000b 0x3fc8a950 0x3fc8a9b8
3fc8ce9c: 0x3fc8aa20 0x00000000 0x00000000 0x00000001 0x00000000 0x00000000 0x00000000 0x42005b6c
3fc8cebc: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fc8cedc: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fc8cefc: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fc8cf1c: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fc8cf3c: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fc8cf5c: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fc8cf7c: 0x00000000 0x00000000 0x3fc8ce00 0x00000900 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
3fc8cf9c: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5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5a5a5a5
3fc8d0fc: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
3fc8d11c: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
3fc8d13c: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
ELF file SHA256: 72e88c31482c8900
Rebooting...
x<EFBFBD>jESP-ROM:esp32c3-20200918
Build:Sep 18 2020
rst:0xc (RTC_SW_CPU_RST),boot:0xc (SPI_FAST_FLASH_BOOT)
Saved PC:0x40381f24
SPIWP:0xee
mode:DOUT, clock div:2
load:0x3fcd6100,len:0x14
load:0x3fcd6114,len:0x11d8
load:0x403d0000,len:0xd0c
load:0x403d2000,len:0x1b84
entry 0x403d0062
␛[0;33mW (37) bootloader_random: RNG for ESP32-C3 not currently supported␛[0m
␛[0;33mW (184) bootloader_random: RNG for ESP32-C3 not currently supported␛[0m
␛[0;33mW (196) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.␛[0m
Enter test name: Got test name: test_illegal_instruction
Guru Meditation Error: Core 0 panic'ed (Illegal instruction). Exception was unhandled.
Core 0 register dump:
MEPC : 0x420037ce RA : 0x42003a18 SP : 0x3fc8cdec GP : 0x3fc887e0
TP : 0xa5a5a5a5 T0 : 0x7f7f7f7f T1 : 0x7f7f7f7f T2 : 0xffffffff
S0/FP : 0x3fc89cc0 S1 : 0xa5a5a5a5 A0 : 0x00000000 A1 : 0x3c022b0c
A2 : 0x00000000 A3 : 0x00000000 A4 : 0x00000000 A5 : 0x7f7f7f7f
A6 : 0x420019ee A7 : 0xa5a5a5a5 S2 : 0xa5a5a5a5 S3 : 0xa5a5a5a5
S4 : 0xa5a5a5a5 S5 : 0xa5a5a5a5 S6 : 0xa5a5a5a5 S7 : 0xa5a5a5a5
S8 : 0xa5a5a5a5 S9 : 0xa5a5a5a5 S10 : 0xa5a5a5a5 S11 : 0xa5a5a5a5
T3 : 0xa5a5a5a5 T4 : 0xa5a5a5a5 T5 : 0xa5a5a5a5 T6 : 0xa5a5a5a5
MSTATUS : 0x00001881 MTVEC : 0x40380001 MCAUSE : 0x00000002 MTVAL : 0x00000000
MHARTID : 0x00000000
Stack memory:
3fc8cdec: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0x42012ea6 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0x40384206
3fc8ce0c: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
3fc8ce2c: 0xa5a5a5a5 0x00000154 0x3fc8cd4c 0x0000051e 0x3fc89964 0x3fc89964 0x3fc8ce34 0x3fc8995c
3fc8ce4c: 0x00000018 0xdf6337cf 0xbccacfdd 0x3fc8ce34 0x00000000 0x00000001 0x3fc8be30 0x6e69616d
3fc8ce6c: 0xfa3b3d00 0x3f2a8cb8 0x002d1f13 0x00000000 0x3fc8ce20 0x00000001 0x00000000 0x00000000
3fc8ce8c: 0x00000000 0x0000000b 0x3fc8a950 0x3fc8a9b8 0x3fc8aa20 0x00000000 0x00000000 0x00000001
3fc8ceac: 0x00000000 0x00000000 0x00000000 0x42005b6c 0x00000000 0x00000000 0x00000000 0x00000000
3fc8cecc: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fc8ceec: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fc8cf0c: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fc8cf2c: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x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TC_SW_CPU_RST),boot:0xc (SPI_FAST_FLASH_BOOT)
Saved PC:0x40381f24
SPIWP:0xee
mode:DOUT, clock div:2
load:0x3fcd6100,len:0x14
load:0x3fcd6114,len:0x11d8
load:0x403d0000,len:0xd0c
load:0x403d2000,len:0x1b84
entry 0x403d0062
␛[0;33mW (37) bootloader_random: RNG for ESP32-C3 not currently supported␛[0m
␛[0;33mW (184) bootloader_random: RNG for ESP32-C3 not currently supported␛[0m
␛[0;33mW (196) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.␛[0m
Enter test name:

View File

@ -0,0 +1,79 @@
ESP-ROM:esp32c3-20200918
Build:Sep 18 2020
rst:0xc (RTC_SW_CPU_RST),boot:0xc (SPI_FAST_FLASH_BOOT)
Saved PC:0x40381f24
SPIWP:0xee
mode:DOUT, clock div:2
load:0x3fcd6100,len:0x14
load:0x3fcd6114,len:0x11d8
load:0x403d0000,len:0xd0c
load:0x403d2000,len:0x1b84
entry 0x403d0062
␛[0;33mW (37) bootloader_random: RNG for ESP32-C3 not currently supported␛[0m
␛[0;33mW (184) bootloader_random: RNG for ESP32-C3 not currently supported␛[0m
␛[0;33mW (196) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.␛[0m
Enter test name: Got test name: test_abort
abort() was called at PC 0x42003863 on core 0
Core 0 register dump:
MEPC : 0x403825fa RA : 0x40382a3e SP : 0x3fc8cd5c GP : 0x3fc887e0
TP : 0xa5a5a5a5 T0 : 0x37363534 T1 : 0x7271706f T2 : 0x33323130
S0/FP : 0x00000004 S1 : 0x3fc8cdc0 A0 : 0x3fc8cd88 A1 : 0x3fc8cdbe
A2 : 0x00000000 A3 : 0x3fc8cdb5 A4 : 0x00000001 A5 : 0x3fc8a000
A6 : 0x7a797877 A7 : 0x76757473 S2 : 0xa5a5a5a5 S3 : 0xa5a5a5a5
S4 : 0xa5a5a5a5 S5 : 0xa5a5a5a5 S6 : 0xa5a5a5a5 S7 : 0xa5a5a5a5
S8 : 0xa5a5a5a5 S9 : 0xa5a5a5a5 S10 : 0xa5a5a5a5 S11 : 0xa5a5a5a5
T3 : 0x6e6d6c6b T4 : 0x6a696867 T5 : 0x66656463 T6 : 0x62613938
MSTATUS : 0x00001881 MTVEC : 0x40380001 MCAUSE : 0x00000007 MTVAL : 0x00000000
MHARTID : 0x00000000
0x403825fa in ?? ()
#0 0x403825fa in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
ELF file SHA256: 72e88c31482c8900
Rebooting...
x<EFBFBD>jESP-ROM:esp32c3-20200918
Build:Sep 18 2020
rst:0xc (RTC_SW_CPU_RST),boot:0xc (SPI_FAST_FLASH_BOOT)
Saved PC:0x40381f24
SPIWP:0xee
mode:DOUT, clock div:2
load:0x3fcd6100,len:0x14
load:0x3fcd6114,len:0x11d8
load:0x403d0000,len:0xd0c
load:0x403d2000,len:0x1b84
entry 0x403d0062
␛[0;33mW (37) bootloader_random: RNG for ESP32-C3 not currently supported␛[0m
␛[0;33mW (184) bootloader_random: RNG for ESP32-C3 not currently supported␛[0m
␛[0;33mW (196) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.␛[0m
Enter test name: Got test name: test_illegal_instruction
Guru Meditation Error: Core 0 panic'ed (Illegal instruction). Exception was unhandled.
Core 0 register dump:
MEPC : 0x420037ce RA : 0x42003a18 SP : 0x3fc8cdec GP : 0x3fc887e0
TP : 0xa5a5a5a5 T0 : 0x7f7f7f7f T1 : 0x7f7f7f7f T2 : 0xffffffff
S0/FP : 0x3fc89cc0 S1 : 0xa5a5a5a5 A0 : 0x00000000 A1 : 0x3c022b0c
A2 : 0x00000000 A3 : 0x00000000 A4 : 0x00000000 A5 : 0x7f7f7f7f
A6 : 0x420019ee A7 : 0xa5a5a5a5 S2 : 0xa5a5a5a5 S3 : 0xa5a5a5a5
S4 : 0xa5a5a5a5 S5 : 0xa5a5a5a5 S6 : 0xa5a5a5a5 S7 : 0xa5a5a5a5
S8 : 0xa5a5a5a5 S9 : 0xa5a5a5a5 S10 : 0xa5a5a5a5 S11 : 0xa5a5a5a5
T3 : 0xa5a5a5a5 T4 : 0xa5a5a5a5 T5 : 0xa5a5a5a5 T6 : 0xa5a5a5a5
MSTATUS : 0x00001881 MTVEC : 0x40380001 MCAUSE : 0x00000002 MTVAL : 0x00000000
MHARTID : 0x00000000
0x420037ce in ?? ()
#0 0x420037ce in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
ELF file SHA256: 72e88c31482c8900
Rebooting...
x<EFBFBD>jESP-ROM:esp32c3-20200918
Build:Sep 18 2020
rst:0xc (RTC_SW_CPU_RST),boot:0xc (SPI_FAST_FLASH_BOOT)
Saved PC:0x40381f24
SPIWP:0xee
mode:DOUT, clock div:2
load:0x3fcd6100,len:0x14
load:0x3fcd6114,len:0x11d8
load:0x403d0000,len:0xd0c
load:0x403d2000,len:0x1b84
entry 0x403d0062
␛[0;33mW (37) bootloader_random: RNG for ESP32-C3 not currently supported␛[0m
␛[0;33mW (184) bootloader_random: RNG for ESP32-C3 not currently supported␛[0m
␛[0;33mW (196) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.␛[0m
Enter test name:

View File

@ -51,7 +51,7 @@
"win64": {
"sha256": "58419852fefb7111fdec056ac2fd7c4bd09c1f4c17610a761a97b788413527cf",
"size": 106855139,
"url": "https://dl.espressif.com/dl/xtensa-esp32-elf-gcc8_4_0-esp-2020r3-win64.zip"
"url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2020r3/xtensa-esp32-elf-gcc8_4_0-esp-2020r3-win64.zip"
}
}
]
@ -218,7 +218,7 @@
}
}
]
}
},
{
"description": "Toolchain for ESP32 ULP coprocessor",
"export_paths": [

View File

@ -2,7 +2,7 @@
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/examples/cxx/experimental/experimental_cpp_component"
list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/examples/cxx/experimental/experimental_cpp_component/"
"$ENV{IDF_PATH}/examples/peripherals/rmt/ir_protocols/components")
include($ENV{IDF_PATH}/tools/cmake/project.cmake)

View File

@ -1,4 +1,4 @@
# Only need to test this for one target (e.g. ESP32)
# Only need to test this for one target (e.g. ESP32) per architecture
CONFIG_IDF_TARGET="esp32"
TEST_COMPONENTS=cxx
CONFIG_COMPILER_CXX_EXCEPTIONS=y

View File

@ -0,0 +1,4 @@
# Only need to test this for one target (e.g. ESP32) per architecture
CONFIG_IDF_TARGET="esp32c3"
TEST_COMPONENTS=cxx
CONFIG_COMPILER_CXX_EXCEPTIONS=y

View File

@ -0,0 +1,5 @@
# Only need to test this for one target (e.g. ESP32) per architecture
CONFIG_IDF_TARGET="esp32c3"
TEST_COMPONENTS=cxx
CONFIG_COMPILER_CXX_EXCEPTIONS=y
CONFIG_COMPILER_CXX_RTTI=y

View File

@ -0,0 +1,3 @@
# This config is split between targets since different component needs to be excluded (esp32, esp32s2)
CONFIG_IDF_TARGET="esp32c3"
TEST_EXCLUDE_COMPONENTS=libsodium bt app_update freertos esp32c3 esp_ipc esp_pm esp_system esp_timer driver heap pthread soc spi_flash vfs experimental_cpp_component ulp perfmon

View File

@ -0,0 +1,3 @@
# This config is split between targets since different component needs to be included
CONFIG_IDF_TARGET="esp32c3"
TEST_COMPONENTS=freertos esp32c3 esp_ipc esp_system esp_timer driver heap pthread soc spi_flash vfs

View File

@ -0,0 +1,4 @@
# This config is split between targets since different component needs to be included (esp32, esp32s2)
CONFIG_IDF_TARGET="esp32c3"
TEST_COMPONENTS=driver esp32c3 esp_system esp_timer spi_flash
CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE=y

View File

@ -0,0 +1,23 @@
# This is a small set of tests where we enable as many as possible of the optional features
# in FreeRTOS that are gated behind config
CONFIG_IDF_TARGET="esp32c3"
TEST_COMPONENTS=freertos
CONFIG_FREERTOS_CORETIMER_1=y
CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=n
CONFIG_FREERTOS_HZ=500
CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL=y
CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y
CONFIG_FREERTOS_INTERRUPT_BACKTRACE=n
CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE=y
CONFIG_FREERTOS_LEGACY_HOOKS=y
CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION=y
CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP=y
CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=10
CONFIG_FREERTOS_USE_TRACE_FACILITY=y
CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y
CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID=y
CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y
CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y
CONFIG_FREERTOS_FPU_IN_ISR=y

View File

@ -0,0 +1,5 @@
CONFIG_IDF_TARGET="esp32c3"
TEST_COMPONENTS=freertos esp32c3 esp_system esp_ipc esp_timer driver heap pthread soc spi_flash vfs
CONFIG_COMPILER_OPTIMIZATION_SIZE=y
CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y

View File

@ -0,0 +1,3 @@
CONFIG_IDF_TARGET="esp32c3"
TEST_COMPONENTS=spi_flash
CONFIG_SPI_FLASH_ROM_IMPL=y

View File

@ -2,3 +2,4 @@
"8Mpsram": "CONFIG_SPIRAM_BANKSWITCH_ENABLE=y"
"ESP32_IDF": "CONFIG_IDF_TARGET_ESP32=y"
"ESP32S2_IDF": "CONFIG_IDF_TARGET_ESP32S2=y"
"ESP32C3_IDF": "CONFIG_IDF_TARGET_ESP32C3=y"